1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // WARNING: This test was generated by generate_feature_test_macro_components.py
10 // and should not be edited manually.
11 //
12 // clang-format off
13 
14 // <set>
15 
16 // Test the feature test macros defined by <set>
17 
18 /*  Constant                                      Value
19     __cpp_lib_allocator_traits_is_always_equal    201411L [C++17]
20     __cpp_lib_erase_if                            202002L [C++20]
21     __cpp_lib_generic_associative_lookup          201304L [C++14]
22     __cpp_lib_node_extract                        201606L [C++17]
23     __cpp_lib_nonmember_container_access          201411L [C++17]
24 */
25 
26 #include <set>
27 #include "test_macros.h"
28 
29 #if TEST_STD_VER < 14
30 
31 # ifdef __cpp_lib_allocator_traits_is_always_equal
32 #   error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17"
33 # endif
34 
35 # ifdef __cpp_lib_erase_if
36 #   error "__cpp_lib_erase_if should not be defined before c++20"
37 # endif
38 
39 # ifdef __cpp_lib_generic_associative_lookup
40 #   error "__cpp_lib_generic_associative_lookup should not be defined before c++14"
41 # endif
42 
43 # ifdef __cpp_lib_node_extract
44 #   error "__cpp_lib_node_extract should not be defined before c++17"
45 # endif
46 
47 # ifdef __cpp_lib_nonmember_container_access
48 #   error "__cpp_lib_nonmember_container_access should not be defined before c++17"
49 # endif
50 
51 #elif TEST_STD_VER == 14
52 
53 # ifdef __cpp_lib_allocator_traits_is_always_equal
54 #   error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17"
55 # endif
56 
57 # ifdef __cpp_lib_erase_if
58 #   error "__cpp_lib_erase_if should not be defined before c++20"
59 # endif
60 
61 # ifndef __cpp_lib_generic_associative_lookup
62 #   error "__cpp_lib_generic_associative_lookup should be defined in c++14"
63 # endif
64 # if __cpp_lib_generic_associative_lookup != 201304L
65 #   error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++14"
66 # endif
67 
68 # ifdef __cpp_lib_node_extract
69 #   error "__cpp_lib_node_extract should not be defined before c++17"
70 # endif
71 
72 # ifdef __cpp_lib_nonmember_container_access
73 #   error "__cpp_lib_nonmember_container_access should not be defined before c++17"
74 # endif
75 
76 #elif TEST_STD_VER == 17
77 
78 # ifndef __cpp_lib_allocator_traits_is_always_equal
79 #   error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17"
PrivateDataPlugin::PrivateData80 # endif
81 # if __cpp_lib_allocator_traits_is_always_equal != 201411L
82 #   error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17"
83 # endif
84 
85 # ifdef __cpp_lib_erase_if
86 #   error "__cpp_lib_erase_if should not be defined before c++20"
87 # endif
88 
89 # ifndef __cpp_lib_generic_associative_lookup
90 #   error "__cpp_lib_generic_associative_lookup should be defined in c++17"
91 # endif
92 # if __cpp_lib_generic_associative_lookup != 201304L
93 #   error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++17"
94 # endif
95 
96 # ifndef __cpp_lib_node_extract
97 #   error "__cpp_lib_node_extract should be defined in c++17"
98 # endif
99 # if __cpp_lib_node_extract != 201606L
100 #   error "__cpp_lib_node_extract should have the value 201606L in c++17"
101 # endif
102 
103 # ifndef __cpp_lib_nonmember_container_access
104 #   error "__cpp_lib_nonmember_container_access should be defined in c++17"
105 # endif
106 # if __cpp_lib_nonmember_container_access != 201411L
107 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17"
108 # endif
109 
110 #elif TEST_STD_VER == 20
111 
112 # ifndef __cpp_lib_allocator_traits_is_always_equal
113 #   error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20"
114 # endif
115 # if __cpp_lib_allocator_traits_is_always_equal != 201411L
116 #   error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20"
117 # endif
118 
119 # ifndef __cpp_lib_erase_if
120 #   error "__cpp_lib_erase_if should be defined in c++20"
121 # endif
122 # if __cpp_lib_erase_if != 202002L
123 #   error "__cpp_lib_erase_if should have the value 202002L in c++20"
124 # endif
125 
126 # ifndef __cpp_lib_generic_associative_lookup
127 #   error "__cpp_lib_generic_associative_lookup should be defined in c++20"
128 # endif
129 # if __cpp_lib_generic_associative_lookup != 201304L
130 #   error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++20"
131 # endif
132 
133 # ifndef __cpp_lib_node_extract
134 #   error "__cpp_lib_node_extract should be defined in c++20"
135 # endif
136 # if __cpp_lib_node_extract != 201606L
137 #   error "__cpp_lib_node_extract should have the value 201606L in c++20"
138 # endif
139 
140 # ifndef __cpp_lib_nonmember_container_access
141 #   error "__cpp_lib_nonmember_container_access should be defined in c++20"
142 # endif
143 # if __cpp_lib_nonmember_container_access != 201411L
144 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20"
145 # endif
146 
147 #elif TEST_STD_VER > 20
148 
149 # ifndef __cpp_lib_allocator_traits_is_always_equal
150 #   error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++2b"
151 # endif
152 # if __cpp_lib_allocator_traits_is_always_equal != 201411L
153 #   error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b"
154 # endif
155 
156 # ifndef __cpp_lib_erase_if
157 #   error "__cpp_lib_erase_if should be defined in c++2b"
158 # endif
159 # if __cpp_lib_erase_if != 202002L
160 #   error "__cpp_lib_erase_if should have the value 202002L in c++2b"
161 # endif
162 
163 # ifndef __cpp_lib_generic_associative_lookup
164 #   error "__cpp_lib_generic_associative_lookup should be defined in c++2b"
165 # endif
166 # if __cpp_lib_generic_associative_lookup != 201304L
167 #   error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++2b"
168 # endif
169 
170 # ifndef __cpp_lib_node_extract
171 #   error "__cpp_lib_node_extract should be defined in c++2b"
172 # endif
173 # if __cpp_lib_node_extract != 201606L
174 #   error "__cpp_lib_node_extract should have the value 201606L in c++2b"
175 # endif
176 
177 # ifndef __cpp_lib_nonmember_container_access
178 #   error "__cpp_lib_nonmember_container_access should be defined in c++2b"
179 # endif
180 # if __cpp_lib_nonmember_container_access != 201411L
181 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b"
182 # endif
183 
184 #endif // TEST_STD_VER > 20
185 
186 int main(int, char**) { return 0; }
187