https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68821
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- It does when you instantiate the template: struct A { void f(); }; parent::obj<A> o(0, &A::f); w.cc: In instantiation of ‘struct parent::obj<A>’: w.cc:25:19: required from here w.cc:15:12: error: conflicting return type specified for ‘int* parent::obj<T>::operator()() [with T = A]’ int *operator()(void) { ^ w.cc:8:20: error: overriding ‘virtual void parent::obj_base::operator()()’ virtual void operator()(void)=0; ^