111
|
1 // { dg-options "-std=c++17 -fconcepts" }
|
|
2
|
|
3 template<typename T>
|
|
4 concept bool C1 = __is_class(T);
|
|
5
|
|
6 template<typename T>
|
|
7 concept bool C2() { return __is_class(T); }
|
|
8
|
|
9 template<typename T>
|
|
10 constexpr bool C3 = __is_class(T);
|
|
11
|
|
12
|
|
13 template<typename U>
|
|
14 requires C1<U>() // { dg-error "" }
|
|
15 void f1(U) { }
|
|
16
|
|
17 template<typename U>
|
|
18 requires C2<U> // { dg-error "invalid reference" }
|
|
19 void f2(U) { }
|
|
20
|
|
21 template<C3 T> // { dg-error "not a type" }
|
|
22 void f(T) { } // { dg-error "" }
|