This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58412] New: C++11 : numeric_limits::stuff must be constexpr
- From: "pierreblavy at yahoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Sep 2013 09:21:45 +0000
- Subject: [Bug c++/58412] New: C++11 : numeric_limits::stuff must be constexpr
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58412
Bug ID: 58412
Summary: C++11 : numeric_limits::stuff must be constexpr
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pierreblavy at yahoo dot fr
Hello,
numeric_limits::stuff must be constexpr, as required by the C++11 standard
see the C++11 section in
http://www.cplusplus.com/reference/limits/numeric_limits/
Such behaviour is required to use this values as static const variables, or as
default variables for functions.
e.g.
struct A{
static constexpr double NaN=std::numeric_limits<double>::quiet_NaN;
f(double d=NaN){};
};