[Bug c++/60775] Instantiates unused class template member function and reports error
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 7 20:38:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60775
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
N.B. GCC is not instantiating the member function, it's instantiating the class
template, and the standard is clear that doing so instantiates the declarations
of member functions:
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;"
The declaration of the member function is ill-formed, as it declares a function
returning an abstract type, so it is rejected.
More information about the Gcc-bugs
mailing list