// { dg-do compile { target c++17 } } // { dg-options "-fconcepts" } template concept Class = __is_class(T); template void f(T) { } template void fn(T) { } auto p1 = &f; // { dg-error "" } void (*p2)(int) = &f; // { dg-error "no matches" } void (*p3)(int) = &f; // { dg-error "no matches" } struct S { template int f(T) { return 0; } }; auto p4 = &S::template f; // { dg-error "" } int (S::*p6)(int) = &S::template f; // { dg-error "no matches" } int (S::*p7)(int) = &S::f; // { dg-error "no matches" } template void g(T x) { } int main () { g(&f); // { dg-error "no match" } }