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
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.
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
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();
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119859
Andrew Pinski changed:
What|Removed |Added
Target Milestone|--- |15.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119859
Andrew Pinski changed:
What|Removed |Added
Priority|P3 |P1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119859
Patrick Palka changed:
What|Removed |Added
CC||jason at gcc dot gnu.org,