https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61659
--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Markus Trippelsdorf from comment #10) > Created attachment 33036 [details] > testcase I think this is a correct error message. See https://gcc.gnu.org/gcc-4.9/porting_to.html at the end. GCC now checks return types more strictly and will reject declarations of functions which return abstract types, including in uninstantiated templates and in typedefs to function pointers. Returning an abstract type is not possible so the code must be fixed. Also see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60775#c4: 14.7.1 [temp.inst] p1: "The implicit instantiation of a class template specialization causes the implicit instantiation of the declarations, but not of the definitions, default arguments, or exception-specifications of the class member functions, member classes, scoped member enumerations, static data members and member templates;"