This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20098] Unresolved dependent "static const" symbol in template
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Feb 2005 13:14:51 -0000
- Subject: [Bug c++/20098] Unresolved dependent "static const" symbol in template
- References: <20050220001048.20098.wwieser@gmx.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-02-21 13:14 -------
Here's chapter and verse from the standard.
[9.4.2]/4 aka [class.static.data]/4:
If a static data member is of const integral or const enumeration 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 within its scope.
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.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20098