Template Function Rose::BitOps::shiftLeft

Template Function Rose::BitOps::shiftLeft#

Function Documentation#

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

Left shift a value.

The value src has its bits shifted n

places toward higher order. The

highest order bits are discarded and the

n new low-order bits are either set or cleared depending on the value of b. If n is greater than or equal to the number of bits in src then the return value has either all bits set or all bits cleared depending on b.