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