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++/36261] Static const member data not found when used in a template



------- Comment #5 from paolo dot carlini at oracle dot com  2008-05-19 00:16 -------
And you are certainly wrong that the Standard allows to omit the definition, in
this case. This is 9.4.2/4 oc C++03, note the last sentence:

If a static data member is of const integral or const enumeration type, its
declaration in the class definition can specify aconstant-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
name-space scope if it is used in the program and the namespace scope
definition shall not contain aninitializer. 


-- 


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


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