https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96193

--- Comment #1 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
That actually compiles if I add -std=c++20. If the call is itself dependent, it
fails to compile. See https://godbolt.org/z/KqGhKE.
```C++
template <class T>
struct B
{
    template <class U>
    friend void f(B)
    {
    }
};

template <class T>
struct X
{
    template <class U>
    friend void f(const X& x)
    {
        f<U>(B<T>{});
    }
};

void g()
{
    f<int>(X<int>{});
}
```

Reply via email to