]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp
Vendor import of libc++ trunk r351319 (just before the release_80
[FreeBSD/FreeBSD.git] / test / std / language.support / support.limits / support.limits.general / utility.version.pass.cpp
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // WARNING: This test was generated by generate_feature_test_macro_components.py
11 // and should not be edited manually.
12
13 // <utility>
14
15 // Test the feature test macros defined by <utility>
16
17 /*  Constant                       Value
18     __cpp_lib_as_const             201510L [C++17]
19     __cpp_lib_constexpr_misc       201811L [C++2a]
20     __cpp_lib_exchange_function    201304L [C++14]
21     __cpp_lib_integer_sequence     201304L [C++14]
22     __cpp_lib_to_chars             201611L [C++17]
23     __cpp_lib_tuples_by_type       201304L [C++14]
24 */
25
26 #include <utility>
27 #include "test_macros.h"
28
29 #if TEST_STD_VER < 14
30
31 # ifdef __cpp_lib_as_const
32 #   error "__cpp_lib_as_const should not be defined before c++17"
33 # endif
34
35 # ifdef __cpp_lib_constexpr_misc
36 #   error "__cpp_lib_constexpr_misc should not be defined before c++2a"
37 # endif
38
39 # ifdef __cpp_lib_exchange_function
40 #   error "__cpp_lib_exchange_function should not be defined before c++14"
41 # endif
42
43 # ifdef __cpp_lib_integer_sequence
44 #   error "__cpp_lib_integer_sequence should not be defined before c++14"
45 # endif
46
47 # ifdef __cpp_lib_to_chars
48 #   error "__cpp_lib_to_chars should not be defined before c++17"
49 # endif
50
51 # ifdef __cpp_lib_tuples_by_type
52 #   error "__cpp_lib_tuples_by_type should not be defined before c++14"
53 # endif
54
55 #elif TEST_STD_VER == 14
56
57 # ifdef __cpp_lib_as_const
58 #   error "__cpp_lib_as_const should not be defined before c++17"
59 # endif
60
61 # ifdef __cpp_lib_constexpr_misc
62 #   error "__cpp_lib_constexpr_misc should not be defined before c++2a"
63 # endif
64
65 # ifndef __cpp_lib_exchange_function
66 #   error "__cpp_lib_exchange_function should be defined in c++14"
67 # endif
68 # if __cpp_lib_exchange_function != 201304L
69 #   error "__cpp_lib_exchange_function should have the value 201304L in c++14"
70 # endif
71
72 # ifndef __cpp_lib_integer_sequence
73 #   error "__cpp_lib_integer_sequence should be defined in c++14"
74 # endif
75 # if __cpp_lib_integer_sequence != 201304L
76 #   error "__cpp_lib_integer_sequence should have the value 201304L in c++14"
77 # endif
78
79 # ifdef __cpp_lib_to_chars
80 #   error "__cpp_lib_to_chars should not be defined before c++17"
81 # endif
82
83 # ifndef __cpp_lib_tuples_by_type
84 #   error "__cpp_lib_tuples_by_type should be defined in c++14"
85 # endif
86 # if __cpp_lib_tuples_by_type != 201304L
87 #   error "__cpp_lib_tuples_by_type should have the value 201304L in c++14"
88 # endif
89
90 #elif TEST_STD_VER == 17
91
92 # ifndef __cpp_lib_as_const
93 #   error "__cpp_lib_as_const should be defined in c++17"
94 # endif
95 # if __cpp_lib_as_const != 201510L
96 #   error "__cpp_lib_as_const should have the value 201510L in c++17"
97 # endif
98
99 # ifdef __cpp_lib_constexpr_misc
100 #   error "__cpp_lib_constexpr_misc should not be defined before c++2a"
101 # endif
102
103 # ifndef __cpp_lib_exchange_function
104 #   error "__cpp_lib_exchange_function should be defined in c++17"
105 # endif
106 # if __cpp_lib_exchange_function != 201304L
107 #   error "__cpp_lib_exchange_function should have the value 201304L in c++17"
108 # endif
109
110 # ifndef __cpp_lib_integer_sequence
111 #   error "__cpp_lib_integer_sequence should be defined in c++17"
112 # endif
113 # if __cpp_lib_integer_sequence != 201304L
114 #   error "__cpp_lib_integer_sequence should have the value 201304L in c++17"
115 # endif
116
117 # if !defined(_LIBCPP_VERSION)
118 #   ifndef __cpp_lib_to_chars
119 #     error "__cpp_lib_to_chars should be defined in c++17"
120 #   endif
121 #   if __cpp_lib_to_chars != 201611L
122 #     error "__cpp_lib_to_chars should have the value 201611L in c++17"
123 #   endif
124 # else // _LIBCPP_VERSION
125 #   ifdef __cpp_lib_to_chars
126 #     error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"
127 #   endif
128 # endif
129
130 # ifndef __cpp_lib_tuples_by_type
131 #   error "__cpp_lib_tuples_by_type should be defined in c++17"
132 # endif
133 # if __cpp_lib_tuples_by_type != 201304L
134 #   error "__cpp_lib_tuples_by_type should have the value 201304L in c++17"
135 # endif
136
137 #elif TEST_STD_VER > 17
138
139 # ifndef __cpp_lib_as_const
140 #   error "__cpp_lib_as_const should be defined in c++2a"
141 # endif
142 # if __cpp_lib_as_const != 201510L
143 #   error "__cpp_lib_as_const should have the value 201510L in c++2a"
144 # endif
145
146 # if !defined(_LIBCPP_VERSION)
147 #   ifndef __cpp_lib_constexpr_misc
148 #     error "__cpp_lib_constexpr_misc should be defined in c++2a"
149 #   endif
150 #   if __cpp_lib_constexpr_misc != 201811L
151 #     error "__cpp_lib_constexpr_misc should have the value 201811L in c++2a"
152 #   endif
153 # else // _LIBCPP_VERSION
154 #   ifdef __cpp_lib_constexpr_misc
155 #     error "__cpp_lib_constexpr_misc should not be defined because it is unimplemented in libc++!"
156 #   endif
157 # endif
158
159 # ifndef __cpp_lib_exchange_function
160 #   error "__cpp_lib_exchange_function should be defined in c++2a"
161 # endif
162 # if __cpp_lib_exchange_function != 201304L
163 #   error "__cpp_lib_exchange_function should have the value 201304L in c++2a"
164 # endif
165
166 # ifndef __cpp_lib_integer_sequence
167 #   error "__cpp_lib_integer_sequence should be defined in c++2a"
168 # endif
169 # if __cpp_lib_integer_sequence != 201304L
170 #   error "__cpp_lib_integer_sequence should have the value 201304L in c++2a"
171 # endif
172
173 # if !defined(_LIBCPP_VERSION)
174 #   ifndef __cpp_lib_to_chars
175 #     error "__cpp_lib_to_chars should be defined in c++2a"
176 #   endif
177 #   if __cpp_lib_to_chars != 201611L
178 #     error "__cpp_lib_to_chars should have the value 201611L in c++2a"
179 #   endif
180 # else // _LIBCPP_VERSION
181 #   ifdef __cpp_lib_to_chars
182 #     error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"
183 #   endif
184 # endif
185
186 # ifndef __cpp_lib_tuples_by_type
187 #   error "__cpp_lib_tuples_by_type should be defined in c++2a"
188 # endif
189 # if __cpp_lib_tuples_by_type != 201304L
190 #   error "__cpp_lib_tuples_by_type should have the value 201304L in c++2a"
191 # endif
192
193 #endif // TEST_STD_VER > 17
194
195 int main() {}