Fix compile error on GCC6 or later.

Bitwise not yields integral promotion and to be signed type.
This commit is contained in:
Kohei Takahashi
2016-07-30 16:12:07 +09:00
parent 175a1caa58
commit 89cec128bd

View File

@ -63,7 +63,7 @@ struct low_bits_mask_t
typedef typename uint_t<Bits>::least least; typedef typename uint_t<Bits>::least least;
typedef typename uint_t<Bits>::fast fast; typedef typename uint_t<Bits>::fast fast;
BOOST_STATIC_CONSTANT( least, sig_bits = (~( ~(least( 0u )) << Bits )) ); BOOST_STATIC_CONSTANT( least, sig_bits = (~(least(~(least( 0u ))) << Bits )) );
BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) ); BOOST_STATIC_CONSTANT( fast, sig_bits_fast = fast(sig_bits) );
BOOST_STATIC_CONSTANT( std::size_t, bit_count = Bits ); BOOST_STATIC_CONSTANT( std::size_t, bit_count = Bits );