Module private

Module private 

Source
Expand description

Ignore me! This module is for things that are conceptually private but that must be made public for typenum to work correctly.

Unless you are working on typenum itself, there is no need to view anything here.

Certainly don’t implement any of the traits here for anything.

Just look away.

Loooooooooooooooooooooooooooooooooook awaaaaaaaaaaaayyyyyyyyyyyyyyyyyyyyyyyyyyyyy…

If you do manage to find something of use in here, please let me know. If you can make a compelling case, it may be moved out of __private.

Note: Aliases for private type operators will all be named simply that operator followed by an abbreviated name of its associated type.

Structs§

InvertedUInt
Inverted UInt (has most significant digit on the outside)
InvertedUTerm
Terminating character for InvertedUInts

Traits§

BitDiff
Gives SizeOf(Lhs) - SizeOf(Rhs)
InternalMarker
Invert
Converts between standard numbers and inverted ones that have the most significant digit on the outside.
InvertedUnsigned
Inverted unsigned numbers
IsEqualPrivate
IsGreaterOrEqualPrivate
IsGreaterPrivate
IsLessOrEqualPrivate
IsLessPrivate
IsNotEqualPrivate
PrivateAnd
Does the real anding for UInts; And just calls this and then Trim.
PrivateCmp
PrivateDiv
PrivateDivIf
PrivateDivInt
PrivateIntegerAdd
Used for addition of signed integers; C = P.cmp(N) Assumes P = Self is positive and N is negative where P and N are both passed as unsigned integers
PrivateInvert
Doubly private! Called by invert to make the magic happen once its done the first step. The Rhs is what we’ve got so far.
PrivateLogarithm2
PrivateMax
PrivateMin
PrivatePow
PrivateRem
PrivateSetBit
PrivateSquareRoot
PrivateSub
Does the real subtraction for UInts; Sub just calls this and then Trim.
PrivateXor
Does the real xoring for UInts; Xor just calls this and then Trim.
ShiftDiff
Performs Shl on Lhs so that SizeOf(Lhs) = SizeOf(Rhs) Fails if SizeOf(Lhs) > SizeOf(Rhs)
Trim
Convenience trait. Calls Invert -> TrimTrailingZeros -> Invert
TrimTrailingZeros
Gets rid of all zeros until it hits a one.

Type Aliases§

BitDiffOut
InvertOut
PrivateAndOut
PrivateCmpOut
PrivateDivIfQuot
PrivateDivIfRem
PrivateDivIntOut
PrivateDivQuot
PrivateDivRem
PrivateIntegerAddOut
PrivateInvertOut
PrivateMaxOut
PrivateMinOut
PrivatePowOut
PrivateRemOut
PrivateSetBitOut
PrivateSubOut
PrivateXorOut
ShiftDiffOut
TrimOut
TrimTrailingZerosOut