This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54483] undefined reference to static constexpr in .so
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Sep 2012 07:49:57 +0000
- Subject: [Bug c++/54483] undefined reference to static constexpr in .so
- Auto-submitted: auto-generated
- References: <bug-54483-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54483
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-05 07:49:57 UTC ---
This is invalid as per [class.static.data]/3 :
"A static data member of literal type can be declared in the class definition
with the constexpr specifier; if so, its declaration shall specify a
brace-or-equal-initializer in which every initializer-clause that is an
assignment-expression is a constant expression. [ Note: In both these cases,
the member may appear in constant expressions. â end note ] The member shall
still be defined in a namespace scope if it is odr-used (3.2) in the program
and the namespace scope definition shall not contain an initializer."