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§
- InvertedU
Int - Inverted
UInt(has most significant digit on the outside) - InvertedU
Term - Terminating character for
InvertedUInts
Traits§
- BitDiff
- Gives
SizeOf(Lhs) - SizeOf(Rhs) - Internal
Marker - Invert
- Converts between standard numbers and inverted ones that have the most significant digit on the outside.
- Inverted
Unsigned - Inverted unsigned numbers
- IsEqual
Private - IsGreater
OrEqual Private - IsGreater
Private - IsLess
OrEqual Private - IsLess
Private - IsNot
Equal Private - Private
And - Does the real anding for
UInts;Andjust calls this and thenTrim. - Private
Cmp - Private
Div - Private
DivIf - Private
DivInt - Private
Integer Add - Used for addition of signed integers;
C = P.cmp(N)AssumesP = Selfis positive andNis negative wherePandNare both passed as unsigned integers - Private
Invert - 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.
- Private
Logarithm2 - Private
Max - Private
Min - Private
Pow - Private
Rem - Private
SetBit - Private
Square Root - Private
Sub - Does the real subtraction for
UInts;Subjust calls this and thenTrim. - Private
Xor - Does the real xoring for
UInts;Xorjust calls this and thenTrim. - Shift
Diff - Performs
ShlonLhsso thatSizeOf(Lhs) = SizeOf(Rhs)Fails ifSizeOf(Lhs) > SizeOf(Rhs) - Trim
- Convenience trait. Calls
Invert->TrimTrailingZeros->Invert - Trim
Trailing Zeros - Gets rid of all zeros until it hits a one.