This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/52119] numeric_limits::min() is not a constant expression
- From: "richard-gccbugzilla at metafoo dot co.uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 04 Feb 2012 02:12:41 +0000
- Subject: [Bug libstdc++/52119] numeric_limits::min() is not a constant expression
- Auto-submitted: auto-generated
- References: <bug-52119-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52119
Richard Smith <richard-gccbugzilla at metafoo dot co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |richard-gccbugzilla at
| |metafoo dot co.uk
--- Comment #1 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> 2012-02-04 02:12:41 UTC ---
In more detail: Under the C++11 FDIS, this is not a (core) constant expression
due to the "â a result that is not mathematically deïned or not in the range of
representable values for its type;" bullet in [expr.const]p2. Under DR1313,
that rule is generalized to all undefined behavior. And a constexpr function
which can't produce a constant expression is ill-formed by [dcl.constexpr]p5.