https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105047
Bug ID: 105047 Summary: invalid non-dependent call to non-static member of the current instantiation not rejected ahead of time Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ppalka at gcc dot gnu.org Target Milestone: --- Accepts-invalid testcase: template<class> class A { void f(); static void g() { f(); // invalid because 'this' unavailable } void h() { f(0); // invalid because wrong # of arguments } }; We probably should be able to reject both calls to f ahead of time.