blob: 6430f89e309c4c386a0697af6fa538206df99ec8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// { dg-do run }
// { dg-options "-std=c++17 -fconcepts" }
#include <cassert>
#include <iostream>
template<typename T>
concept bool C1 = __is_class(T);
template<typename T>
concept bool C2() { return __is_class(T); }
template<typename T>
concept bool C3() { return requires (T a) { ++a; }; }
int main() {
if (C1<int>) assert(false);
if (C2<int>()) assert(false);
if (!C3<int>()) assert(false);
}
|