From 89cec128bd96150b50bb9c3921b0fb69cc10bf84 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Sat, 30 Jul 2016 16:12:07 +0900 Subject: [PATCH] Fix compile error on GCC6 or later. Bitwise not yields integral promotion and to be signed type. --- include/boost/integer/integer_mask.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/integer/integer_mask.hpp b/include/boost/integer/integer_mask.hpp index 2acf7f7..2cc9a1d 100644 --- a/include/boost/integer/integer_mask.hpp +++ b/include/boost/integer/integer_mask.hpp @@ -63,7 +63,7 @@ struct low_bits_mask_t typedef typename uint_t::least least; typedef typename uint_t::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( std::size_t, bit_count = Bits );