public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58412] New: C++11 : numeric_limits::stuff must be constexpr
@ 2013-09-13  9:21 pierreblavy at yahoo dot fr
  2013-09-13  9:35 ` [Bug c++/58412] " glisse at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pierreblavy at yahoo dot fr @ 2013-09-13  9:21 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/58412] C++11 : numeric_limits::stuff must be constexpr
  2013-09-13  9:21 [Bug c++/58412] New: C++11 : numeric_limits::stuff must be constexpr pierreblavy at yahoo dot fr
@ 2013-09-13  9:35 ` glisse at gcc dot gnu.org
  2013-09-13  9:39 ` glisse at gcc dot gnu.org
  2013-09-13 10:49 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-13  9:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58412

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
It's already the case in recent versions, isn't it?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/58412] C++11 : numeric_limits::stuff must be constexpr
  2013-09-13  9:21 [Bug c++/58412] New: C++11 : numeric_limits::stuff must be constexpr pierreblavy at yahoo dot fr
  2013-09-13  9:35 ` [Bug c++/58412] " glisse at gcc dot gnu.org
@ 2013-09-13  9:39 ` glisse at gcc dot gnu.org
  2013-09-13 10:49 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-09-13  9:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58412

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
I think you forgot () after quiet_NaN and got confused by the error message.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/58412] C++11 : numeric_limits::stuff must be constexpr
  2013-09-13  9:21 [Bug c++/58412] New: C++11 : numeric_limits::stuff must be constexpr pierreblavy at yahoo dot fr
  2013-09-13  9:35 ` [Bug c++/58412] " glisse at gcc dot gnu.org
  2013-09-13  9:39 ` glisse at gcc dot gnu.org
@ 2013-09-13 10:49 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-09-13 10:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58412

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Yeah.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-13 10:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-13  9:21 [Bug c++/58412] New: C++11 : numeric_limits::stuff must be constexpr pierreblavy at yahoo dot fr
2013-09-13  9:35 ` [Bug c++/58412] " glisse at gcc dot gnu.org
2013-09-13  9:39 ` glisse at gcc dot gnu.org
2013-09-13 10:49 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).