https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116298
Bug ID: 116298 Summary: No error when taking address of overloaded member function template Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rs2740 at gmail dot com Target Milestone: --- struct X { template<class E> E f() const; // #1 template<class E, int> E f() const; // #2 template<class E> E f(int) const; // #3 }; auto x = &X::f<char>; GCC accepts and appears to pick #1. If #2 is removed GCC correctly rejects.