Debian Codegraph @

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

raw
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 // <deque>
15
16 // Test the feature test macros defined by <deque>
17
18 /* Constant Value
19 __cpp_lib_allocator_traits_is_always_equal 201411L [C++17]
20 __cpp_lib_containers_ranges 202202L [C++23]
21 __cpp_lib_default_template_type_for_algorithm_values 202403L [C++26]
22 __cpp_lib_erase_if 202002L [C++20]
23 __cpp_lib_nonmember_container_access 201411L [C++17]
24 */
25
26 #include <deque>
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_containers_ranges
36 # error "__cpp_lib_containers_ranges should not be defined before c++23"
37 # endif
38
39 # ifdef __cpp_lib_default_template_type_for_algorithm_values
40 # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
41 # endif
42
43 # ifdef __cpp_lib_erase_if
44 # error "__cpp_lib_erase_if 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_nonmember_container_access
70 # error "__cpp_lib_nonmember_container_access should not be defined before c++17"
71 # endif
72
73 #elif TEST_STD_VER == 17
74
75 # ifndef __cpp_lib_allocator_traits_is_always_equal
76 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17"
77 # endif
78 # if __cpp_lib_allocator_traits_is_always_equal != 201411L
79 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17"
80 # endif
81
82 # ifdef __cpp_lib_containers_ranges
83 # error "__cpp_lib_containers_ranges should not be defined before c++23"
84 # endif
85
86 # ifdef __cpp_lib_default_template_type_for_algorithm_values
87 # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
88 # endif
89
90 # ifdef __cpp_lib_erase_if
91 # error "__cpp_lib_erase_if should not be defined before c++20"
92 # endif
93
94 # ifndef __cpp_lib_nonmember_container_access
95 # error "__cpp_lib_nonmember_container_access should be defined in c++17"
96 # endif
97 # if __cpp_lib_nonmember_container_access != 201411L
98 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17"
99 # endif
100
101 #elif TEST_STD_VER == 20
102
103 # ifndef __cpp_lib_allocator_traits_is_always_equal
104 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20"
105 # endif
106 # if __cpp_lib_allocator_traits_is_always_equal != 201411L
107 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20"
108 # endif
109
110 # ifdef __cpp_lib_containers_ranges
111 # error "__cpp_lib_containers_ranges should not be defined before c++23"
112 # endif
113
114 # ifdef __cpp_lib_default_template_type_for_algorithm_values
115 # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
116 # endif
117
118 # ifndef __cpp_lib_erase_if
119 # error "__cpp_lib_erase_if should be defined in c++20"
120 # endif
121 # if __cpp_lib_erase_if != 202002L
122 # error "__cpp_lib_erase_if should have the value 202002L in c++20"
123 # endif
124
125 # ifndef __cpp_lib_nonmember_container_access
126 # error "__cpp_lib_nonmember_container_access should be defined in c++20"
127 # endif
128 # if __cpp_lib_nonmember_container_access != 201411L
129 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20"
130 # endif
131
132 #elif TEST_STD_VER == 23
133
134 # ifndef __cpp_lib_allocator_traits_is_always_equal
135 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++23"
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++23"
139 # endif
140
141 # ifndef __cpp_lib_containers_ranges
142 # error "__cpp_lib_containers_ranges should be defined in c++23"
143 # endif
144 # if __cpp_lib_containers_ranges != 202202L
145 # error "__cpp_lib_containers_ranges should have the value 202202L in c++23"
146 # endif
147
148 # ifdef __cpp_lib_default_template_type_for_algorithm_values
149 # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
150 # endif
151
152 # ifndef __cpp_lib_erase_if
153 # error "__cpp_lib_erase_if should be defined in c++23"
154 # endif
155 # if __cpp_lib_erase_if != 202002L
156 # error "__cpp_lib_erase_if should have the value 202002L in c++23"
157 # endif
158
159 # ifndef __cpp_lib_nonmember_container_access
160 # error "__cpp_lib_nonmember_container_access should be defined in c++23"
161 # endif
162 # if __cpp_lib_nonmember_container_access != 201411L
163 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23"
164 # endif
165
166 #elif TEST_STD_VER > 23
167
168 # ifndef __cpp_lib_allocator_traits_is_always_equal
169 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++26"
170 # endif
171 # if __cpp_lib_allocator_traits_is_always_equal != 201411L
172 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++26"
173 # endif
174
175 # ifndef __cpp_lib_containers_ranges
176 # error "__cpp_lib_containers_ranges should be defined in c++26"
177 # endif
178 # if __cpp_lib_containers_ranges != 202202L
179 # error "__cpp_lib_containers_ranges should have the value 202202L in c++26"
180 # endif
181
182 # if !defined(_LIBCPP_VERSION)
183 # ifndef __cpp_lib_default_template_type_for_algorithm_values
184 # error "__cpp_lib_default_template_type_for_algorithm_values should be defined in c++26"
185 # endif
186 # if __cpp_lib_default_template_type_for_algorithm_values != 202403L
187 # error "__cpp_lib_default_template_type_for_algorithm_values should have the value 202403L in c++26"
188 # endif
189 # else // _LIBCPP_VERSION
190 # ifdef __cpp_lib_default_template_type_for_algorithm_values
191 # error "__cpp_lib_default_template_type_for_algorithm_values should not be defined because it is unimplemented in libc++!"
192 # endif
193 # endif
194
195 # ifndef __cpp_lib_erase_if
196 # error "__cpp_lib_erase_if should be defined in c++26"
197 # endif
198 # if __cpp_lib_erase_if != 202002L
199 # error "__cpp_lib_erase_if should have the value 202002L in c++26"
200 # endif
201
202 # ifndef __cpp_lib_nonmember_container_access
203 # error "__cpp_lib_nonmember_container_access should be defined in c++26"
204 # endif
205 # if __cpp_lib_nonmember_container_access != 201411L
206 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26"
207 # endif
208
209 #endif // TEST_STD_VER > 23
210