This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/58412] New: C++11 : numeric_limits::stuff must be constexpr


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){};
};


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]