1 // { dg-options "-std=c++17 -fconcepts" }
4 concept bool Nothrow_assignable() { return __has_nothrow_assign(T); }
7 concept bool Nothrow_constructible() { return __has_nothrow_constructor(T); }
10 concept bool Nothrow_copyable() { return __has_nothrow_copy(T); }
13 concept bool Trivially_assignable() { return __has_trivial_assign(T); }
16 concept bool Trivially_constructible() { return __has_trivial_constructor(T); }
19 concept bool Trivially_copyable() { return __has_trivial_copy(T); }
22 concept bool Trivially_destructible() { return __has_trivial_destructor(T); }
25 concept bool Dynamically_destructible() { return __has_virtual_destructor(T); }
28 concept bool Abstract() { return __is_abstract(T); }
31 concept bool Polymorphic() { return __is_polymorphic(T); }
34 concept bool Class() { return __is_class(T); }
37 concept bool Empty() { return __is_empty(T); }
40 concept bool Enum() { return __is_enum(T); }
43 concept bool Final() { return __is_final(T); }
46 concept bool Literal_type() { return __is_literal_type(T); }
49 concept bool Pod() { return __is_pod(T); }
52 concept bool Standard_layout() { return __is_standard_layout(T); }
55 concept bool Trivial() { return __is_trivial(T); }
58 concept bool Union() { return __is_union(T); }
60 template<Nothrow_assignable T> void f1() { }
61 template<Nothrow_copyable T> void f2() { }
62 template<Nothrow_constructible T> void f3() { }
63 template<Trivially_assignable T> void f4() { }
64 template<Trivially_copyable T> void f5() { }
65 template<Trivially_constructible T> void f6() { }
66 template<Trivially_destructible T> void f7() { }
67 template<Dynamically_destructible T> void f8() { }
68 template<Class T> void f9() { }
69 template<Empty T> void f10() { }
70 template<Standard_layout T> void f11() { }
71 template<Pod T> void f12() { }
72 template<Trivial T> void f13() { }
73 template<Polymorphic T> void f14() { }
74 template<Abstract T> void f15() { }
75 template<Final T> void f16() { }
76 template<Union T> void f17() { }
77 template<Enum T> void f18() { }
80 f1<void>(); // { dg-error "cannot call" }
81 f2<void>(); // { dg-error "cannot call" }
82 f3<void>(); // { dg-error "cannot call" }
83 f4<void>(); // { dg-error "cannot call" }
84 f5<void>(); // { dg-error "cannot call" }
85 f6<void>(); // { dg-error "cannot call" }
86 f7<void>(); // { dg-error "cannot call" }
87 f8<void>(); // { dg-error "cannot call" }
88 f9<void>(); // { dg-error "cannot call" }
89 f10<void>(); // { dg-error "cannot call" }
90 f11<void>(); // { dg-error "cannot call" }
91 f12<void>(); // { dg-error "cannot call" }
92 f13<void>(); // { dg-error "cannot call" }
93 f14<void>(); // { dg-error "cannot call" }
94 f15<void>(); // { dg-error "cannot call" }
95 f16<void>(); // { dg-error "cannot call" }
96 f17<void>(); // { dg-error "cannot call" }