Security Scol plugin
|
Shifts a value in the presence 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 overflows. | |
template<class T > | |
static T | LeftShift (T value, unsigned int bits) |
Left shifts a value that overflows. | |
Shifts a value in the presence of overflow.
the true template parameter indicates overflow would occur. In this case, SafeShifter clamps the value and returns 0.
|
inlinestatic |
Left shifts a value that overflows.
T | class or type |
Since overflow == true
, the value 0 is always returned.
|
inlinestatic |
Right shifts a value that overflows.
T | class or type |
Since overflow == true
, the value 0 is always returned.