24constexpr T
mask(
unsigned bits_to_extract )
26 return bits_to_extract <= 1u ? T{1} :
27 static_cast<T
>((
mask<T>(bits_to_extract-1) << 1) | T{1});
84 typename F =
unsigned int >
constexpr T mask(unsigned bits_to_extract)
T n_bits_from(F value)
Extract N bits from a bigger integer value.
static constexpr unsigned count
static constexpr unsigned count
static constexpr unsigned count
static constexpr unsigned count
static constexpr unsigned count
static constexpr unsigned count
static constexpr unsigned count
static constexpr unsigned count
static constexpr unsigned count