This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/26597] static const class member, ?:, undefined reference
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2006 19:47:37 -0000
- Subject: [Bug c++/26597] static const class member, ?:, undefined reference
- References: <bug-26597-12323@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-03-07 19:47 -------
Here is the relevant section of the standard (TC1,
section 9.4.2, paragraph 4):
If a 'static' data member is of 'const' integral or 'const' enumeral type,
its declaration in the class definition can specify a 'constant-initializer'
which shall be an integral constant expression (5.19). In that case, the
member can appear in integral constant expressions. The member shall still
be defined in a namespace scope if it is used in the program and the
namespace scope definition shall not contain an 'initializer'.
*** This bug has been marked as a duplicate of 23370 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26597