Fabcoin Core  0.16.2
P2P Digital Currency
SafeShifter< overflow > Class Template Reference

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

#include <misc.h>

Detailed Description

template<bool overflow>
class SafeShifter< overflow >

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 2266 of file misc.h.


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