CNL  2.0.2 (development)
Compositional Numeric Library
cnl::undefined_overflow_tag Struct Reference

tag to specify undefined-behavior-on-overflow behavior in arithemtic operations More...

#include <cnl/overflow.h>

Inherits cnl::_impl::homogeneous_deduction_tag_base, and cnl::_impl::homogeneous_operator_tag_base.

Detailed Description

tag to specify undefined-behavior-on-overflow behavior in arithemtic operations

Arithmetic operations using this tag invoke undefined behavior when the result exceeds the range of the result type.

Note
Invocation of UB allows optimizing compilers to generate faster code and for undefined behavior sanitizers to trap on arithmetic errors.
See also
overflow_integer, convert, native_overflow_tag, saturated_overflow_tag, throwing_overflow_tag, trapping_overflow_tag