Template Function Rose::BitOps::shiftRight

Template Function Rose::BitOps::shiftRight#

Function Documentation#

template<typename Unsigned>
inline Unsigned Rose::BitOps::shiftRight(Unsigned src, size_t n, bool b = false)#

Right shift a value.

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.