// { dg-options "-std=c++1z -fconcepts" } template concept bool Eq() { return requires(T t) { t == t; }; } struct Nt { template friend void f(T) { } } nt; template struct S; template void proc(S*); template struct S { friend bool operator==(S, S) requires Eq() { return true; } friend void proc<>(S*); // { dg-error "does not match any template declaration" } }; struct X { } x; int main() { // f(0); // OK f(nt); // { dg-error "cannot call" } f(x); // { dg-error "3:'f' was not declared" } S si; si == si; // OK S sx; sx == sx; // { dg-error "no match" } }