2
3
6
7
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});
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
84 typename F =
unsigned int >
88 return static_cast<T>(value >> Shift) &
details::mask<T>(Bits_To_Extract);
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