BigUIntView.opEquals

  1. bool opEquals(BigUIntView!(const W, endian) rhs)
  2. bool opEquals(ulong rhs)
    struct BigUIntView(W, WordEndian endian = TargetEndian)
    @safe pure nothrow @nogc const scope
    bool
    opEquals
    (
    ulong rhs
    )
    if (
    __traits(isUnsigned, W)
    )

Return Value

Type: bool

true if the integer and equals to rhs.

Examples

auto view2 = BigUIntView!(const(ubyte), WordEndian.big)([1, 0]);
assert(view2 == 256); // false
assert(cast(ulong)view2 == 256); // true
auto view = BigUIntView!(const(ubyte), WordEndian.big)([15, 255, 255]);
assert(view == 1048575); // false
assert(cast(ulong)view == 1048575); // true

Meta