The OpenD Programming Language

UInt.opBinaryRight

Binary operations

  1. UInt!size opBinaryRight(UInt!lsize lhs)
    template opBinaryRight(string op)
    const @safe pure nothrow @nogc
    UInt!size
    opBinaryRight
    (
    size_t lsize
    )
    (
    UInt!lsize lhs
    )
    if (
    lsize < size
    )
    if (
    op == "^" ||
    op == "|"
    ||
    op == "&"
    ||
    op == "+"
    ||
    op == "*"
    )
  2. UInt!size opBinaryRight(ulong lhs)

Members

Functions

opBinaryRight
UInt!size opBinaryRight(UInt!lsize lhs)
UInt!size opBinaryRight(ulong lhs)

Examples

auto a = UInt!128.fromHexString("afbbfae3cd0aff2714a1de7022b0029d");
assert(a / UInt!128.fromHexString("5") == UInt!128.fromHexString("23259893f5ceffd49db9f949a0899a1f"));
assert(a == UInt!128.fromHexString("afbbfae3cd0aff2714a1de7022b0029d"));
assert(a % UInt!128.fromHexString("5") == UInt!128.fromHexString("2"));
assert(a == UInt!128.fromHexString("afbbfae3cd0aff2714a1de7022b0029d"));

assert(a / 5 == UInt!128.fromHexString("23259893f5ceffd49db9f949a0899a1f"));
assert(a % 5 == UInt!64.fromHexString("2"));
assert(a % 5 == 2);

Meta