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// <deque>
13
14// Test the feature test macros defined by <deque>
15
16// clang-format off
17
18#include <deque>
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_nonmember_container_access
40# error "__cpp_lib_nonmember_container_access should not be defined before c++17"
41# endif
42
43#elif TEST_STD_VER == 14
44
45# ifdef __cpp_lib_allocator_traits_is_always_equal
46# error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17"
47# endif
48
49# ifdef __cpp_lib_containers_ranges
50# error "__cpp_lib_containers_ranges should not be defined before c++23"
51# endif
52
53# ifdef __cpp_lib_default_template_type_for_algorithm_values
54# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
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# ifdef __cpp_lib_nonmember_container_access
62# error "__cpp_lib_nonmember_container_access should not be defined before c++17"
63# endif
64
65#elif TEST_STD_VER == 17
66
67# ifndef __cpp_lib_allocator_traits_is_always_equal
68# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17"
69# endif
70# if __cpp_lib_allocator_traits_is_always_equal != 201411L
71# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17"
72# endif
73
74# ifdef __cpp_lib_containers_ranges
75# error "__cpp_lib_containers_ranges should not be defined before c++23"
76# endif
77
78# ifdef __cpp_lib_default_template_type_for_algorithm_values
79# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
80# endif
81
82# ifdef __cpp_lib_erase_if
83# error "__cpp_lib_erase_if should not be defined before c++20"
84# endif
85
86# ifndef __cpp_lib_nonmember_container_access
87# error "__cpp_lib_nonmember_container_access should be defined in c++17"
88# endif
89# if __cpp_lib_nonmember_container_access != 201411L
90# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17"
91# endif
92
93#elif TEST_STD_VER == 20
94
95# ifndef __cpp_lib_allocator_traits_is_always_equal
96# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20"
97# endif
98# if __cpp_lib_allocator_traits_is_always_equal != 201411L
99# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20"
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# ifndef __cpp_lib_erase_if
111# error "__cpp_lib_erase_if should be defined in c++20"
112# endif
113# if __cpp_lib_erase_if != 202002L
114# error "__cpp_lib_erase_if should have the value 202002L in c++20"
115# endif
116
117# ifndef __cpp_lib_nonmember_container_access
118# error "__cpp_lib_nonmember_container_access should be defined in c++20"
119# endif
120# if __cpp_lib_nonmember_container_access != 201411L
121# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20"
122# endif
123
124#elif TEST_STD_VER == 23
125
126# ifndef __cpp_lib_allocator_traits_is_always_equal
127# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++23"
128# endif
129# if __cpp_lib_allocator_traits_is_always_equal != 201411L
130# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++23"
131# endif
132
133# ifndef __cpp_lib_containers_ranges
134# error "__cpp_lib_containers_ranges should be defined in c++23"
135# endif
136# if __cpp_lib_containers_ranges != 202202L
137# error "__cpp_lib_containers_ranges should have the value 202202L in c++23"
138# endif
139
140# ifdef __cpp_lib_default_template_type_for_algorithm_values
141# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
142# endif
143
144# ifndef __cpp_lib_erase_if
145# error "__cpp_lib_erase_if should be defined in c++23"
146# endif
147# if __cpp_lib_erase_if != 202002L
148# error "__cpp_lib_erase_if should have the value 202002L in c++23"
149# endif
150
151# ifndef __cpp_lib_nonmember_container_access
152# error "__cpp_lib_nonmember_container_access should be defined in c++23"
153# endif
154# if __cpp_lib_nonmember_container_access != 201411L
155# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23"
156# endif
157
158#elif TEST_STD_VER > 23
159
160# ifndef __cpp_lib_allocator_traits_is_always_equal
161# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++26"
162# endif
163# if __cpp_lib_allocator_traits_is_always_equal != 201411L
164# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++26"
165# endif
166
167# ifndef __cpp_lib_containers_ranges
168# error "__cpp_lib_containers_ranges should be defined in c++26"
169# endif
170# if __cpp_lib_containers_ranges != 202202L
171# error "__cpp_lib_containers_ranges should have the value 202202L in c++26"
172# endif
173
174# if !defined(_LIBCPP_VERSION)
175# ifndef __cpp_lib_default_template_type_for_algorithm_values
176# error "__cpp_lib_default_template_type_for_algorithm_values should be defined in c++26"
177# endif
178# if __cpp_lib_default_template_type_for_algorithm_values != 202403L
179# error "__cpp_lib_default_template_type_for_algorithm_values should have the value 202403L in c++26"
180# endif
181# else
182# ifdef __cpp_lib_default_template_type_for_algorithm_values
183# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined because it is unimplemented in libc++!"
184# endif
185# endif
186
187# ifndef __cpp_lib_erase_if
188# error "__cpp_lib_erase_if should be defined in c++26"
189# endif
190# if __cpp_lib_erase_if != 202002L
191# error "__cpp_lib_erase_if should have the value 202002L in c++26"
192# endif
193
194# ifndef __cpp_lib_nonmember_container_access
195# error "__cpp_lib_nonmember_container_access should be defined in c++26"
196# endif
197# if __cpp_lib_nonmember_container_access != 201411L
198# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26"
199# endif
200
201#endif // TEST_STD_VER > 23
202
203// clang-format on
204
205

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