checkedint.traits

Templates to facilitate treating checkedint.SmartInt and checkedint.SafeInt like the built-in numeric types in generic code.

Members

Aliases

BasicScalar
alias BasicScalar = chkd.BasicScalar

See checkedint.BasicScalar

hasBitOps
alias hasBitOps = chkd.hasBitOps

See checkedint.hasBitOps

intFlagPolicyOf
alias intFlagPolicyOf = checkedint.flags.intFlagPolicyOf

See checkedint.flags.intFlagPolicyOf

isBasicFixed
alias isBasicFixed = bsct.isFixedPoint

See future.traits.isFixedPoint

isBasicInt
alias isBasicInt = bsct.isIntegral

See std.traits.isIntegral

isBasicNum
alias isBasicNum = bsct.isNumeric

See std.traits.isNumeric

isBasicScalar
alias isBasicScalar = bsct.isScalarType

See std.traits.isScalarType

isBasicSigned
alias isBasicSigned = bsct.isSigned

See std.traits.isSigned

isBasicUnsigned
alias isBasicUnsigned = bsct.isUnsigned

See std.traits.isUnsigned

isBoolean
alias isBoolean = bsct.isBoolean

See std.traits.isBoolean

isCheckedInt
alias isCheckedInt = chkd.isCheckedInt

See checkedint.isCheckedInt

isFloatingPoint
alias isFloatingPoint = bsct.isFloatingPoint

See std.traits.isFloatingPoint

isSafeInt
alias isSafeInt = chkd.isSafeInt

See checkedint.isSafeInt

isSmartInt
alias isSmartInt = chkd.isSmartInt

See checkedint.isSmartInt

isSomeChar
alias isSomeChar = bsct.isSomeChar

See std.traits.isSomeChar

Templates

Promoted
template Promoted(T)

checkedint-aware wrapper for future.traits.Promoted

Signed
template Signed(T)

checkedint-aware wrapper for std.traits.Signed

Unsigned
template Unsigned(T)

checkedint-aware wrapper for std.traits.Unsigned

isFixedPoint
template isFixedPoint(T)

checkedint-aware wrapper for future.traits.isFixedPoint

isIntegral
template isIntegral(T)

checkedint-aware wrapper for std.traits.isIntegral

isNumeric
template isNumeric(T)

checkedint-aware wrapper for std.traits.isNumeric

isScalarType
template isScalarType(T)

checkedint-aware wrapper for std.traits.isScalarType

isSigned
template isSigned(T)

checkedint-aware wrapper for std.traits.isSigned

isUnsigned
template isUnsigned(T)

checkedint-aware wrapper for isUnsigned

mostNegative
template mostNegative(T)

checkedint-aware version of std.traits.mostNegative

Meta

Authors

Thomas Stuart Bockman

This module wraps various templates from std.traits to make them checkedint-aware. For example, std.traits.isSigned!(SmartInt!int) is false, but checkedint.traits.isSigned!(SmartInt!int) is true.

This module is separate from checkedint because it is only useful in generic code, and its symbols (deliberately) conflict with some from std.traits.