Rose::BitOps::mask
Generate a mask.
Synopsis
Declared in <src/Rose/BitOps.h>
template<typename Unsigned>
Unsigned
mask(
size_t least,
size_t greatest);
Description
Returns a value where bits least through greatest (inclusive) are set and all other bits are cleared. The specified indexes must be valid for the type of x. In other words, greatest must be less than the number of bits in x and greatest must be greater than or equal to least.
Return Value
Mask value.
Parameters
Name |
Description |
least |
Least significant bit index. |
greatest |
Most significant bit index. |
Created with MrDocs