
5 Feb
2013
5 Feb
'13
3:03 a.m.
2013/2/5 Christian Henning
Hi there,
is there a general template for calculating the max value by the number of bits. GIL right now uses the following template:
template <int K> struct unsigned_integral_max_value
: public mpl::integral_c {}; This code gives me some compiler errors with clang 3.2. for K = 31, for instance. Ideally I would like to take K up to 64.
A small fix gets me up to K = 63
template <int K> struct unsigned_integral_max_value
: public mpl::integral_c {}; Is there a better way in boost?
Try boost::low_bits_mask_t http://tinyurl.com/bcy22xf HTH