Re: [Boost-bugs] [Boost C++ Libraries] #5268: mpl::int_<INT_MIN> fails to compile under g++-4.6 although g++-4.5 works.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5268: mpl::int_<INT_MIN> fails to compile under g++-4.6 although g++-4.5 works.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-07 17:21:25


#5268: mpl::int_<INT_MIN> fails to compile under g++-4.6 although g++-4.5 works.
----------------------------------------------------+-----------------------
  Reporter: Stirling Westrup <swestrup@…> | Owner: agurtovoy
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: mpl
   Version: Boost 1.46.0 | Severity: Problem
Resolution: | Keywords: int_ INT_MIN
----------------------------------------------------+-----------------------

Comment (by Stirling Westrup <swestrup@…>):

 I also reported this bug to GCC, and this is what they had to say about
 it:

  http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#699 added
 integer
  overflow ("a result that is not mathematically defined or not in the
 range of
  representable values for its type") to the list of things that cause an
  expression to not be a constant expression

  The non-type template argument needs to be an integral constant-
 expression, but
  it's not a constant expression due to the overflow, so the code is
 invalid.

  Whether it should be accepted with -fpermissive is a separate matter, as
 is the
  quality of diagnostic.

 So, it appears to be a genuine bug in mpl, which will need to be fixed.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5268#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC