Linkage of the following example reports an undefined reference to `A::anInt'.
---- example.cpp struct A { template<typename T> void operator%( T const & object ) {} static int const anInt = 5; }; int main( void ) { A() % A::anInt; return 0; } -- Summary: A bug in inlining static const members. Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: juraj dot ivancic at gmail dot com GCC build triplet: i686 i386 GNU/Linux GCC host triplet: i686 i386 GNU/Linux GCC target triplet: i686 i386 GNU/Linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33569