The well-formed program below fails to compile with gcc 4.1.0: $ cat t.cpp && gcc -c t.cpp template <class T> void foo (T*) { }
typedef void F (); F* f = (F*)&foo<int>; t.cpp:5: error: address of overloaded function with no contextual type information -- Summary: error casting address of a function template specialization Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sebor at roguewave dot com GCC build triplet: all GCC host triplet: all GCC target triplet: all http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27788