Overflow checks for integers.
More...
#include <limits>
#include <stdexcept>
|
| | Safe |
| | Arithmetic operations with overflow checks.
|
| |
| | Safe::Internal |
| | Helper functions for providing integer overflow checks.
|
| |
|
|
template<typename T > |
| bool ::type | Safe::Internal::fallback_add_overflow (T summand_1, T summand_2, T &result) |
| |
| template<typename T > |
| T | Safe::add (T summand_1, T summand_2) |
| | Safe addition, throws an exception on overflow. More...
|
| |
Overflow checks for integers.
- Author
- Dan Čermák (D4N) dan.cermak@cgc-instruments.com
- Date
- 14-Dec-17, D4N: created