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 | // <queue> |
13 | |
14 | // Test the feature test macros defined by <queue> |
15 | |
16 | // clang-format off |
17 | |
18 | #include <queue> |
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_constexpr_queue |
28 | # error "__cpp_lib_constexpr_queue 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 | #elif TEST_STD_VER == 14 |
36 | |
37 | # ifdef __cpp_lib_adaptor_iterator_pair_constructor |
38 | # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++23" |
39 | # endif |
40 | |
41 | # ifdef __cpp_lib_constexpr_queue |
42 | # error "__cpp_lib_constexpr_queue should not be defined before c++26" |
43 | # endif |
44 | |
45 | # ifdef __cpp_lib_containers_ranges |
46 | # error "__cpp_lib_containers_ranges should not be defined before c++23" |
47 | # endif |
48 | |
49 | #elif TEST_STD_VER == 17 |
50 | |
51 | # ifdef __cpp_lib_adaptor_iterator_pair_constructor |
52 | # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++23" |
53 | # endif |
54 | |
55 | # ifdef __cpp_lib_constexpr_queue |
56 | # error "__cpp_lib_constexpr_queue should not be defined before c++26" |
57 | # endif |
58 | |
59 | # ifdef __cpp_lib_containers_ranges |
60 | # error "__cpp_lib_containers_ranges should not be defined before c++23" |
61 | # endif |
62 | |
63 | #elif TEST_STD_VER == 20 |
64 | |
65 | # ifdef __cpp_lib_adaptor_iterator_pair_constructor |
66 | # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++23" |
67 | # endif |
68 | |
69 | # ifdef __cpp_lib_constexpr_queue |
70 | # error "__cpp_lib_constexpr_queue should not be defined before c++26" |
71 | # endif |
72 | |
73 | # ifdef __cpp_lib_containers_ranges |
74 | # error "__cpp_lib_containers_ranges should not be defined before 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++23" |
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++23" |
84 | # endif |
85 | |
86 | # ifdef __cpp_lib_constexpr_queue |
87 | # error "__cpp_lib_constexpr_queue should not be defined before c++26" |
88 | # endif |
89 | |
90 | # ifndef __cpp_lib_containers_ranges |
91 | # error "__cpp_lib_containers_ranges should be defined in c++23" |
92 | # endif |
93 | # if __cpp_lib_containers_ranges != 202202L |
94 | # error "__cpp_lib_containers_ranges should have the value 202202L in c++23" |
95 | # endif |
96 | |
97 | #elif TEST_STD_VER > 23 |
98 | |
99 | # ifndef __cpp_lib_adaptor_iterator_pair_constructor |
100 | # error "__cpp_lib_adaptor_iterator_pair_constructor should be defined in c++26" |
101 | # endif |
102 | # if __cpp_lib_adaptor_iterator_pair_constructor != 202106L |
103 | # error "__cpp_lib_adaptor_iterator_pair_constructor should have the value 202106L in c++26" |
104 | # endif |
105 | |
106 | # ifndef __cpp_lib_constexpr_queue |
107 | # error "__cpp_lib_constexpr_queue should be defined in c++26" |
108 | # endif |
109 | # if __cpp_lib_constexpr_queue != 202502L |
110 | # error "__cpp_lib_constexpr_queue should have the value 202502L in c++26" |
111 | # endif |
112 | |
113 | # ifndef __cpp_lib_containers_ranges |
114 | # error "__cpp_lib_containers_ranges should be defined in c++26" |
115 | # endif |
116 | # if __cpp_lib_containers_ranges != 202202L |
117 | # error "__cpp_lib_containers_ranges should have the value 202202L in c++26" |
118 | # endif |
119 | |
120 | #endif // TEST_STD_VER > 23 |
121 | |
122 | // clang-format on |
123 | |
124 | |