It is an unsigned type with at least Bits bits. It depends on what do you want, speed or size.low_bits_mask_t<Bits>::sig_bits is defined as (~( ~(unsigned_int(0u )) << Bits )) ) which is equivalent to 2^Bits-1 without risk of overflow.Vicente, what's unsigned_int?
low_bits_mask_t<Bits>::sig_bits uses the smallest unsigned int and low_bits_mask_t<Bits>::sig_bits_fast uses the fastest one. " template <std::size_t Bits> struct low_bits_mask_t { typedef implementation-defined-type least; typedef implementation-defined-type fast; static const least sig_bits = implementation-defined; static const fast sig_bits_fast = implementation-defined; static const std::size_t bit_count = Bits; };
The boost::low_bits_mask_t
class
template provides constants for bit masks equivalent to the
value (2Bits - 1), where Bits
is the template parameter. The parameter Bits
must be a non-negative integer from zero to Max, where Max is the number
of bits supported by the largest, unsigned, built-in integral
type. The following table describes the members of low_bits_mask_t
.
Table 3. Members of the [^boost::low_bits_mask_t] Class Template
Member |
Meaning |
---|---|
|
The smallest, unsigned built-in type that supports the given bit count. |
|
The easiest-to-manipulate analog of |
|
A |
|
A |
|
The value of the template parameter, in case its needed from a renamed instantiation of the class template. |
"
Vicente