has_feature_type_traits.cpp revision 651f13cea278ec967336033dd032faef0e9fc2ec
1// RUN: %clang_cc1 -E %s -o - | FileCheck %s
2
3#if __has_feature(has_nothrow_assign)
4int has_nothrow_assign();
5#endif
6// CHECK: int has_nothrow_assign();
7
8#if __has_feature(has_nothrow_copy)
9int has_nothrow_copy();
10#endif
11// CHECK: int has_nothrow_copy();
12
13#if __has_feature(has_nothrow_constructor)
14int has_nothrow_constructor();
15#endif
16// CHECK: int has_nothrow_constructor();
17
18#if __has_feature(has_trivial_assign)
19int has_trivial_assign();
20#endif
21// CHECK: int has_trivial_assign();
22
23#if __has_feature(has_trivial_copy)
24int has_trivial_copy();
25#endif
26// CHECK: int has_trivial_copy();
27
28#if __has_feature(has_trivial_constructor)
29int has_trivial_constructor();
30#endif
31// CHECK: int has_trivial_constructor();
32
33#if __has_feature(has_trivial_destructor)
34int has_trivial_destructor();
35#endif
36// CHECK: int has_trivial_destructor();
37
38#if __has_feature(has_virtual_destructor)
39int has_virtual_destructor();
40#endif
41// CHECK: int has_virtual_destructor();
42
43#if __has_feature(is_abstract)
44int is_abstract();
45#endif
46// CHECK: int is_abstract();
47
48#if __has_feature(is_base_of)
49int is_base_of();
50#endif
51// CHECK: int is_base_of();
52
53#if __has_feature(is_class)
54int is_class();
55#endif
56// CHECK: int is_class();
57
58#if __has_feature(is_constructible)
59int is_constructible();
60#endif
61// CHECK: int is_constructible();
62
63#if __has_feature(is_convertible_to)
64int is_convertible_to();
65#endif
66// CHECK: int is_convertible_to();
67
68#if __has_feature(is_empty)
69int is_empty();
70#endif
71// CHECK: int is_empty();
72
73#if __has_feature(is_enum)
74int is_enum();
75#endif
76// CHECK: int is_enum();
77
78#if __has_feature(is_final)
79int is_final();
80#endif
81// CHECK: int is_final();
82
83#if __has_feature(is_pod)
84int is_pod();
85#endif
86// CHECK: int is_pod();
87
88#if __has_feature(is_polymorphic)
89int is_polymorphic();
90#endif
91// CHECK: int is_polymorphic();
92
93#if __has_feature(is_union)
94int is_union();
95#endif
96// CHECK: int is_union();
97
98#if __has_feature(is_literal)
99int is_literal();
100#endif
101// CHECK: int is_literal();
102
103#if __has_feature(is_standard_layout)
104int is_standard_layout();
105#endif
106// CHECK: int is_standard_layout();
107
108#if __has_feature(is_trivially_copyable)
109int is_trivially_copyable();
110#endif
111// CHECK: int is_trivially_copyable();
112
113#if __has_feature(underlying_type)
114int underlying_type();
115#endif
116// CHECK: int underlying_type();
117