// Verify we substitute the correct outer template arguments // when instantiating a constrained template friend declared // inside a partial specialization. // { dg-do compile { target c++20 } } template requires __is_same(int*, U) void f() { }; template struct A; template struct A { template requires __is_same(T, U) friend void f() { } // { dg-bogus "redefinition" } }; template struct A;