Rose::BitOps::shiftRight
Right shift a value.
Synopsis
Declared in <src/Rose/BitOps.h>
template<typename Unsigned>
Unsigned
shiftRight(
Unsigned src,
size_t n,
bool b = false);
Description
Shift all bits of the value right (to lower indices) by n. The n low‐order bits are discarded and the new n high‐order bits are set or cleared depending on b. If n is greater than or equal to the size of src then the return value has either all bits set or all bits cleared depending on b.
Return Value
Shifted value.
Parameters
Name |
Description |
src |
Input value. |
n |
Shift count. |
b |
Fill bit value. |
Created with MrDocs