Template Function Rose::BitOps::shiftRightSigned(Unsigned, size_t)

Template Function Rose::BitOps::shiftRightSigned(Unsigned, size_t)#

Function Documentation#

template<typename Unsigned>
inline Unsigned Rose::BitOps::shiftRightSigned(Unsigned src, size_t n)#

Right shift replicating MSB.

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 the original most significant bit. 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 its original most significant bit.