[Bug c++/119859] [15 Regression] template member function overload with base class

2025-04-18 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119859 --- Comment #4 from Jason Merrill --- (In reply to Andrew Pinski from comment #2) > GCC trunk seemly only rejects the template member function as being > ambigious though. Yes, because https://eel.is/c++draft/namespace.udecl#11 says "The set of

[Bug c++/119859] [15 Regression] template member function overload with base class

2025-04-18 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119859 --- Comment #5 from Jason Merrill --- (In reply to Andrew Pinski from comment #3) > Another example: ... > template > const A& h(); ... > b.h(); T cannot be deduced in this call, so A::h is not a viable candidate, so it's not ambiguous.

[Bug c++/119859] [15 Regression] template member function overload with base class

2025-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119859 --- Comment #3 from Andrew Pinski --- Another example: ``` struct A { template const A& f(T); const A& g(int); template const A& h(); }; struct B : public A { using A::f; using A::g; using A::h; template const int f(T); co

[Bug c++/119859] [15 Regression] template member function overload with base class

2025-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119859 --- Comment #2 from Andrew Pinski --- Another example: ``` struct A { template const A& f(); const A& g(); }; struct B : public A { using A::f; using A::g; template const int f(); const int g(); }; int main() { B b; b.g();

[Bug c++/119859] [15 Regression?] template member function overload with base class

2025-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119859 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |15.0

[Bug c++/119859] [15 Regression?] template member function overload with base class

2025-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119859 Andrew Pinski changed: What|Removed |Added Priority|P3 |P1

[Bug c++/119859] [15 Regression?] template member function overload with base class

2025-04-18 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119859 Patrick Palka changed: What|Removed |Added CC||jason at gcc dot gnu.org,