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