http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55710
--- Comment #6 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-12-15 19:55:56 UTC --- (In reply to comment #5) So will the following do that: //---------------- template <class T> struct X { static void (*code) (); }; template <class T> void (*X<T>::code) () = []{}; // Line 7 int main () { X<int>::code(); } //---------------- giving me "In function `X<int>::code::{lambda()#1}::operator void (*)()() const':| |7|undefined reference to `X<int>::code::{lambda()#1}::_FUN()'| " ?