id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 9944,Regression test relies on undefined compiler behavior,chris.cooper@…,No-Maintainer,"libs/utility/numeric_traits_test.cpp generates values complement_traits::min using a clever recursive template, but that template relies on left-shifting a negative value, and according to the C++11 standard that’s a no-no (“the behavior is undefined”) which means it’s not a constant expression, which means it can’t be calculated at compile time, which means the BOOST_STATIC_ASSERT in line 332 won’t compile, saying “static_assert expression is not an integral constant expression” (I’m using clang++). The only use for the clever templates, as the comment in the file says, is for ""platforms without support"" so my proposed fix is: #ifndef BOOST_NO_LIMITS template struct complement_traits { BOOST_STATIC_CONSTANT(Number, min = std::numeric_limits::min()); BOOST_STATIC_CONSTANT(Number, max = std::numeric_limits::max()); }; #else [SNIP] All of the other template definitions for complement_traits, complement_traits_aux, etc. #endif ",Bugs,new,To Be Determined,utility,Boost 1.54.0,Problem,,,