BigInt.opBinaryRight
BigInt opBinaryRight(string op, T)(T y) if ((op == "+" || op == "*" || op == "|" || op == "&" || op == "^") && isIntegral!T) const pure @safeImplements right-hand commutative operators (+, *, |, &, ^).
Allows expressions like int + BigInt, int * BigInt, etc. These operators are commutative, so we delegate to opBinary.
Parameters
op | The operator string |
y | The left-hand operand (integral type) |
Returns
Result of the operation as a BigInt
Implements right-hand subtraction operator.
Allows expressions like int - BigInt. Computes y - this.
Parameters
op | The operator string ("-") |
y | The left-hand operand (integral type) |
Returns
Result of y - this as a BigInt
T opBinaryRight(string op, T)(T y) if ((op == "/" || op == "%") && isIntegral!T) const pure @safeImplements right-hand division and modulus operators.
Allows expressions like int / BigInt, int % BigInt. Returns the result as the built-in type when the result fits.
Parameters
op | The operator string ("/" or "%") |
y | The left-hand operand (integral type) |
Returns
Result of y / this or y % this as type T