Template Function Rose::BitOps::shiftRightLsb#
Defined in File BitOps.h
Function Documentation#
-
template<typename Unsigned>
inline Unsigned Rose::BitOps::shiftRightLsb(Unsigned src, size_t w, size_t n, bool b = false)# Right shift part of a value without affecting the rest.
The value
srchas its low-orderwbits shifted right toward lower order. Thenlowest bits are discarded and thennew higher order bits are either set or cleared depending onb. Ifnis greater than or equal towthen all affected bits are set or cleared, depending onb. The bits not in the affected range are not affected and are returned.