Fabcoin Core
0.16.2
P2P Digital Currency
|
Shifts a value in the absence of overflow. More...
#include <misc.h>
Static Public Member Functions | |
template<class T > | |
static T | RightShift (T value, unsigned int bits) |
Right shifts a value that does not overflow. More... | |
template<class T > | |
static T | LeftShift (T value, unsigned int bits) |
Left shifts a value that does not overflow. More... | |
Shifts a value in the absence of overflow.
the false
template parameter indicates overflow would not occur. In this case, SafeShifter returns the shfted value.
|
inlinestatic |
Left shifts a value that does not overflow.
T | class or type |
Since overflow == false
, the shifted value is returned.
|
inlinestatic |
Right shifts a value that does not overflow.
T | class or type |
Since overflow == false
, the shifted value is returned.