UInt.smallRightShift

Shifts right using at most size_t.sizeof * 8 - 1 bits

struct UInt(size_t size)
const
UInt!size
smallRightShift
()
(
uint shift
)
if (
size % (size_t.sizeof * 8) == 0 &&
size >= (size_t.sizeof * 8)
)

Examples

auto a = UInt!128.fromHexString("afbbfae3cd0aff2714a1de7022b0029d");
assert(a.smallRightShift(4) == UInt!128.fromHexString("afbbfae3cd0aff2714a1de7022b0029"));

Meta