1 // { dg-options "-std=c++1z -fconcepts" } 2 3 template<typename T> Class()4 concept bool Class() { return __is_class(T); } 5 f(T)6template<Class T> void f(T) { } 7 fn(T)8template<typename T> void fn(T) { } 9 10 auto p1 = &f<int>; // { dg-error "no matches" } 11 void (*p2)(int) = &f<int>; // { dg-error "no matches" } 12 void (*p3)(int) = &f; // { dg-error "no matches" } 13 14 struct S { fS15 template<Class T> int f(T) { } 16 }; 17 18 auto p4 = &S::template f<int>; // { dg-error "no matches" } 19 int (S::*p6)(int) = &S::template f<int>; // { dg-error "no matches" } 20 int (S::*p7)(int) = &S::f; // { dg-error "no matches" } 21 22 template<typename T> g(T x)23 void g(T x) { } 24 main()25int main () { 26 g(&f<int>); // { dg-error "no matches" } 27 } 28