libboost-safe-numerics

[full]

Guaranteed Correct Integer Arithmetic

Arithmetic operations in C++ are NOT guaranteed to yield a correct mathematical result. This feature is inherited from the early days of C. The behavior of int, unsigned int and others were designed to map closely to the underlying hardware. Computer hardware implements these types as a fixed number of bits. When the result of arithmetic operations exceeds this number of bits, the result is undefined and usually not what the programmer intended. It is incumbent upon the C++ programmer to guarantee that this behavior does not result in incorrect behavior of the program. This library implements special versions of these data types which behave exactly like the original ones EXCEPT that the results of these operations are checked to be sure that an exception will be thrown anytime an attempt is made to store the result of an undefined operation.

... More
license BSL-1.0
project boost
url github.com/boostorg/safe_numerics
doc-url www.boost.org/doc/libs/1_83_0/libs/safe_numerics
topics C++Boost
4 Versions
version 1.83.0
repository https://pkg.cppget.org/1/stable
depends 6; libboost-concept-check, libboost-config, libboost-core, libboost-integer, libboost-logic, libboost-mp11
version 1.81.0+1
repository https://pkg.cppget.org/1/stable
depends 6; libboost-concept-check, libboost-config, libboost-core, libboost-integer, libboost-logic, libboost-mp11
version 1.78.0
repository https://pkg.cppget.org/1/stable
depends 6; libboost-concept-check, libboost-config, libboost-core, libboost-integer, libboost-logic, libboost-mp11
version 1.77.0+1
repository https://pkg.cppget.org/1/stable
depends 6; libboost-concept-check, libboost-config, libboost-core, libboost-integer, libboost-logic, libboost-mp11