checkedint.asserts

Aliases for the checkedint module using IntFlagPolicy.asserts.

Members

Aliases

DebugInt
alias DebugInt(N, Flag!"bitOps" bitOps = Yes.bitOps) = checkedint.DebugInt!(N, IFP.asserts, bitOps)
Undocumented in source.
SafeInt
alias SafeInt(N, Flag!"bitOps" bitOps = Yes.bitOps) = checkedint.SafeInt!(N, IFP.asserts, bitOps)
Undocumented in source.
SmartInt
alias SmartInt(N, Flag!"bitOps" bitOps = Yes.bitOps) = checkedint.SmartInt!(N, IFP.asserts, bitOps)
Undocumented in source.
raise
alias raise = checkedint.flags.raise!(IFP.asserts)
Undocumented in source.
safeOp
alias safeOp = checkedint.safeOp!(IFP.asserts)
Undocumented in source.
smartOp
alias smartOp = checkedint.smartOp!(IFP.asserts)
Undocumented in source.
to
alias to(T) = checkedint.to!(T, IFP.asserts)
Undocumented in source.

Classes

CheckedIntException (from checkedint.flags)
class CheckedIntException via public import checkedint.flags : IntFlagPolicy, intFlagPolicyOf, IntFlag, IntFlags, CheckedIntException;

An Exception representing the cause of an integer math failure.

Enums

IntFlagPolicy (from checkedint.flags)
enum IntFlagPolicy via public import checkedint.flags : IntFlagPolicy, intFlagPolicyOf, IntFlag, IntFlags, CheckedIntException;

The module description, above, explains the different policies.

isCheckedInt (from checkedint)
eponymoustemplate isCheckedInt(T) via public import checkedint : bscal, bits, isSafeInt, isSmartInt, isCheckedInt, hasBitOps, BasicScalar;

Evaluates to true if T is an instance of SafeInt or SmartInt.

isSafeInt (from checkedint)
eponymoustemplate isSafeInt(T) via public import checkedint : bscal, bits, isSafeInt, isSmartInt, isCheckedInt, hasBitOps, BasicScalar;

Evaluates to true if T is an instance of SafeInt.

isSmartInt (from checkedint)
eponymoustemplate isSmartInt(T) via public import checkedint : bscal, bits, isSafeInt, isSmartInt, isCheckedInt, hasBitOps, BasicScalar;

Evaluates to true if T is an instance of SmartInt.

Functions

idx
Select!(isSigned!(BasicScalar!N), ptrdiff_t, size_t) idx(N num)
Undocumented in source. Be warned that the author may not have intended to support it.
safeInt
SafeInt!(N, bitOps) safeInt(N num)
Undocumented in source. Be warned that the author may not have intended to support it.
smartInt
SmartInt!(N, bitOps) smartInt(N num)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

bits (from checkedint)
SafeInt!(BasicScalar!N, N.policy, Yes.bitOps) bits [@property getter] via public import checkedint : bscal, bits, isSafeInt, isSmartInt, isCheckedInt, hasBitOps, BasicScalar;

Get a view or copy of num that supports bitwise operations.

bscal (from checkedint)
BasicScalar!N bscal [@property getter] via public import checkedint : bscal, bits, isSafeInt, isSmartInt, isCheckedInt, hasBitOps, BasicScalar;

Get a view or copy of num as a basic scalar.

Structs

IntFlag (from checkedint.flags)
struct IntFlag via public import checkedint.flags : IntFlagPolicy, intFlagPolicyOf, IntFlag, IntFlags, CheckedIntException;

Represents a single cause of failure for an integer math operation.

IntFlags (from checkedint.flags)
struct IntFlags via public import checkedint.flags : IntFlagPolicy, intFlagPolicyOf, IntFlag, IntFlags, CheckedIntException;

A bitset that can be used to track integer math failures.

Templates

BasicScalar (from checkedint)
template BasicScalar(T) via public import checkedint : bscal, bits, isSafeInt, isSmartInt, isCheckedInt, hasBitOps, BasicScalar;

Aliases to the basic scalar type associated with T, assuming either:

  • isScalarType!T, or
  • isCheckedInt!T

Otherwise, BasicScalar aliases to void.

hasBitOps (from checkedint)
template hasBitOps(T) via public import checkedint : bscal, bits, isSafeInt, isSmartInt, isCheckedInt, hasBitOps, BasicScalar;

Evaluates to true if either:

  • isScalarType!T, or
  • isCheckedInt!T

And bitwise operators such as << and ~ are available for T.

intFlagPolicyOf (from checkedint.flags)
template intFlagPolicyOf(T) via public import checkedint.flags : IntFlagPolicy, intFlagPolicyOf, IntFlag, IntFlags, CheckedIntException;

Get the IntFlagPolicy associated with some type T.

Meta

Authors

Thomas Stuart Bockman