The OpenD Programming Language

BigInt.opUnary

Implements BigInt unary operators.

  1. BigInt opUnary()
    struct BigInt
    pure nothrow @safe const
    opUnary
    (
    string op
    )
    ()
    if (
    op == "+" ||
    op == "-"
    ||
    op == "~"
    )
  2. BigInt opUnary()

Examples

auto x = BigInt("1234");
assert(-x == BigInt("-1234"));

++x;
assert(x == BigInt("1235"));

Meta