[Bug c++/20547] undefined reference to "static const" fields of classes

lerdsuwa at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Mar 20 13:55:00 GMT 2005


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2005-03-20 13:55 -------
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'.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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



More information about the Gcc-bugs mailing list