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_constexpr_list
28# error "__cpp_lib_constexpr_list should not be defined before c++26"
29# endif
30
31# ifdef __cpp_lib_containers_ranges
32# error "__cpp_lib_containers_ranges should not be defined before c++23"
33# endif
34
35# ifdef __cpp_lib_default_template_type_for_algorithm_values
36# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
37# endif
38
39# ifdef __cpp_lib_erase_if
40# error "__cpp_lib_erase_if should not be defined before c++20"
41# endif
42
43# ifdef __cpp_lib_incomplete_container_elements
44# error "__cpp_lib_incomplete_container_elements should not be defined before c++17"
45# endif
46
47# ifdef __cpp_lib_list_remove_return_type
48# error "__cpp_lib_list_remove_return_type should not be defined before c++20"
49# endif
50
51# ifdef __cpp_lib_nonmember_container_access
52# error "__cpp_lib_nonmember_container_access should not be defined before c++17"
53# endif
54
55#elif TEST_STD_VER == 14
56
57# ifdef __cpp_lib_allocator_traits_is_always_equal
58# error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17"
59# endif
60
61# ifdef __cpp_lib_constexpr_list
62# error "__cpp_lib_constexpr_list should not be defined before c++26"
63# endif
64
65# ifdef __cpp_lib_containers_ranges
66# error "__cpp_lib_containers_ranges should not be defined before c++23"
67# endif
68
69# ifdef __cpp_lib_default_template_type_for_algorithm_values
70# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
71# endif
72
73# ifdef __cpp_lib_erase_if
74# error "__cpp_lib_erase_if should not be defined before c++20"
75# endif
76
77# ifdef __cpp_lib_incomplete_container_elements
78# error "__cpp_lib_incomplete_container_elements should not be defined before c++17"
79# endif
80
81# ifdef __cpp_lib_list_remove_return_type
82# error "__cpp_lib_list_remove_return_type should not be defined before c++20"
83# endif
84
85# ifdef __cpp_lib_nonmember_container_access
86# error "__cpp_lib_nonmember_container_access should not be defined before c++17"
87# endif
88
89#elif TEST_STD_VER == 17
90
91# ifndef __cpp_lib_allocator_traits_is_always_equal
92# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17"
93# endif
94# if __cpp_lib_allocator_traits_is_always_equal != 201411L
95# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17"
96# endif
97
98# ifdef __cpp_lib_constexpr_list
99# error "__cpp_lib_constexpr_list should not be defined before c++26"
100# endif
101
102# ifdef __cpp_lib_containers_ranges
103# error "__cpp_lib_containers_ranges should not be defined before c++23"
104# endif
105
106# ifdef __cpp_lib_default_template_type_for_algorithm_values
107# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
108# endif
109
110# ifdef __cpp_lib_erase_if
111# error "__cpp_lib_erase_if should not be defined before c++20"
112# endif
113
114# ifndef __cpp_lib_incomplete_container_elements
115# error "__cpp_lib_incomplete_container_elements should be defined in c++17"
116# endif
117# if __cpp_lib_incomplete_container_elements != 201505L
118# error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++17"
119# endif
120
121# ifdef __cpp_lib_list_remove_return_type
122# error "__cpp_lib_list_remove_return_type should not be defined before c++20"
123# endif
124
125# ifndef __cpp_lib_nonmember_container_access
126# error "__cpp_lib_nonmember_container_access should be defined in c++17"
127# endif
128# if __cpp_lib_nonmember_container_access != 201411L
129# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17"
130# endif
131
132#elif TEST_STD_VER == 20
133
134# ifndef __cpp_lib_allocator_traits_is_always_equal
135# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20"
136# endif
137# if __cpp_lib_allocator_traits_is_always_equal != 201411L
138# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20"
139# endif
140
141# ifdef __cpp_lib_constexpr_list
142# error "__cpp_lib_constexpr_list should not be defined before c++26"
143# endif
144
145# ifdef __cpp_lib_containers_ranges
146# error "__cpp_lib_containers_ranges should not be defined before c++23"
147# endif
148
149# ifdef __cpp_lib_default_template_type_for_algorithm_values
150# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
151# endif
152
153# ifndef __cpp_lib_erase_if
154# error "__cpp_lib_erase_if should be defined in c++20"
155# endif
156# if __cpp_lib_erase_if != 202002L
157# error "__cpp_lib_erase_if should have the value 202002L in c++20"
158# endif
159
160# ifndef __cpp_lib_incomplete_container_elements
161# error "__cpp_lib_incomplete_container_elements should be defined in c++20"
162# endif
163# if __cpp_lib_incomplete_container_elements != 201505L
164# error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++20"
165# endif
166
167# ifndef __cpp_lib_list_remove_return_type
168# error "__cpp_lib_list_remove_return_type should be defined in c++20"
169# endif
170# if __cpp_lib_list_remove_return_type != 201806L
171# error "__cpp_lib_list_remove_return_type should have the value 201806L in c++20"
172# endif
173
174# ifndef __cpp_lib_nonmember_container_access
175# error "__cpp_lib_nonmember_container_access should be defined in c++20"
176# endif
177# if __cpp_lib_nonmember_container_access != 201411L
178# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20"
179# endif
180
181#elif TEST_STD_VER == 23
182
183# ifndef __cpp_lib_allocator_traits_is_always_equal
184# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++23"
185# endif
186# if __cpp_lib_allocator_traits_is_always_equal != 201411L
187# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++23"
188# endif
189
190# ifdef __cpp_lib_constexpr_list
191# error "__cpp_lib_constexpr_list should not be defined before c++26"
192# endif
193
194# ifndef __cpp_lib_containers_ranges
195# error "__cpp_lib_containers_ranges should be defined in c++23"
196# endif
197# if __cpp_lib_containers_ranges != 202202L
198# error "__cpp_lib_containers_ranges should have the value 202202L in c++23"
199# endif
200
201# ifdef __cpp_lib_default_template_type_for_algorithm_values
202# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
203# endif
204
205# ifndef __cpp_lib_erase_if
206# error "__cpp_lib_erase_if should be defined in c++23"
207# endif
208# if __cpp_lib_erase_if != 202002L
209# error "__cpp_lib_erase_if should have the value 202002L in c++23"
210# endif
211
212# ifndef __cpp_lib_incomplete_container_elements
213# error "__cpp_lib_incomplete_container_elements should be defined in c++23"
214# endif
215# if __cpp_lib_incomplete_container_elements != 201505L
216# error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++23"
217# endif
218
219# ifndef __cpp_lib_list_remove_return_type
220# error "__cpp_lib_list_remove_return_type should be defined in c++23"
221# endif
222# if __cpp_lib_list_remove_return_type != 201806L
223# error "__cpp_lib_list_remove_return_type should have the value 201806L in c++23"
224# endif
225
226# ifndef __cpp_lib_nonmember_container_access
227# error "__cpp_lib_nonmember_container_access should be defined in c++23"
228# endif
229# if __cpp_lib_nonmember_container_access != 201411L
230# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23"
231# endif
232
233#elif TEST_STD_VER > 23
234
235# ifndef __cpp_lib_allocator_traits_is_always_equal
236# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++26"
237# endif
238# if __cpp_lib_allocator_traits_is_always_equal != 201411L
239# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++26"
240# endif
241
242# ifndef __cpp_lib_constexpr_list
243# error "__cpp_lib_constexpr_list should be defined in c++26"
244# endif
245# if __cpp_lib_constexpr_list != 202502L
246# error "__cpp_lib_constexpr_list should have the value 202502L in c++26"
247# endif
248
249# ifndef __cpp_lib_containers_ranges
250# error "__cpp_lib_containers_ranges should be defined in c++26"
251# endif
252# if __cpp_lib_containers_ranges != 202202L
253# error "__cpp_lib_containers_ranges should have the value 202202L in c++26"
254# endif
255
256# if !defined(_LIBCPP_VERSION)
257# ifndef __cpp_lib_default_template_type_for_algorithm_values
258# error "__cpp_lib_default_template_type_for_algorithm_values should be defined in c++26"
259# endif
260# if __cpp_lib_default_template_type_for_algorithm_values != 202403L
261# error "__cpp_lib_default_template_type_for_algorithm_values should have the value 202403L in c++26"
262# endif
263# else
264# ifdef __cpp_lib_default_template_type_for_algorithm_values
265# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined because it is unimplemented in libc++!"
266# endif
267# endif
268
269# ifndef __cpp_lib_erase_if
270# error "__cpp_lib_erase_if should be defined in c++26"
271# endif
272# if __cpp_lib_erase_if != 202002L
273# error "__cpp_lib_erase_if should have the value 202002L in c++26"
274# endif
275
276# ifndef __cpp_lib_incomplete_container_elements
277# error "__cpp_lib_incomplete_container_elements should be defined in c++26"
278# endif
279# if __cpp_lib_incomplete_container_elements != 201505L
280# error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++26"
281# endif
282
283# ifndef __cpp_lib_list_remove_return_type
284# error "__cpp_lib_list_remove_return_type should be defined in c++26"
285# endif
286# if __cpp_lib_list_remove_return_type != 201806L
287# error "__cpp_lib_list_remove_return_type should have the value 201806L in c++26"
288# endif
289
290# ifndef __cpp_lib_nonmember_container_access
291# error "__cpp_lib_nonmember_container_access should be defined in c++26"
292# endif
293# if __cpp_lib_nonmember_container_access != 201411L
294# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26"
295# endif
296
297#endif // TEST_STD_VER > 23
298
299// clang-format on
300
301

source code of libcxx/test/std/language.support/support.limits/support.limits.general/list.version.compile.pass.cpp