Skip to content

Rose::BitOps::highMask

Generate a value with high order bits set.

Synopsis

Declared in <src/Rose/BitOps.h>

template<typename Unsigned>
Unsigned
highMask(size_t n);

Description

Returns a value whose n high‐order bits are set and the other low order bits are cleared. If n is greater than or equal to the size of the unsigned type then the returned value has all bits set.

Return Value

Mask value with high bits set.

Parameters

Name

Description

n

Number of high‐order bits to set.

Created with MrDocs