[Bug c++/69387] undefined reference to constant in template

bernd.edlinger at hotmail dot de gcc-bugzilla@gcc.gnu.org
Wed Jan 20 12:41:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69387

--- Comment #3 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Oh, now I see, you mean:

C++ Standard, Sec. 9.4.2 paragraph 4 says:
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. 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 an initializer.

right?


More information about the Gcc-bugs mailing list