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_default_template_type_for_algorithm_values 202403L [C++26]
21 __cpp_lib_erase_if 202002L [C++20]
22 __cpp_lib_nonmember_container_access 201411L [C++17]
23 __cpp_lib_ranges_to_container 202202L [C++23]
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_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_nonmember_container_access
44# error "__cpp_lib_nonmember_container_access should not be defined before c++17"
45# endif
46
47# ifdef __cpp_lib_ranges_to_container
48# error "__cpp_lib_ranges_to_container should not be defined before c++23"
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_default_template_type_for_algorithm_values
58# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
59# endif
60
61# ifdef __cpp_lib_erase_if
62# error "__cpp_lib_erase_if should not be defined before c++20"
63# endif
64
65# ifdef __cpp_lib_nonmember_container_access
66# error "__cpp_lib_nonmember_container_access should not be defined before c++17"
67# endif
68
69# ifdef __cpp_lib_ranges_to_container
70# error "__cpp_lib_ranges_to_container should not be defined before c++23"
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_default_template_type_for_algorithm_values
83# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
84# endif
85
86# ifdef __cpp_lib_erase_if
87# error "__cpp_lib_erase_if should not be defined before c++20"
88# endif
89
90# ifndef __cpp_lib_nonmember_container_access
91# error "__cpp_lib_nonmember_container_access should be defined in c++17"
92# endif
93# if __cpp_lib_nonmember_container_access != 201411L
94# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17"
95# endif
96
97# ifdef __cpp_lib_ranges_to_container
98# error "__cpp_lib_ranges_to_container should not be defined before c++23"
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_default_template_type_for_algorithm_values
111# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
112# endif
113
114# ifndef __cpp_lib_erase_if
115# error "__cpp_lib_erase_if should be defined in c++20"
116# endif
117# if __cpp_lib_erase_if != 202002L
118# error "__cpp_lib_erase_if should have the value 202002L in c++20"
119# endif
120
121# ifndef __cpp_lib_nonmember_container_access
122# error "__cpp_lib_nonmember_container_access should be defined in c++20"
123# endif
124# if __cpp_lib_nonmember_container_access != 201411L
125# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20"
126# endif
127
128# ifdef __cpp_lib_ranges_to_container
129# error "__cpp_lib_ranges_to_container should not be defined before c++23"
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# ifdef __cpp_lib_default_template_type_for_algorithm_values
142# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"
143# endif
144
145# ifndef __cpp_lib_erase_if
146# error "__cpp_lib_erase_if should be defined in c++23"
147# endif
148# if __cpp_lib_erase_if != 202002L
149# error "__cpp_lib_erase_if should have the value 202002L in c++23"
150# endif
151
152# ifndef __cpp_lib_nonmember_container_access
153# error "__cpp_lib_nonmember_container_access should be defined in c++23"
154# endif
155# if __cpp_lib_nonmember_container_access != 201411L
156# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23"
157# endif
158
159# ifndef __cpp_lib_ranges_to_container
160# error "__cpp_lib_ranges_to_container should be defined in c++23"
161# endif
162# if __cpp_lib_ranges_to_container != 202202L
163# error "__cpp_lib_ranges_to_container should have the value 202202L 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# if !defined(_LIBCPP_VERSION)
176# ifndef __cpp_lib_default_template_type_for_algorithm_values
177# error "__cpp_lib_default_template_type_for_algorithm_values should be defined in c++26"
178# endif
179# if __cpp_lib_default_template_type_for_algorithm_values != 202403L
180# error "__cpp_lib_default_template_type_for_algorithm_values should have the value 202403L in c++26"
181# endif
182# else // _LIBCPP_VERSION
183# ifdef __cpp_lib_default_template_type_for_algorithm_values
184# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined because it is unimplemented in libc++!"
185# endif
186# endif
187
188# ifndef __cpp_lib_erase_if
189# error "__cpp_lib_erase_if should be defined in c++26"
190# endif
191# if __cpp_lib_erase_if != 202002L
192# error "__cpp_lib_erase_if should have the value 202002L in c++26"
193# endif
194
195# ifndef __cpp_lib_nonmember_container_access
196# error "__cpp_lib_nonmember_container_access should be defined in c++26"
197# endif
198# if __cpp_lib_nonmember_container_access != 201411L
199# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26"
200# endif
201
202# ifndef __cpp_lib_ranges_to_container
203# error "__cpp_lib_ranges_to_container should be defined in c++26"
204# endif
205# if __cpp_lib_ranges_to_container != 202202L
206# error "__cpp_lib_ranges_to_container should have the value 202202L in c++26"
207# endif
208
209#endif // TEST_STD_VER > 23
210
211

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