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