BigInt.opCast

Implements casting to bool.

  1. T opCast()
    struct BigInt
    pure nothrow @nogc @safe const
    T
    opCast
    (
    T : bool
    )
    ()
  2. T opCast()
  3. T opCast()
  4. T opCast()

Examples

// Non-zero values are regarded as true
auto x = BigInt("1");
auto y = BigInt("10");
assert(x);
assert(y);

// Zero value is regarded as false
auto z = BigInt("0");
assert(!z);

Meta