Function checkedAdd
Add two signed 64-bit values without overflow.
bool checkedAdd(
long a,
long b,
out long result
) pure nothrow @nogc @safe;
Parameters
| Name | Description |
|---|---|
| a | Left operand. |
| b | Right operand. |
| result | Receives the exact sum when the operation succeeds. |
Returns
true when a + b is representable as long; false otherwise.