Set the n least significant bits of x, leaving the others unchanged.
Declared in <folly/lang/Bits.h>
template<typename T>
[[nodiscard]]
constexpr
T
set_n_least_significant_bits(
T x,
uint32_t n);
This function is defined as an Algorithm Function Object (AFO).
x with its n least significant bits set.
The return value should not be discarded.
| Name | Description |
|---|---|
| x | The value to modify. |
| n | The number of low bits to set. |