Crypto++  5.6.5
Free C++ class library of cryptographic schemes
SafeShifter Class Reference

Safely shift values when undefined behavior could occur. More...

Detailed Description

Safely shift values when undefined behavior could occur.

Template Parameters
overflowboolean flag indicating if overflow is present

SafeShifter safely shifts values when undefined behavior could occur under C/C++ rules. The class behaves much like a saturating arithmetic class, clamping values rather than allowing the compiler to remove undefined behavior.

See also
SafeShifter<true>, SafeShifter<false>

Definition at line 2292 of file misc.h.


The documentation for this class was generated from the following file: