Return a mask with numBits bits set starting at index.
Declared in <bdlb_bitmaskutil.h>
static
uint64_t
one64(
int index,
int numBits);
Return the unsigned integral value having the specified numBits starting at the specified index set to 1, and all other bits set to 0. The behavior is undefined unless 0 <= index, 0 <= numBits, and index + numBits <= # of bits in result.
mask with numBits bits set starting at index
| Name | Description |
|---|---|
| index | starting bit position of the range to set |
| numBits | number of consecutive bits to set |