Fabcoin Core
0.16.2
P2P Digital Currency
|
Safely shift values when undefined behavior could occur. More...
#include <misc.h>
Safely shift values when undefined behavior could occur.
overflow | boolean 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.