Opened 12 years ago
Last modified 12 years ago
#5268 new Bugs
mpl::int_<INT_MIN> fails to compile under g++-4.6 although g++-4.5 works.
Reported by: | Owned by: | Aleksey Gurtovoy | |
---|---|---|---|
Milestone: | To Be Determined | Component: | mpl |
Version: | Boost 1.46.0 | Severity: | Problem |
Keywords: | int_ INT_MIN | Cc: |
Description
Under Debian Sid with a 2.6.36 AMD_64 kernel, and g++-4.6, the following code:
#include <climits> #include <boost/mpl/int.hpp> boost::mpl::int_<INT_MIN> foo;
Produces the errors:
/usr/local/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of ‘mpl_::int_<-0x00000000080000000>’: test_test.cpp:8:27: instantiated from here /usr/local/include/boost/mpl/aux_/integral_wrapper.hpp:73:96: error: ‘2147483647’ is not a valid template argument for type ‘int’ because it is a non-constant expression /usr/local/include/boost/mpl/aux_/integral_wrapper.hpp:73:96: error: overflow in constant expression [-fpermissive]
Note:
See TracTickets
for help on using tickets.
I also reported this bug to GCC, and this is what they had to say about it:
So, it appears to be a genuine bug in mpl, which will need to be fixed.