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

2016-01-20 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69387 --- Comment #4 from Jonathan Wakely --- Yes. This is a FAQ: https://gcc.gnu.org/wiki/VerboseDiagnostics#missing_static_const_definition

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

2016-01-20 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69387 --- Comment #3 from Bernd Edlinger --- 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-ini

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

2016-01-20 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69387 --- Comment #2 from Bernd Edlinger --- Do you mean that is invalid? class StatusCode { public: static const int TEST_VALUE = 0x2; }; I thought it is like defining const int XXX = 123; which is actually only a #define not a linker symbol. I

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

2016-01-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69387 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---