BigInt.opBinary
BigInt opBinary(string op, T)(T y) if ((op == "+" || op == "*" || op == "-" || op == "|" || op == "&" || op == "^" ||
op == "/" || op == "%") && is (T: BigInt)) pure nothrow @safe const return scopeImplements binary operators between BigInts.
BigInt opBinary(string op, T)(T y) if ((op == "+" || op == "*" || op == "-" || op == "/" || op == "|" || op == "&" ||
op == "^" || op == ">>" || op == "<<" || op == "^^")
&& isIntegral!T) pure nothrow @safe const return scopeImplements binary operators between BigInt's and built-in integers.
auto opBinary(string op, T)(T y) if (op == "%" && isIntegral!T) pure nothrow @safe constImplements a narrowing remainder operation with built-in integer types.
This binary operator returns a narrower, built-in integer type where applicable, according to the following table.
BigInt | % | uint | → | long |
BigInt | % | long | → | long |
BigInt | % | ulong | → | BigInt |
BigInt | % | other type | → | int |