[Bug c++/45923] constexpr diagnostic w/ non-literal

jason at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 7 15:35:00 GMT 2010


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

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2010-10-07 15:35:45 UTC ---
(In reply to comment #0)
> constexpr-basic.cc:20:33: error: ‘double complex::real() const’ is not a
> constexpr function
> 
> NO!

Yes.  It is not valid for real() to be constexpr in a non-literal class, so it
is not constexpr.



More information about the Gcc-bugs mailing list