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 | // <list> |
13 | |
14 | // Test the feature test macros defined by <list> |
15 | |
16 | // clang-format off |
17 | |
18 | #include <list> |
19 | #include "test_macros.h" |
20 | |
21 | #if TEST_STD_VER < 14 |
22 | |
23 | # ifdef __cpp_lib_allocator_traits_is_always_equal |
24 | # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" |
25 | # endif |
26 | |
27 | # ifdef __cpp_lib_containers_ranges |
28 | # error "__cpp_lib_containers_ranges should not be defined before c++23" |
29 | # endif |
30 | |
31 | # ifdef __cpp_lib_default_template_type_for_algorithm_values |
32 | # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26" |
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_incomplete_container_elements |
40 | # error "__cpp_lib_incomplete_container_elements should not be defined before c++17" |
41 | # endif |
42 | |
43 | # ifdef __cpp_lib_list_remove_return_type |
44 | # error "__cpp_lib_list_remove_return_type should not be defined before c++20" |
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_containers_ranges |
58 | # error "__cpp_lib_containers_ranges should not be defined before c++23" |
59 | # endif |
60 | |
61 | # ifdef __cpp_lib_default_template_type_for_algorithm_values |
62 | # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26" |
63 | # endif |
64 | |
65 | # ifdef __cpp_lib_erase_if |
66 | # error "__cpp_lib_erase_if should not be defined before c++20" |
67 | # endif |
68 | |
69 | # ifdef __cpp_lib_incomplete_container_elements |
70 | # error "__cpp_lib_incomplete_container_elements should not be defined before c++17" |
71 | # endif |
72 | |
73 | # ifdef __cpp_lib_list_remove_return_type |
74 | # error "__cpp_lib_list_remove_return_type should not be defined before c++20" |
75 | # endif |
76 | |
77 | # ifdef __cpp_lib_nonmember_container_access |
78 | # error "__cpp_lib_nonmember_container_access should not be defined before c++17" |
79 | # endif |
80 | |
81 | #elif TEST_STD_VER == 17 |
82 | |
83 | # ifndef __cpp_lib_allocator_traits_is_always_equal |
84 | # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" |
85 | # endif |
86 | # if __cpp_lib_allocator_traits_is_always_equal != 201411L |
87 | # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" |
88 | # endif |
89 | |
90 | # ifdef __cpp_lib_containers_ranges |
91 | # error "__cpp_lib_containers_ranges should not be defined before c++23" |
92 | # endif |
93 | |
94 | # ifdef __cpp_lib_default_template_type_for_algorithm_values |
95 | # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26" |
96 | # endif |
97 | |
98 | # ifdef __cpp_lib_erase_if |
99 | # error "__cpp_lib_erase_if should not be defined before c++20" |
100 | # endif |
101 | |
102 | # ifndef __cpp_lib_incomplete_container_elements |
103 | # error "__cpp_lib_incomplete_container_elements should be defined in c++17" |
104 | # endif |
105 | # if __cpp_lib_incomplete_container_elements != 201505L |
106 | # error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++17" |
107 | # endif |
108 | |
109 | # ifdef __cpp_lib_list_remove_return_type |
110 | # error "__cpp_lib_list_remove_return_type should not be defined before c++20" |
111 | # endif |
112 | |
113 | # ifndef __cpp_lib_nonmember_container_access |
114 | # error "__cpp_lib_nonmember_container_access should be defined in c++17" |
115 | # endif |
116 | # if __cpp_lib_nonmember_container_access != 201411L |
117 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" |
118 | # endif |
119 | |
120 | #elif TEST_STD_VER == 20 |
121 | |
122 | # ifndef __cpp_lib_allocator_traits_is_always_equal |
123 | # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20" |
124 | # endif |
125 | # if __cpp_lib_allocator_traits_is_always_equal != 201411L |
126 | # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20" |
127 | # endif |
128 | |
129 | # ifdef __cpp_lib_containers_ranges |
130 | # error "__cpp_lib_containers_ranges should not be defined before c++23" |
131 | # endif |
132 | |
133 | # ifdef __cpp_lib_default_template_type_for_algorithm_values |
134 | # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26" |
135 | # endif |
136 | |
137 | # ifndef __cpp_lib_erase_if |
138 | # error "__cpp_lib_erase_if should be defined in c++20" |
139 | # endif |
140 | # if __cpp_lib_erase_if != 202002L |
141 | # error "__cpp_lib_erase_if should have the value 202002L in c++20" |
142 | # endif |
143 | |
144 | # ifndef __cpp_lib_incomplete_container_elements |
145 | # error "__cpp_lib_incomplete_container_elements should be defined in c++20" |
146 | # endif |
147 | # if __cpp_lib_incomplete_container_elements != 201505L |
148 | # error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++20" |
149 | # endif |
150 | |
151 | # ifndef __cpp_lib_list_remove_return_type |
152 | # error "__cpp_lib_list_remove_return_type should be defined in c++20" |
153 | # endif |
154 | # if __cpp_lib_list_remove_return_type != 201806L |
155 | # error "__cpp_lib_list_remove_return_type should have the value 201806L in c++20" |
156 | # endif |
157 | |
158 | # ifndef __cpp_lib_nonmember_container_access |
159 | # error "__cpp_lib_nonmember_container_access should be defined in c++20" |
160 | # endif |
161 | # if __cpp_lib_nonmember_container_access != 201411L |
162 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20" |
163 | # endif |
164 | |
165 | #elif TEST_STD_VER == 23 |
166 | |
167 | # ifndef __cpp_lib_allocator_traits_is_always_equal |
168 | # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++23" |
169 | # endif |
170 | # if __cpp_lib_allocator_traits_is_always_equal != 201411L |
171 | # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++23" |
172 | # endif |
173 | |
174 | # ifndef __cpp_lib_containers_ranges |
175 | # error "__cpp_lib_containers_ranges should be defined in c++23" |
176 | # endif |
177 | # if __cpp_lib_containers_ranges != 202202L |
178 | # error "__cpp_lib_containers_ranges should have the value 202202L in c++23" |
179 | # endif |
180 | |
181 | # ifdef __cpp_lib_default_template_type_for_algorithm_values |
182 | # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26" |
183 | # endif |
184 | |
185 | # ifndef __cpp_lib_erase_if |
186 | # error "__cpp_lib_erase_if should be defined in c++23" |
187 | # endif |
188 | # if __cpp_lib_erase_if != 202002L |
189 | # error "__cpp_lib_erase_if should have the value 202002L in c++23" |
190 | # endif |
191 | |
192 | # ifndef __cpp_lib_incomplete_container_elements |
193 | # error "__cpp_lib_incomplete_container_elements should be defined in c++23" |
194 | # endif |
195 | # if __cpp_lib_incomplete_container_elements != 201505L |
196 | # error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++23" |
197 | # endif |
198 | |
199 | # ifndef __cpp_lib_list_remove_return_type |
200 | # error "__cpp_lib_list_remove_return_type should be defined in c++23" |
201 | # endif |
202 | # if __cpp_lib_list_remove_return_type != 201806L |
203 | # error "__cpp_lib_list_remove_return_type should have the value 201806L in c++23" |
204 | # endif |
205 | |
206 | # ifndef __cpp_lib_nonmember_container_access |
207 | # error "__cpp_lib_nonmember_container_access should be defined in c++23" |
208 | # endif |
209 | # if __cpp_lib_nonmember_container_access != 201411L |
210 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23" |
211 | # endif |
212 | |
213 | #elif TEST_STD_VER > 23 |
214 | |
215 | # ifndef __cpp_lib_allocator_traits_is_always_equal |
216 | # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++26" |
217 | # endif |
218 | # if __cpp_lib_allocator_traits_is_always_equal != 201411L |
219 | # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++26" |
220 | # endif |
221 | |
222 | # ifndef __cpp_lib_containers_ranges |
223 | # error "__cpp_lib_containers_ranges should be defined in c++26" |
224 | # endif |
225 | # if __cpp_lib_containers_ranges != 202202L |
226 | # error "__cpp_lib_containers_ranges should have the value 202202L in c++26" |
227 | # endif |
228 | |
229 | # if !defined(_LIBCPP_VERSION) |
230 | # ifndef __cpp_lib_default_template_type_for_algorithm_values |
231 | # error "__cpp_lib_default_template_type_for_algorithm_values should be defined in c++26" |
232 | # endif |
233 | # if __cpp_lib_default_template_type_for_algorithm_values != 202403L |
234 | # error "__cpp_lib_default_template_type_for_algorithm_values should have the value 202403L in c++26" |
235 | # endif |
236 | # else |
237 | # ifdef __cpp_lib_default_template_type_for_algorithm_values |
238 | # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined because it is unimplemented in libc++!" |
239 | # endif |
240 | # endif |
241 | |
242 | # ifndef __cpp_lib_erase_if |
243 | # error "__cpp_lib_erase_if should be defined in c++26" |
244 | # endif |
245 | # if __cpp_lib_erase_if != 202002L |
246 | # error "__cpp_lib_erase_if should have the value 202002L in c++26" |
247 | # endif |
248 | |
249 | # ifndef __cpp_lib_incomplete_container_elements |
250 | # error "__cpp_lib_incomplete_container_elements should be defined in c++26" |
251 | # endif |
252 | # if __cpp_lib_incomplete_container_elements != 201505L |
253 | # error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++26" |
254 | # endif |
255 | |
256 | # ifndef __cpp_lib_list_remove_return_type |
257 | # error "__cpp_lib_list_remove_return_type should be defined in c++26" |
258 | # endif |
259 | # if __cpp_lib_list_remove_return_type != 201806L |
260 | # error "__cpp_lib_list_remove_return_type should have the value 201806L in c++26" |
261 | # endif |
262 | |
263 | # ifndef __cpp_lib_nonmember_container_access |
264 | # error "__cpp_lib_nonmember_container_access should be defined in c++26" |
265 | # endif |
266 | # if __cpp_lib_nonmember_container_access != 201411L |
267 | # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26" |
268 | # endif |
269 | |
270 | #endif // TEST_STD_VER > 23 |
271 | |
272 | // clang-format on |
273 | |
274 | |