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// <stack>
13
14// Test the feature test macros defined by <stack>
15
16// clang-format off
17
18#include <stack>
19#include "test_macros.h"
20
21#if TEST_STD_VER < 14
22
23# ifdef __cpp_lib_adaptor_iterator_pair_constructor
24# error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++23"
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#elif TEST_STD_VER == 14
32
33# ifdef __cpp_lib_adaptor_iterator_pair_constructor
34# error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++23"
35# endif
36
37# ifdef __cpp_lib_containers_ranges
38# error "__cpp_lib_containers_ranges should not be defined before c++23"
39# endif
40
41#elif TEST_STD_VER == 17
42
43# ifdef __cpp_lib_adaptor_iterator_pair_constructor
44# error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++23"
45# endif
46
47# ifdef __cpp_lib_containers_ranges
48# error "__cpp_lib_containers_ranges should not be defined before c++23"
49# endif
50
51#elif TEST_STD_VER == 20
52
53# ifdef __cpp_lib_adaptor_iterator_pair_constructor
54# error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++23"
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#elif TEST_STD_VER == 23
62
63# ifndef __cpp_lib_adaptor_iterator_pair_constructor
64# error "__cpp_lib_adaptor_iterator_pair_constructor should be defined in c++23"
65# endif
66# if __cpp_lib_adaptor_iterator_pair_constructor != 202106L
67# error "__cpp_lib_adaptor_iterator_pair_constructor should have the value 202106L in c++23"
68# endif
69
70# ifndef __cpp_lib_containers_ranges
71# error "__cpp_lib_containers_ranges should be defined in c++23"
72# endif
73# if __cpp_lib_containers_ranges != 202202L
74# error "__cpp_lib_containers_ranges should have the value 202202L in c++23"
75# endif
76
77#elif TEST_STD_VER > 23
78
79# ifndef __cpp_lib_adaptor_iterator_pair_constructor
80# error "__cpp_lib_adaptor_iterator_pair_constructor should be defined in c++26"
81# endif
82# if __cpp_lib_adaptor_iterator_pair_constructor != 202106L
83# error "__cpp_lib_adaptor_iterator_pair_constructor should have the value 202106L in c++26"
84# endif
85
86# ifndef __cpp_lib_containers_ranges
87# error "__cpp_lib_containers_ranges should be defined in c++26"
88# endif
89# if __cpp_lib_containers_ranges != 202202L
90# error "__cpp_lib_containers_ranges should have the value 202202L in c++26"
91# endif
92
93#endif // TEST_STD_VER > 23
94
95// clang-format on
96
97

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