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++/50785] [C++0x][constexpr] static constexpr double undefined reference


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-10-19 08:34:45 UTC ---
The definition is required, see [class.static.data] p3

"A static data member of literal type can be declared in the class deïnition
with the constexpr speciïer; [...] The member shall still be deïned in a
namespace scope if it is odr-used (3.2) in the program and the namespace scope
deïnition shall not contain an initializer."


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