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 | // UNSUPPORTED: c++03, c++11, c++14, c++17 |
10 | |
11 | // template<class T> |
12 | // concept totally_ordered_with; |
13 | |
14 | #include <concepts> |
15 | |
16 | #include <array> |
17 | #include <deque> |
18 | #include <forward_list> |
19 | #include <list> |
20 | #include <map> |
21 | #include <memory> |
22 | #include <optional> |
23 | #include <set> |
24 | #include <unordered_map> |
25 | #include <unordered_set> |
26 | #include <vector> |
27 | |
28 | #include "compare_types.h" |
29 | #include "test_macros.h" |
30 | |
31 | template <class T, class U> |
32 | constexpr bool check_totally_ordered_with() noexcept { |
33 | constexpr bool result = std::totally_ordered_with<T, U>; |
34 | static_assert(std::totally_ordered_with<U, T> == result); |
35 | static_assert(std::totally_ordered_with<T, U const> == result); |
36 | static_assert(std::totally_ordered_with<T const, U const> == result); |
37 | static_assert(std::totally_ordered_with<T, U const&> == result); |
38 | static_assert(std::totally_ordered_with<T const, U const&> == result); |
39 | static_assert(std::totally_ordered_with<T&, U const> == result); |
40 | static_assert(std::totally_ordered_with<T const&, U const> == result); |
41 | static_assert(std::totally_ordered_with<T&, U const&> == result); |
42 | static_assert(std::totally_ordered_with<T const&, U const&> == result); |
43 | static_assert(std::totally_ordered_with<T, U const&&> == result); |
44 | static_assert(std::totally_ordered_with<T const, U const&&> == result); |
45 | static_assert(std::totally_ordered_with<T&, U const&&> == result); |
46 | static_assert(std::totally_ordered_with<T const&, U const&&> == result); |
47 | static_assert(std::totally_ordered_with<T&&, U const> == result); |
48 | static_assert(std::totally_ordered_with<T const&&, U const> == result); |
49 | static_assert(std::totally_ordered_with<T&&, U const&> == result); |
50 | static_assert(std::totally_ordered_with<T const&&, U const&> == result); |
51 | static_assert(std::totally_ordered_with<T&&, U const&&> == result); |
52 | static_assert(std::totally_ordered_with<T const&&, U const&&> == result); |
53 | return result; |
54 | } |
55 | |
56 | namespace fundamentals { |
57 | static_assert(check_totally_ordered_with<int, int>()); |
58 | static_assert(check_totally_ordered_with<int, bool>()); |
59 | static_assert(check_totally_ordered_with<int, char>()); |
60 | static_assert(check_totally_ordered_with<int, wchar_t>()); |
61 | static_assert(check_totally_ordered_with<int, double>()); |
62 | static_assert(!check_totally_ordered_with<int, int*>()); |
63 | static_assert(!check_totally_ordered_with<int, int[5]>()); |
64 | static_assert(!check_totally_ordered_with<int, int (*)()>()); |
65 | static_assert(!check_totally_ordered_with<int, int (&)()>()); |
66 | |
67 | struct S {}; |
68 | static_assert(!check_totally_ordered_with<int, int S::*>()); |
69 | static_assert(!check_totally_ordered_with<int, int (S::*)()>()); |
70 | static_assert(!check_totally_ordered_with<int, int (S::*)() noexcept>()); |
71 | static_assert(!check_totally_ordered_with<int, int (S::*)() const>()); |
72 | static_assert(!check_totally_ordered_with<int, int (S::*)() const noexcept>()); |
73 | static_assert(!check_totally_ordered_with<int, int (S::*)() volatile>()); |
74 | static_assert( |
75 | !check_totally_ordered_with<int, int (S::*)() volatile noexcept>()); |
76 | static_assert(!check_totally_ordered_with<int, int (S::*)() const volatile>()); |
77 | static_assert( |
78 | !check_totally_ordered_with<int, int (S::*)() const volatile noexcept>()); |
79 | static_assert(!check_totally_ordered_with<int, int (S::*)() &>()); |
80 | static_assert(!check_totally_ordered_with<int, int (S::*)() & noexcept>()); |
81 | static_assert(!check_totally_ordered_with<int, int (S::*)() const&>()); |
82 | static_assert( |
83 | !check_totally_ordered_with<int, int (S::*)() const & noexcept>()); |
84 | static_assert(!check_totally_ordered_with<int, int (S::*)() volatile&>()); |
85 | static_assert( |
86 | !check_totally_ordered_with<int, int (S::*)() volatile & noexcept>()); |
87 | static_assert(!check_totally_ordered_with<int, int (S::*)() const volatile&>()); |
88 | static_assert( |
89 | !check_totally_ordered_with<int, int (S::*)() const volatile & noexcept>()); |
90 | static_assert(!check_totally_ordered_with<int, int (S::*)() &&>()); |
91 | static_assert(!check_totally_ordered_with < int, int (S::*)() && noexcept > ()); |
92 | static_assert(!check_totally_ordered_with<int, int (S::*)() const&&>()); |
93 | static_assert(!check_totally_ordered_with < int, |
94 | int (S::*)() const&& noexcept > ()); |
95 | static_assert(!check_totally_ordered_with<int, int (S::*)() volatile&&>()); |
96 | static_assert(!check_totally_ordered_with < int, |
97 | int (S::*)() volatile&& noexcept > ()); |
98 | static_assert( |
99 | !check_totally_ordered_with<int, int (S::*)() const volatile&&>()); |
100 | static_assert(!check_totally_ordered_with < int, |
101 | int (S::*)() const volatile&& noexcept > ()); |
102 | |
103 | static_assert(check_totally_ordered_with<int*, int*>()); |
104 | static_assert(check_totally_ordered_with<int*, int[5]>()); |
105 | static_assert(!check_totally_ordered_with<int*, int (*)()>()); |
106 | static_assert(!check_totally_ordered_with<int*, int (&)()>()); |
107 | static_assert(!check_totally_ordered_with<int*, int (S::*)()>()); |
108 | static_assert(!check_totally_ordered_with<int*, int (S::*)() noexcept>()); |
109 | static_assert(!check_totally_ordered_with<int*, int (S::*)() const>()); |
110 | static_assert(!check_totally_ordered_with<int*, int (S::*)() const noexcept>()); |
111 | static_assert(!check_totally_ordered_with<int*, int (S::*)() volatile>()); |
112 | static_assert( |
113 | !check_totally_ordered_with<int*, int (S::*)() volatile noexcept>()); |
114 | static_assert(!check_totally_ordered_with<int*, int (S::*)() const volatile>()); |
115 | static_assert( |
116 | !check_totally_ordered_with<int*, int (S::*)() const volatile noexcept>()); |
117 | static_assert(!check_totally_ordered_with<int*, int (S::*)() &>()); |
118 | static_assert(!check_totally_ordered_with<int*, int (S::*)() & noexcept>()); |
119 | static_assert(!check_totally_ordered_with<int*, int (S::*)() const&>()); |
120 | static_assert( |
121 | !check_totally_ordered_with<int*, int (S::*)() const & noexcept>()); |
122 | static_assert(!check_totally_ordered_with<int*, int (S::*)() volatile&>()); |
123 | static_assert( |
124 | !check_totally_ordered_with<int*, int (S::*)() volatile & noexcept>()); |
125 | static_assert( |
126 | !check_totally_ordered_with<int*, int (S::*)() const volatile&>()); |
127 | static_assert(!check_totally_ordered_with<int*, int (S::*)() const volatile & |
128 | noexcept>()); |
129 | static_assert(!check_totally_ordered_with<int*, int (S::*)() &&>()); |
130 | static_assert(!check_totally_ordered_with < int*, |
131 | int (S::*)() && noexcept > ()); |
132 | static_assert(!check_totally_ordered_with<int*, int (S::*)() const&&>()); |
133 | static_assert(!check_totally_ordered_with < int*, |
134 | int (S::*)() const&& noexcept > ()); |
135 | static_assert(!check_totally_ordered_with<int*, int (S::*)() volatile&&>()); |
136 | static_assert(!check_totally_ordered_with < int*, |
137 | int (S::*)() volatile&& noexcept > ()); |
138 | static_assert( |
139 | !check_totally_ordered_with<int*, int (S::*)() const volatile&&>()); |
140 | static_assert(!check_totally_ordered_with < int*, |
141 | int (S::*)() const volatile&& noexcept > ()); |
142 | |
143 | static_assert(check_totally_ordered_with<int[5], int[5]>()); |
144 | static_assert(!check_totally_ordered_with<int[5], int (*)()>()); |
145 | static_assert(!check_totally_ordered_with<int[5], int (&)()>()); |
146 | static_assert(!check_totally_ordered_with<int[5], int (S::*)()>()); |
147 | static_assert(!check_totally_ordered_with<int[5], int (S::*)() noexcept>()); |
148 | static_assert(!check_totally_ordered_with<int[5], int (S::*)() const>()); |
149 | static_assert( |
150 | !check_totally_ordered_with<int[5], int (S::*)() const noexcept>()); |
151 | static_assert(!check_totally_ordered_with<int[5], int (S::*)() volatile>()); |
152 | static_assert( |
153 | !check_totally_ordered_with<int[5], int (S::*)() volatile noexcept>()); |
154 | static_assert( |
155 | !check_totally_ordered_with<int[5], int (S::*)() const volatile>()); |
156 | static_assert(!check_totally_ordered_with< |
157 | int[5], int (S::*)() const volatile noexcept>()); |
158 | static_assert(!check_totally_ordered_with<int[5], int (S::*)() &>()); |
159 | static_assert(!check_totally_ordered_with<int[5], int (S::*)() & noexcept>()); |
160 | static_assert(!check_totally_ordered_with<int[5], int (S::*)() const&>()); |
161 | static_assert( |
162 | !check_totally_ordered_with<int[5], int (S::*)() const & noexcept>()); |
163 | static_assert(!check_totally_ordered_with<int[5], int (S::*)() volatile&>()); |
164 | static_assert( |
165 | !check_totally_ordered_with<int[5], int (S::*)() volatile & noexcept>()); |
166 | static_assert( |
167 | !check_totally_ordered_with<int[5], int (S::*)() const volatile&>()); |
168 | static_assert(!check_totally_ordered_with<int[5], int (S::*)() const volatile & |
169 | noexcept>()); |
170 | static_assert(!check_totally_ordered_with<int[5], int (S::*)() &&>()); |
171 | static_assert(!check_totally_ordered_with < int[5], |
172 | int (S::*)() && noexcept > ()); |
173 | static_assert(!check_totally_ordered_with<int[5], int (S::*)() const&&>()); |
174 | static_assert(!check_totally_ordered_with < int[5], |
175 | int (S::*)() const&& noexcept > ()); |
176 | static_assert(!check_totally_ordered_with<int[5], int (S::*)() volatile&&>()); |
177 | static_assert(!check_totally_ordered_with < int[5], |
178 | int (S::*)() volatile&& noexcept > ()); |
179 | static_assert( |
180 | !check_totally_ordered_with<int[5], int (S::*)() const volatile&&>()); |
181 | static_assert(!check_totally_ordered_with < int[5], |
182 | int (S::*)() const volatile&& noexcept > ()); |
183 | |
184 | static_assert(check_totally_ordered_with<int (*)(), int (*)()>()); |
185 | static_assert(check_totally_ordered_with<int (*)(), int (&)()>()); |
186 | static_assert(!check_totally_ordered_with<int (*)(), int (S::*)()>()); |
187 | static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() noexcept>()); |
188 | static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() const>()); |
189 | static_assert( |
190 | !check_totally_ordered_with<int (*)(), int (S::*)() const noexcept>()); |
191 | static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() volatile>()); |
192 | static_assert( |
193 | !check_totally_ordered_with<int (*)(), int (S::*)() volatile noexcept>()); |
194 | static_assert( |
195 | !check_totally_ordered_with<int (*)(), int (S::*)() const volatile>()); |
196 | static_assert(!check_totally_ordered_with< |
197 | int (*)(), int (S::*)() const volatile noexcept>()); |
198 | static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() &>()); |
199 | static_assert( |
200 | !check_totally_ordered_with<int (*)(), int (S::*)() & noexcept>()); |
201 | static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() const&>()); |
202 | static_assert( |
203 | !check_totally_ordered_with<int (*)(), int (S::*)() const & noexcept>()); |
204 | static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() volatile&>()); |
205 | static_assert( |
206 | !check_totally_ordered_with<int (*)(), int (S::*)() volatile & noexcept>()); |
207 | static_assert( |
208 | !check_totally_ordered_with<int (*)(), int (S::*)() const volatile&>()); |
209 | static_assert(!check_totally_ordered_with< |
210 | int (*)(), int (S::*)() const volatile & noexcept>()); |
211 | static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() &&>()); |
212 | static_assert(!check_totally_ordered_with < int (*)(), |
213 | int (S::*)() && noexcept > ()); |
214 | static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() const&&>()); |
215 | static_assert(!check_totally_ordered_with < int (*)(), |
216 | int (S::*)() const&& noexcept > ()); |
217 | static_assert( |
218 | !check_totally_ordered_with<int (*)(), int (S::*)() volatile&&>()); |
219 | static_assert(!check_totally_ordered_with < int (*)(), |
220 | int (S::*)() volatile&& noexcept > ()); |
221 | static_assert( |
222 | !check_totally_ordered_with<int (*)(), int (S::*)() const volatile&&>()); |
223 | static_assert(!check_totally_ordered_with < int (*)(), |
224 | int (S::*)() const volatile&& noexcept > ()); |
225 | |
226 | static_assert(check_totally_ordered_with<int (&)(), int (&)()>()); |
227 | static_assert(!check_totally_ordered_with<int (&)(), int (S::*)()>()); |
228 | static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() noexcept>()); |
229 | static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() const>()); |
230 | static_assert( |
231 | !check_totally_ordered_with<int (&)(), int (S::*)() const noexcept>()); |
232 | static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() volatile>()); |
233 | static_assert( |
234 | !check_totally_ordered_with<int (&)(), int (S::*)() volatile noexcept>()); |
235 | static_assert( |
236 | !check_totally_ordered_with<int (&)(), int (S::*)() const volatile>()); |
237 | static_assert(!check_totally_ordered_with< |
238 | int (&)(), int (S::*)() const volatile noexcept>()); |
239 | static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() &>()); |
240 | static_assert( |
241 | !check_totally_ordered_with<int (&)(), int (S::*)() & noexcept>()); |
242 | static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() const&>()); |
243 | static_assert( |
244 | !check_totally_ordered_with<int (&)(), int (S::*)() const & noexcept>()); |
245 | static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() volatile&>()); |
246 | static_assert( |
247 | !check_totally_ordered_with<int (&)(), int (S::*)() volatile & noexcept>()); |
248 | static_assert( |
249 | !check_totally_ordered_with<int (&)(), int (S::*)() const volatile&>()); |
250 | static_assert(!check_totally_ordered_with< |
251 | int (&)(), int (S::*)() const volatile & noexcept>()); |
252 | static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() &&>()); |
253 | static_assert(!check_totally_ordered_with < int (&)(), |
254 | int (S::*)() && noexcept > ()); |
255 | static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() const&&>()); |
256 | static_assert(!check_totally_ordered_with < int (&)(), |
257 | int (S::*)() const&& noexcept > ()); |
258 | static_assert( |
259 | !check_totally_ordered_with<int (&)(), int (S::*)() volatile&&>()); |
260 | static_assert(!check_totally_ordered_with < int (&)(), |
261 | int (S::*)() volatile&& noexcept > ()); |
262 | static_assert( |
263 | !check_totally_ordered_with<int (&)(), int (S::*)() const volatile&&>()); |
264 | static_assert(!check_totally_ordered_with < int (&)(), |
265 | int (S::*)() const volatile&& noexcept > ()); |
266 | |
267 | static_assert(!check_totally_ordered_with<int (S::*)(), int (S::*)()>()); |
268 | static_assert( |
269 | !check_totally_ordered_with<int (S::*)(), int (S::*)() noexcept>()); |
270 | static_assert(!check_totally_ordered_with<int (S::*)(), int (S::*)() const>()); |
271 | static_assert( |
272 | !check_totally_ordered_with<int (S::*)(), int (S::*)() const noexcept>()); |
273 | static_assert( |
274 | !check_totally_ordered_with<int (S::*)(), int (S::*)() volatile>()); |
275 | static_assert(!check_totally_ordered_with<int (S::*)(), |
276 | int (S::*)() volatile noexcept>()); |
277 | static_assert( |
278 | !check_totally_ordered_with<int (S::*)(), int (S::*)() const volatile>()); |
279 | static_assert(!check_totally_ordered_with< |
280 | int (S::*)(), int (S::*)() const volatile noexcept>()); |
281 | static_assert(!check_totally_ordered_with<int (S::*)(), int (S::*)() &>()); |
282 | static_assert( |
283 | !check_totally_ordered_with<int (S::*)(), int (S::*)() & noexcept>()); |
284 | static_assert(!check_totally_ordered_with<int (S::*)(), int (S::*)() const&>()); |
285 | static_assert( |
286 | !check_totally_ordered_with<int (S::*)(), int (S::*)() const & noexcept>()); |
287 | static_assert( |
288 | !check_totally_ordered_with<int (S::*)(), int (S::*)() volatile&>()); |
289 | static_assert(!check_totally_ordered_with<int (S::*)(), |
290 | int (S::*)() volatile & noexcept>()); |
291 | static_assert( |
292 | !check_totally_ordered_with<int (S::*)(), int (S::*)() const volatile&>()); |
293 | static_assert(!check_totally_ordered_with< |
294 | int (S::*)(), int (S::*)() const volatile & noexcept>()); |
295 | static_assert(!check_totally_ordered_with<int (S::*)(), int (S::*)() &&>()); |
296 | static_assert(!check_totally_ordered_with < int (S::*)(), |
297 | int (S::*)() && noexcept > ()); |
298 | static_assert( |
299 | !check_totally_ordered_with<int (S::*)(), int (S::*)() const&&>()); |
300 | static_assert(!check_totally_ordered_with < int (S::*)(), |
301 | int (S::*)() const&& noexcept > ()); |
302 | static_assert( |
303 | !check_totally_ordered_with<int (S::*)(), int (S::*)() volatile&&>()); |
304 | static_assert(!check_totally_ordered_with < int (S::*)(), |
305 | int (S::*)() volatile&& noexcept > ()); |
306 | static_assert( |
307 | !check_totally_ordered_with<int (S::*)(), int (S::*)() const volatile&&>()); |
308 | static_assert(!check_totally_ordered_with < int (S::*)(), |
309 | int (S::*)() const volatile&& noexcept > ()); |
310 | |
311 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
312 | int (S::*)() noexcept>()); |
313 | static_assert( |
314 | !check_totally_ordered_with<int (S::*)() noexcept, int (S::*)() const>()); |
315 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
316 | int (S::*)() const noexcept>()); |
317 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
318 | int (S::*)() volatile>()); |
319 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
320 | int (S::*)() volatile noexcept>()); |
321 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
322 | int (S::*)() const volatile>()); |
323 | static_assert(!check_totally_ordered_with< |
324 | int (S::*)() noexcept, int (S::*)() const volatile noexcept>()); |
325 | static_assert( |
326 | !check_totally_ordered_with<int (S::*)() noexcept, int (S::*)() &>()); |
327 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
328 | int (S::*)() & noexcept>()); |
329 | static_assert( |
330 | !check_totally_ordered_with<int (S::*)() noexcept, int (S::*)() const&>()); |
331 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
332 | int (S::*)() const & noexcept>()); |
333 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
334 | int (S::*)() volatile&>()); |
335 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
336 | int (S::*)() volatile & noexcept>()); |
337 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
338 | int (S::*)() const volatile&>()); |
339 | static_assert(!check_totally_ordered_with< |
340 | int (S::*)() noexcept, int (S::*)() const volatile & noexcept>()); |
341 | static_assert( |
342 | !check_totally_ordered_with<int (S::*)() noexcept, int (S::*)() &&>()); |
343 | static_assert(!check_totally_ordered_with < int (S::*)() noexcept, |
344 | int (S::*)() && noexcept > ()); |
345 | static_assert( |
346 | !check_totally_ordered_with<int (S::*)() noexcept, int (S::*)() const&&>()); |
347 | static_assert(!check_totally_ordered_with < int (S::*)() noexcept, |
348 | int (S::*)() const&& noexcept > ()); |
349 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
350 | int (S::*)() volatile&&>()); |
351 | static_assert(!check_totally_ordered_with < int (S::*)() noexcept, |
352 | int (S::*)() volatile&& noexcept > ()); |
353 | static_assert(!check_totally_ordered_with<int (S::*)() noexcept, |
354 | int (S::*)() const volatile&&>()); |
355 | static_assert(!check_totally_ordered_with < int (S::*)() noexcept, |
356 | int (S::*)() const volatile&& noexcept > ()); |
357 | |
358 | static_assert( |
359 | !check_totally_ordered_with<int (S::*)() const, int (S::*)() const>()); |
360 | static_assert(!check_totally_ordered_with<int (S::*)() const, |
361 | int (S::*)() const noexcept>()); |
362 | static_assert( |
363 | !check_totally_ordered_with<int (S::*)() const, int (S::*)() volatile>()); |
364 | static_assert(!check_totally_ordered_with<int (S::*)() const, |
365 | int (S::*)() volatile noexcept>()); |
366 | static_assert(!check_totally_ordered_with<int (S::*)() const, |
367 | int (S::*)() const volatile>()); |
368 | static_assert(!check_totally_ordered_with< |
369 | int (S::*)() const, int (S::*)() const volatile noexcept>()); |
370 | static_assert( |
371 | !check_totally_ordered_with<int (S::*)() const, int (S::*)() &>()); |
372 | static_assert( |
373 | !check_totally_ordered_with<int (S::*)() const, int (S::*)() & noexcept>()); |
374 | static_assert( |
375 | !check_totally_ordered_with<int (S::*)() const, int (S::*)() const&>()); |
376 | static_assert(!check_totally_ordered_with<int (S::*)() const, |
377 | int (S::*)() const & noexcept>()); |
378 | static_assert( |
379 | !check_totally_ordered_with<int (S::*)() const, int (S::*)() volatile&>()); |
380 | static_assert(!check_totally_ordered_with<int (S::*)() const, |
381 | int (S::*)() volatile & noexcept>()); |
382 | static_assert(!check_totally_ordered_with<int (S::*)() const, |
383 | int (S::*)() const volatile&>()); |
384 | static_assert(!check_totally_ordered_with< |
385 | int (S::*)() const, int (S::*)() const volatile & noexcept>()); |
386 | static_assert( |
387 | !check_totally_ordered_with<int (S::*)() const, int (S::*)() &&>()); |
388 | static_assert(!check_totally_ordered_with < int (S::*)() const, |
389 | int (S::*)() && noexcept > ()); |
390 | static_assert( |
391 | !check_totally_ordered_with<int (S::*)() const, int (S::*)() const&&>()); |
392 | static_assert(!check_totally_ordered_with < int (S::*)() const, |
393 | int (S::*)() const&& noexcept > ()); |
394 | static_assert( |
395 | !check_totally_ordered_with<int (S::*)() const, int (S::*)() volatile&&>()); |
396 | static_assert(!check_totally_ordered_with < int (S::*)() const, |
397 | int (S::*)() volatile&& noexcept > ()); |
398 | static_assert(!check_totally_ordered_with<int (S::*)() const, |
399 | int (S::*)() const volatile&&>()); |
400 | static_assert(!check_totally_ordered_with < int (S::*)() const, |
401 | int (S::*)() const volatile&& noexcept > ()); |
402 | |
403 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
404 | int (S::*)() const noexcept>()); |
405 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
406 | int (S::*)() volatile>()); |
407 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
408 | int (S::*)() volatile noexcept>()); |
409 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
410 | int (S::*)() const volatile>()); |
411 | static_assert( |
412 | !check_totally_ordered_with<int (S::*)() const noexcept, |
413 | int (S::*)() const volatile noexcept>()); |
414 | static_assert( |
415 | !check_totally_ordered_with<int (S::*)() const noexcept, int (S::*)() &>()); |
416 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
417 | int (S::*)() & noexcept>()); |
418 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
419 | int (S::*)() const&>()); |
420 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
421 | int (S::*)() const & noexcept>()); |
422 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
423 | int (S::*)() volatile&>()); |
424 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
425 | int (S::*)() volatile & noexcept>()); |
426 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
427 | int (S::*)() const volatile&>()); |
428 | static_assert( |
429 | !check_totally_ordered_with<int (S::*)() const noexcept, |
430 | int (S::*)() const volatile & noexcept>()); |
431 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
432 | int (S::*)() &&>()); |
433 | static_assert(!check_totally_ordered_with < int (S::*)() const noexcept, |
434 | int (S::*)() && noexcept > ()); |
435 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
436 | int (S::*)() const&&>()); |
437 | static_assert(!check_totally_ordered_with < int (S::*)() const noexcept, |
438 | int (S::*)() const&& noexcept > ()); |
439 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
440 | int (S::*)() volatile&&>()); |
441 | static_assert(!check_totally_ordered_with < int (S::*)() const noexcept, |
442 | int (S::*)() volatile&& noexcept > ()); |
443 | static_assert(!check_totally_ordered_with<int (S::*)() const noexcept, |
444 | int (S::*)() const volatile&&>()); |
445 | static_assert(!check_totally_ordered_with < int (S::*)() const noexcept, |
446 | int (S::*)() const volatile&& noexcept > ()); |
447 | |
448 | static_assert(!check_totally_ordered_with<int (S::*)() volatile, |
449 | int (S::*)() volatile>()); |
450 | static_assert(!check_totally_ordered_with<int (S::*)() volatile, |
451 | int (S::*)() volatile noexcept>()); |
452 | static_assert(!check_totally_ordered_with<int (S::*)() volatile, |
453 | int (S::*)() const volatile>()); |
454 | static_assert(!check_totally_ordered_with< |
455 | int (S::*)() volatile, int (S::*)() const volatile noexcept>()); |
456 | static_assert( |
457 | !check_totally_ordered_with<int (S::*)() volatile, int (S::*)() &>()); |
458 | static_assert(!check_totally_ordered_with<int (S::*)() volatile, |
459 | int (S::*)() & noexcept>()); |
460 | static_assert( |
461 | !check_totally_ordered_with<int (S::*)() volatile, int (S::*)() const&>()); |
462 | static_assert(!check_totally_ordered_with<int (S::*)() volatile, |
463 | int (S::*)() const & noexcept>()); |
464 | static_assert(!check_totally_ordered_with<int (S::*)() volatile, |
465 | int (S::*)() volatile&>()); |
466 | static_assert(!check_totally_ordered_with<int (S::*)() volatile, |
467 | int (S::*)() volatile & noexcept>()); |
468 | static_assert(!check_totally_ordered_with<int (S::*)() volatile, |
469 | int (S::*)() const volatile&>()); |
470 | static_assert(!check_totally_ordered_with< |
471 | int (S::*)() volatile, int (S::*)() const volatile & noexcept>()); |
472 | static_assert( |
473 | !check_totally_ordered_with<int (S::*)() volatile, int (S::*)() &&>()); |
474 | static_assert(!check_totally_ordered_with < int (S::*)() volatile, |
475 | int (S::*)() && noexcept > ()); |
476 | static_assert( |
477 | !check_totally_ordered_with<int (S::*)() volatile, int (S::*)() const&&>()); |
478 | static_assert(!check_totally_ordered_with < int (S::*)() volatile, |
479 | int (S::*)() const&& noexcept > ()); |
480 | static_assert(!check_totally_ordered_with<int (S::*)() volatile, |
481 | int (S::*)() volatile&&>()); |
482 | static_assert(!check_totally_ordered_with < int (S::*)() volatile, |
483 | int (S::*)() volatile&& noexcept > ()); |
484 | static_assert(!check_totally_ordered_with<int (S::*)() volatile, |
485 | int (S::*)() const volatile&&>()); |
486 | static_assert(!check_totally_ordered_with < int (S::*)() volatile, |
487 | int (S::*)() const volatile&& noexcept > ()); |
488 | |
489 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
490 | int (S::*)() volatile noexcept>()); |
491 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
492 | int (S::*)() const volatile>()); |
493 | static_assert( |
494 | !check_totally_ordered_with<int (S::*)() volatile noexcept, |
495 | int (S::*)() const volatile noexcept>()); |
496 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
497 | int (S::*)() &>()); |
498 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
499 | int (S::*)() & noexcept>()); |
500 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
501 | int (S::*)() const&>()); |
502 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
503 | int (S::*)() const & noexcept>()); |
504 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
505 | int (S::*)() volatile&>()); |
506 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
507 | int (S::*)() volatile & noexcept>()); |
508 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
509 | int (S::*)() const volatile&>()); |
510 | static_assert( |
511 | !check_totally_ordered_with<int (S::*)() volatile noexcept, |
512 | int (S::*)() const volatile & noexcept>()); |
513 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
514 | int (S::*)() &&>()); |
515 | static_assert(!check_totally_ordered_with < int (S::*)() volatile noexcept, |
516 | int (S::*)() && noexcept > ()); |
517 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
518 | int (S::*)() const&&>()); |
519 | static_assert(!check_totally_ordered_with < int (S::*)() volatile noexcept, |
520 | int (S::*)() const&& noexcept > ()); |
521 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
522 | int (S::*)() volatile&&>()); |
523 | static_assert(!check_totally_ordered_with < int (S::*)() volatile noexcept, |
524 | int (S::*)() volatile&& noexcept > ()); |
525 | static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept, |
526 | int (S::*)() const volatile&&>()); |
527 | static_assert(!check_totally_ordered_with < int (S::*)() volatile noexcept, |
528 | int (S::*)() const volatile&& noexcept > ()); |
529 | |
530 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile, |
531 | int (S::*)() const volatile>()); |
532 | static_assert( |
533 | !check_totally_ordered_with<int (S::*)() const volatile, |
534 | int (S::*)() const volatile noexcept>()); |
535 | static_assert( |
536 | !check_totally_ordered_with<int (S::*)() const volatile, int (S::*)() &>()); |
537 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile, |
538 | int (S::*)() & noexcept>()); |
539 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile, |
540 | int (S::*)() const&>()); |
541 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile, |
542 | int (S::*)() const & noexcept>()); |
543 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile, |
544 | int (S::*)() volatile&>()); |
545 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile, |
546 | int (S::*)() volatile & noexcept>()); |
547 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile, |
548 | int (S::*)() const volatile&>()); |
549 | static_assert( |
550 | !check_totally_ordered_with<int (S::*)() const volatile, |
551 | int (S::*)() const volatile & noexcept>()); |
552 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile, |
553 | int (S::*)() &&>()); |
554 | static_assert(!check_totally_ordered_with < int (S::*)() const volatile, |
555 | int (S::*)() && noexcept > ()); |
556 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile, |
557 | int (S::*)() const&&>()); |
558 | static_assert(!check_totally_ordered_with < int (S::*)() const volatile, |
559 | int (S::*)() const&& noexcept > ()); |
560 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile, |
561 | int (S::*)() volatile&&>()); |
562 | static_assert(!check_totally_ordered_with < int (S::*)() const volatile, |
563 | int (S::*)() volatile&& noexcept > ()); |
564 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile, |
565 | int (S::*)() const volatile&&>()); |
566 | static_assert(!check_totally_ordered_with < int (S::*)() const volatile, |
567 | int (S::*)() const volatile&& noexcept > ()); |
568 | |
569 | static_assert( |
570 | !check_totally_ordered_with<int (S::*)() const volatile noexcept, |
571 | int (S::*)() const volatile noexcept>()); |
572 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept, |
573 | int (S::*)() &>()); |
574 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept, |
575 | int (S::*)() & noexcept>()); |
576 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept, |
577 | int (S::*)() const&>()); |
578 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept, |
579 | int (S::*)() const & noexcept>()); |
580 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept, |
581 | int (S::*)() volatile&>()); |
582 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept, |
583 | int (S::*)() volatile & noexcept>()); |
584 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept, |
585 | int (S::*)() const volatile&>()); |
586 | static_assert( |
587 | !check_totally_ordered_with<int (S::*)() const volatile noexcept, |
588 | int (S::*)() const volatile & noexcept>()); |
589 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept, |
590 | int (S::*)() &&>()); |
591 | static_assert(!check_totally_ordered_with < int (S::*)() |
592 | const volatile noexcept, |
593 | int (S::*)() && noexcept > ()); |
594 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept, |
595 | int (S::*)() const&&>()); |
596 | static_assert(!check_totally_ordered_with < int (S::*)() |
597 | const volatile noexcept, |
598 | int (S::*)() const&& noexcept > ()); |
599 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept, |
600 | int (S::*)() volatile&&>()); |
601 | static_assert(!check_totally_ordered_with < int (S::*)() |
602 | const volatile noexcept, |
603 | int (S::*)() volatile&& noexcept > ()); |
604 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept, |
605 | int (S::*)() const volatile&&>()); |
606 | static_assert(!check_totally_ordered_with < int (S::*)() |
607 | const volatile noexcept, |
608 | int (S::*)() const volatile&& noexcept > ()); |
609 | |
610 | static_assert(!check_totally_ordered_with<int (S::*)() &, int (S::*)() &>()); |
611 | static_assert( |
612 | !check_totally_ordered_with<int (S::*)() &, int (S::*)() & noexcept>()); |
613 | static_assert( |
614 | !check_totally_ordered_with<int (S::*)() &, int (S::*)() const&>()); |
615 | static_assert(!check_totally_ordered_with<int (S::*)() &, |
616 | int (S::*)() const & noexcept>()); |
617 | static_assert( |
618 | !check_totally_ordered_with<int (S::*)() &, int (S::*)() volatile&>()); |
619 | static_assert(!check_totally_ordered_with<int (S::*)() &, |
620 | int (S::*)() volatile & noexcept>()); |
621 | static_assert(!check_totally_ordered_with<int (S::*)() &, |
622 | int (S::*)() const volatile&>()); |
623 | static_assert(!check_totally_ordered_with< |
624 | int (S::*)() &, int (S::*)() const volatile & noexcept>()); |
625 | static_assert(!check_totally_ordered_with<int (S::*)() &, int (S::*)() &&>()); |
626 | static_assert(!check_totally_ordered_with < int (S::*)() &, |
627 | int (S::*)() && noexcept > ()); |
628 | static_assert( |
629 | !check_totally_ordered_with<int (S::*)() &, int (S::*)() const&&>()); |
630 | static_assert(!check_totally_ordered_with < int (S::*)() &, |
631 | int (S::*)() const&& noexcept > ()); |
632 | static_assert( |
633 | !check_totally_ordered_with<int (S::*)() &, int (S::*)() volatile&&>()); |
634 | static_assert(!check_totally_ordered_with < int (S::*)() &, |
635 | int (S::*)() volatile&& noexcept > ()); |
636 | static_assert(!check_totally_ordered_with<int (S::*)() &, |
637 | int (S::*)() const volatile&&>()); |
638 | static_assert(!check_totally_ordered_with < int (S::*)() &, |
639 | int (S::*)() const volatile&& noexcept > ()); |
640 | |
641 | static_assert(!check_totally_ordered_with<int (S::*)() & noexcept, |
642 | int (S::*)() & noexcept>()); |
643 | static_assert(!check_totally_ordered_with<int (S::*)() & noexcept, |
644 | int (S::*)() const&>()); |
645 | static_assert(!check_totally_ordered_with<int (S::*)() & noexcept, |
646 | int (S::*)() const & noexcept>()); |
647 | static_assert(!check_totally_ordered_with<int (S::*)() & noexcept, |
648 | int (S::*)() volatile&>()); |
649 | static_assert(!check_totally_ordered_with<int (S::*)() & noexcept, |
650 | int (S::*)() volatile & noexcept>()); |
651 | static_assert(!check_totally_ordered_with<int (S::*)() & noexcept, |
652 | int (S::*)() const volatile&>()); |
653 | static_assert( |
654 | !check_totally_ordered_with<int (S::*)() & noexcept, |
655 | int (S::*)() const volatile & noexcept>()); |
656 | static_assert( |
657 | !check_totally_ordered_with<int (S::*)() & noexcept, int (S::*)() &&>()); |
658 | static_assert(!check_totally_ordered_with < int (S::*)() & noexcept, |
659 | int (S::*)() && noexcept > ()); |
660 | static_assert(!check_totally_ordered_with<int (S::*)() & noexcept, |
661 | int (S::*)() const&&>()); |
662 | static_assert(!check_totally_ordered_with < int (S::*)() & noexcept, |
663 | int (S::*)() const&& noexcept > ()); |
664 | static_assert(!check_totally_ordered_with<int (S::*)() & noexcept, |
665 | int (S::*)() volatile&&>()); |
666 | static_assert(!check_totally_ordered_with < int (S::*)() & noexcept, |
667 | int (S::*)() volatile&& noexcept > ()); |
668 | static_assert(!check_totally_ordered_with<int (S::*)() & noexcept, |
669 | int (S::*)() const volatile&&>()); |
670 | static_assert(!check_totally_ordered_with < int (S::*)() & noexcept, |
671 | int (S::*)() const volatile&& noexcept > ()); |
672 | |
673 | static_assert( |
674 | !check_totally_ordered_with<int (S::*)() const&, int (S::*)() const&>()); |
675 | static_assert(!check_totally_ordered_with<int (S::*)() const&, |
676 | int (S::*)() const & noexcept>()); |
677 | static_assert( |
678 | !check_totally_ordered_with<int (S::*)() const&, int (S::*)() volatile&>()); |
679 | static_assert(!check_totally_ordered_with<int (S::*)() const&, |
680 | int (S::*)() volatile & noexcept>()); |
681 | static_assert(!check_totally_ordered_with<int (S::*)() const&, |
682 | int (S::*)() const volatile&>()); |
683 | static_assert(!check_totally_ordered_with< |
684 | int (S::*)() const&, int (S::*)() const volatile & noexcept>()); |
685 | static_assert( |
686 | !check_totally_ordered_with<int (S::*)() const&, int (S::*)() &&>()); |
687 | static_assert(!check_totally_ordered_with < int (S::*)() const&, |
688 | int (S::*)() && noexcept > ()); |
689 | static_assert( |
690 | !check_totally_ordered_with<int (S::*)() const&, int (S::*)() const&&>()); |
691 | static_assert(!check_totally_ordered_with < int (S::*)() const&, |
692 | int (S::*)() const&& noexcept > ()); |
693 | static_assert(!check_totally_ordered_with<int (S::*)() const&, |
694 | int (S::*)() volatile&&>()); |
695 | static_assert(!check_totally_ordered_with < int (S::*)() const&, |
696 | int (S::*)() volatile&& noexcept > ()); |
697 | static_assert(!check_totally_ordered_with<int (S::*)() const&, |
698 | int (S::*)() const volatile&&>()); |
699 | static_assert(!check_totally_ordered_with < int (S::*)() const&, |
700 | int (S::*)() const volatile&& noexcept > ()); |
701 | |
702 | static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept, |
703 | int (S::*)() const & noexcept>()); |
704 | static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept, |
705 | int (S::*)() volatile&>()); |
706 | static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept, |
707 | int (S::*)() volatile & noexcept>()); |
708 | static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept, |
709 | int (S::*)() const volatile&>()); |
710 | static_assert( |
711 | !check_totally_ordered_with<int (S::*)() const & noexcept, |
712 | int (S::*)() const volatile & noexcept>()); |
713 | static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept, |
714 | int (S::*)() &&>()); |
715 | static_assert(!check_totally_ordered_with < int (S::*)() const& noexcept, |
716 | int (S::*)() && noexcept > ()); |
717 | static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept, |
718 | int (S::*)() const&&>()); |
719 | static_assert(!check_totally_ordered_with < int (S::*)() const& noexcept, |
720 | int (S::*)() const&& noexcept > ()); |
721 | static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept, |
722 | int (S::*)() volatile&&>()); |
723 | static_assert(!check_totally_ordered_with < int (S::*)() const& noexcept, |
724 | int (S::*)() volatile&& noexcept > ()); |
725 | static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept, |
726 | int (S::*)() const volatile&&>()); |
727 | static_assert(!check_totally_ordered_with < int (S::*)() const& noexcept, |
728 | int (S::*)() const volatile&& noexcept > ()); |
729 | |
730 | static_assert(!check_totally_ordered_with<int (S::*)() volatile&, |
731 | int (S::*)() volatile&>()); |
732 | static_assert(!check_totally_ordered_with<int (S::*)() volatile&, |
733 | int (S::*)() volatile & noexcept>()); |
734 | static_assert(!check_totally_ordered_with<int (S::*)() volatile&, |
735 | int (S::*)() const volatile&>()); |
736 | static_assert( |
737 | !check_totally_ordered_with<int (S::*)() volatile&, |
738 | int (S::*)() const volatile & noexcept>()); |
739 | static_assert( |
740 | !check_totally_ordered_with<int (S::*)() volatile&, int (S::*)() &&>()); |
741 | static_assert(!check_totally_ordered_with < int (S::*)() volatile&, |
742 | int (S::*)() && noexcept > ()); |
743 | static_assert(!check_totally_ordered_with<int (S::*)() volatile&, |
744 | int (S::*)() const&&>()); |
745 | static_assert(!check_totally_ordered_with < int (S::*)() volatile&, |
746 | int (S::*)() const&& noexcept > ()); |
747 | static_assert(!check_totally_ordered_with<int (S::*)() volatile&, |
748 | int (S::*)() volatile&&>()); |
749 | static_assert(!check_totally_ordered_with < int (S::*)() volatile&, |
750 | int (S::*)() volatile&& noexcept > ()); |
751 | static_assert(!check_totally_ordered_with<int (S::*)() volatile&, |
752 | int (S::*)() const volatile&&>()); |
753 | static_assert(!check_totally_ordered_with < int (S::*)() volatile&, |
754 | int (S::*)() const volatile&& noexcept > ()); |
755 | |
756 | static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept, |
757 | int (S::*)() volatile & noexcept>()); |
758 | static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept, |
759 | int (S::*)() const volatile&>()); |
760 | static_assert( |
761 | !check_totally_ordered_with<int (S::*)() volatile & noexcept, |
762 | int (S::*)() const volatile & noexcept>()); |
763 | static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept, |
764 | int (S::*)() &&>()); |
765 | static_assert(!check_totally_ordered_with < int (S::*)() volatile& noexcept, |
766 | int (S::*)() && noexcept > ()); |
767 | static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept, |
768 | int (S::*)() const&&>()); |
769 | static_assert(!check_totally_ordered_with < int (S::*)() volatile& noexcept, |
770 | int (S::*)() const&& noexcept > ()); |
771 | static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept, |
772 | int (S::*)() volatile&&>()); |
773 | static_assert(!check_totally_ordered_with < int (S::*)() volatile& noexcept, |
774 | int (S::*)() volatile&& noexcept > ()); |
775 | static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept, |
776 | int (S::*)() const volatile&&>()); |
777 | static_assert(!check_totally_ordered_with < int (S::*)() volatile& noexcept, |
778 | int (S::*)() const volatile&& noexcept > ()); |
779 | |
780 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile&, |
781 | int (S::*)() const volatile&>()); |
782 | static_assert( |
783 | !check_totally_ordered_with<int (S::*)() const volatile&, |
784 | int (S::*)() const volatile & noexcept>()); |
785 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile&, |
786 | int (S::*)() &&>()); |
787 | static_assert(!check_totally_ordered_with < int (S::*)() const volatile&, |
788 | int (S::*)() && noexcept > ()); |
789 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile&, |
790 | int (S::*)() const&&>()); |
791 | static_assert(!check_totally_ordered_with < int (S::*)() const volatile&, |
792 | int (S::*)() const&& noexcept > ()); |
793 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile&, |
794 | int (S::*)() volatile&&>()); |
795 | static_assert(!check_totally_ordered_with < int (S::*)() const volatile&, |
796 | int (S::*)() volatile&& noexcept > ()); |
797 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile&, |
798 | int (S::*)() const volatile&&>()); |
799 | static_assert(!check_totally_ordered_with < int (S::*)() const volatile&, |
800 | int (S::*)() const volatile&& noexcept > ()); |
801 | |
802 | static_assert( |
803 | !check_totally_ordered_with<int (S::*)() const volatile & noexcept, |
804 | int (S::*)() const volatile & noexcept>()); |
805 | static_assert(!check_totally_ordered_with< |
806 | int (S::*)() const volatile & noexcept, int (S::*)() &&>()); |
807 | static_assert(!check_totally_ordered_with < int (S::*)() |
808 | const volatile& noexcept, |
809 | int (S::*)() && noexcept > ()); |
810 | static_assert(!check_totally_ordered_with< |
811 | int (S::*)() const volatile & noexcept, int (S::*)() const&&>()); |
812 | static_assert(!check_totally_ordered_with < int (S::*)() |
813 | const volatile& noexcept, |
814 | int (S::*)() const&& noexcept > ()); |
815 | static_assert( |
816 | !check_totally_ordered_with<int (S::*)() const volatile & noexcept, |
817 | int (S::*)() volatile&&>()); |
818 | static_assert(!check_totally_ordered_with < int (S::*)() |
819 | const volatile& noexcept, |
820 | int (S::*)() volatile&& noexcept > ()); |
821 | static_assert( |
822 | !check_totally_ordered_with<int (S::*)() const volatile & noexcept, |
823 | int (S::*)() const volatile&&>()); |
824 | static_assert(!check_totally_ordered_with < int (S::*)() |
825 | const volatile& noexcept, |
826 | int (S::*)() const volatile&& noexcept > ()); |
827 | |
828 | static_assert(!check_totally_ordered_with<int (S::*)() &&, int (S::*)() &&>()); |
829 | static_assert(!check_totally_ordered_with < int (S::*)() &&, |
830 | int (S::*)() && noexcept > ()); |
831 | static_assert( |
832 | !check_totally_ordered_with<int (S::*)() &&, int (S::*)() const&&>()); |
833 | static_assert(!check_totally_ordered_with < int (S::*)() &&, |
834 | int (S::*)() const&& noexcept > ()); |
835 | static_assert( |
836 | !check_totally_ordered_with<int (S::*)() &&, int (S::*)() volatile&&>()); |
837 | static_assert(!check_totally_ordered_with < int (S::*)() &&, |
838 | int (S::*)() volatile&& noexcept > ()); |
839 | static_assert(!check_totally_ordered_with<int (S::*)() &&, |
840 | int (S::*)() const volatile&&>()); |
841 | static_assert(!check_totally_ordered_with < int (S::*)() &&, |
842 | int (S::*)() const volatile&& noexcept > ()); |
843 | |
844 | static_assert(!check_totally_ordered_with < int (S::*)() && noexcept, |
845 | int (S::*)() && noexcept > ()); |
846 | static_assert(!check_totally_ordered_with < int (S::*)() && noexcept, |
847 | int (S::*)() const&& > ()); |
848 | static_assert(!check_totally_ordered_with < int (S::*)() && noexcept, |
849 | int (S::*)() const&& noexcept > ()); |
850 | static_assert(!check_totally_ordered_with < int (S::*)() && noexcept, |
851 | int (S::*)() volatile&& > ()); |
852 | static_assert(!check_totally_ordered_with < int (S::*)() && noexcept, |
853 | int (S::*)() volatile&& noexcept > ()); |
854 | static_assert(!check_totally_ordered_with < int (S::*)() && noexcept, |
855 | int (S::*)() const volatile&& > ()); |
856 | static_assert(!check_totally_ordered_with < int (S::*)() && noexcept, |
857 | int (S::*)() const volatile&& noexcept > ()); |
858 | |
859 | static_assert( |
860 | !check_totally_ordered_with<int (S::*)() const&&, int (S::*)() const&&>()); |
861 | static_assert(!check_totally_ordered_with < int (S::*)() const&&, |
862 | int (S::*)() const&& noexcept > ()); |
863 | static_assert(!check_totally_ordered_with<int (S::*)() const&&, |
864 | int (S::*)() volatile&&>()); |
865 | static_assert(!check_totally_ordered_with < int (S::*)() const&&, |
866 | int (S::*)() volatile&& noexcept > ()); |
867 | static_assert(!check_totally_ordered_with<int (S::*)() const&&, |
868 | int (S::*)() const volatile&&>()); |
869 | static_assert(!check_totally_ordered_with < int (S::*)() const&&, |
870 | int (S::*)() const volatile&& noexcept > ()); |
871 | |
872 | static_assert(!check_totally_ordered_with < int (S::*)() const&& noexcept, |
873 | int (S::*)() const&& noexcept > ()); |
874 | static_assert(!check_totally_ordered_with < int (S::*)() const&& noexcept, |
875 | int (S::*)() volatile&& > ()); |
876 | static_assert(!check_totally_ordered_with < int (S::*)() const&& noexcept, |
877 | int (S::*)() volatile&& noexcept > ()); |
878 | static_assert(!check_totally_ordered_with < int (S::*)() const&& noexcept, |
879 | int (S::*)() const volatile&& > ()); |
880 | static_assert(!check_totally_ordered_with < int (S::*)() const&& noexcept, |
881 | int (S::*)() const volatile&& noexcept > ()); |
882 | |
883 | static_assert(!check_totally_ordered_with<int (S::*)() volatile&&, |
884 | int (S::*)() volatile&&>()); |
885 | static_assert(!check_totally_ordered_with < int (S::*)() volatile&&, |
886 | int (S::*)() volatile&& noexcept > ()); |
887 | static_assert(!check_totally_ordered_with<int (S::*)() volatile&&, |
888 | int (S::*)() const volatile&&>()); |
889 | static_assert(!check_totally_ordered_with < int (S::*)() volatile&&, |
890 | int (S::*)() const volatile&& noexcept > ()); |
891 | |
892 | static_assert(!check_totally_ordered_with < int (S::*)() volatile&& noexcept, |
893 | int (S::*)() volatile&& noexcept > ()); |
894 | static_assert(!check_totally_ordered_with < int (S::*)() volatile&& noexcept, |
895 | int (S::*)() const volatile&& > ()); |
896 | static_assert(!check_totally_ordered_with < int (S::*)() volatile&& noexcept, |
897 | int (S::*)() const volatile&& noexcept > ()); |
898 | |
899 | static_assert(!check_totally_ordered_with<int (S::*)() const volatile&&, |
900 | int (S::*)() const volatile&&>()); |
901 | static_assert(!check_totally_ordered_with < int (S::*)() const volatile&&, |
902 | int (S::*)() const volatile&& noexcept > ()); |
903 | static_assert(!check_totally_ordered_with < int (S::*)() |
904 | const volatile&& noexcept, |
905 | int (S::*)() const volatile&& noexcept > ()); |
906 | |
907 | #if !defined(TEST_COMPILER_GCC) |
908 | static_assert(!check_totally_ordered_with<std::nullptr_t, int>()); |
909 | |
910 | static_assert(!check_totally_ordered_with<std::nullptr_t, int*>()); |
911 | static_assert(!check_totally_ordered_with<std::nullptr_t, int[]>()); |
912 | static_assert(!check_totally_ordered_with<std::nullptr_t, int[5]>()); |
913 | static_assert(!check_totally_ordered_with<std::nullptr_t, int (*)()>()); |
914 | static_assert(!check_totally_ordered_with<std::nullptr_t, int (&)()>()); |
915 | #endif |
916 | |
917 | static_assert(!check_totally_ordered_with<std::nullptr_t, int (S::*)()>()); |
918 | static_assert( |
919 | !check_totally_ordered_with<std::nullptr_t, int (S::*)() noexcept>()); |
920 | static_assert( |
921 | !check_totally_ordered_with<std::nullptr_t, int (S::*)() const>()); |
922 | static_assert( |
923 | !check_totally_ordered_with<std::nullptr_t, int (S::*)() const noexcept>()); |
924 | static_assert( |
925 | !check_totally_ordered_with<std::nullptr_t, int (S::*)() volatile>()); |
926 | static_assert(!check_totally_ordered_with<std::nullptr_t, |
927 | int (S::*)() volatile noexcept>()); |
928 | static_assert( |
929 | !check_totally_ordered_with<std::nullptr_t, int (S::*)() const volatile>()); |
930 | static_assert(!check_totally_ordered_with< |
931 | std::nullptr_t, int (S::*)() const volatile noexcept>()); |
932 | static_assert(!check_totally_ordered_with<std::nullptr_t, int (S::*)() &>()); |
933 | static_assert( |
934 | !check_totally_ordered_with<std::nullptr_t, int (S::*)() & noexcept>()); |
935 | static_assert( |
936 | !check_totally_ordered_with<std::nullptr_t, int (S::*)() const&>()); |
937 | static_assert(!check_totally_ordered_with<std::nullptr_t, |
938 | int (S::*)() const & noexcept>()); |
939 | static_assert( |
940 | !check_totally_ordered_with<std::nullptr_t, int (S::*)() volatile&>()); |
941 | static_assert(!check_totally_ordered_with<std::nullptr_t, |
942 | int (S::*)() volatile & noexcept>()); |
943 | static_assert(!check_totally_ordered_with<std::nullptr_t, |
944 | int (S::*)() const volatile&>()); |
945 | static_assert(!check_totally_ordered_with< |
946 | std::nullptr_t, int (S::*)() const volatile & noexcept>()); |
947 | static_assert(!check_totally_ordered_with<std::nullptr_t, int (S::*)() &&>()); |
948 | static_assert(!check_totally_ordered_with < std::nullptr_t, |
949 | int (S::*)() && noexcept > ()); |
950 | static_assert( |
951 | !check_totally_ordered_with<std::nullptr_t, int (S::*)() const&&>()); |
952 | static_assert(!check_totally_ordered_with < std::nullptr_t, |
953 | int (S::*)() const&& noexcept > ()); |
954 | static_assert( |
955 | !check_totally_ordered_with<std::nullptr_t, int (S::*)() volatile&&>()); |
956 | static_assert(!check_totally_ordered_with < std::nullptr_t, |
957 | int (S::*)() volatile&& noexcept > ()); |
958 | static_assert(!check_totally_ordered_with<std::nullptr_t, |
959 | int (S::*)() const volatile&&>()); |
960 | static_assert(!check_totally_ordered_with < std::nullptr_t, |
961 | int (S::*)() const volatile&& noexcept > ()); |
962 | |
963 | static_assert(!std::equality_comparable_with<void, int>); |
964 | static_assert(!std::equality_comparable_with<void, int*>); |
965 | static_assert(!std::equality_comparable_with<void, std::nullptr_t>); |
966 | static_assert(!std::equality_comparable_with<void, int[5]>); |
967 | static_assert(!std::equality_comparable_with<void, int (*)()>); |
968 | static_assert(!std::equality_comparable_with<void, int (&)()>); |
969 | static_assert(!std::equality_comparable_with<void, int S::*>); |
970 | static_assert(!std::equality_comparable_with<void, int (S::*)()>); |
971 | static_assert(!std::equality_comparable_with<void, int (S::*)() noexcept>); |
972 | static_assert(!std::equality_comparable_with<void, int (S::*)() const>); |
973 | static_assert( |
974 | !std::equality_comparable_with<void, int (S::*)() const noexcept>); |
975 | static_assert(!std::equality_comparable_with<void, int (S::*)() volatile>); |
976 | static_assert( |
977 | !std::equality_comparable_with<void, int (S::*)() volatile noexcept>); |
978 | static_assert( |
979 | !std::equality_comparable_with<void, int (S::*)() const volatile>); |
980 | static_assert( |
981 | !std::equality_comparable_with<void, int (S::*)() const volatile noexcept>); |
982 | static_assert(!std::equality_comparable_with<void, int (S::*)() &>); |
983 | static_assert(!std::equality_comparable_with<void, int (S::*)() & noexcept>); |
984 | static_assert(!std::equality_comparable_with<void, int (S::*)() const&>); |
985 | static_assert( |
986 | !std::equality_comparable_with<void, int (S::*)() const & noexcept>); |
987 | static_assert(!std::equality_comparable_with<void, int (S::*)() volatile&>); |
988 | static_assert( |
989 | !std::equality_comparable_with<void, int (S::*)() volatile & noexcept>); |
990 | static_assert( |
991 | !std::equality_comparable_with<void, int (S::*)() const volatile&>); |
992 | static_assert(!std::equality_comparable_with<void, int (S::*)() const volatile & |
993 | noexcept>); |
994 | static_assert(!std::equality_comparable_with<void, int (S::*)() &&>); |
995 | static_assert(!std::equality_comparable_with < void, |
996 | int (S::*)() && noexcept >); |
997 | static_assert(!std::equality_comparable_with<void, int (S::*)() const&&>); |
998 | static_assert(!std::equality_comparable_with < void, |
999 | int (S::*)() const&& noexcept >); |
1000 | static_assert(!std::equality_comparable_with<void, int (S::*)() volatile&&>); |
1001 | static_assert(!std::equality_comparable_with < void, |
1002 | int (S::*)() volatile&& noexcept >); |
1003 | static_assert( |
1004 | !std::equality_comparable_with<void, int (S::*)() const volatile&&>); |
1005 | static_assert(!std::equality_comparable_with < void, |
1006 | int (S::*)() const volatile&& noexcept >); |
1007 | } // namespace fundamentals |
1008 | |
1009 | namespace standard_types { |
1010 | static_assert( |
1011 | check_totally_ordered_with<std::array<int, 10>, std::array<int, 10> >()); |
1012 | static_assert(!check_totally_ordered_with<std::array<int, 10>, |
1013 | std::array<double, 10> >()); |
1014 | static_assert(check_totally_ordered_with<std::deque<int>, std::deque<int> >()); |
1015 | static_assert( |
1016 | !check_totally_ordered_with<std::deque<int>, std::vector<int> >()); |
1017 | static_assert(check_totally_ordered_with<std::forward_list<int>, |
1018 | std::forward_list<int> >()); |
1019 | static_assert( |
1020 | !check_totally_ordered_with<std::forward_list<int>, std::vector<int> >()); |
1021 | static_assert(check_totally_ordered_with<std::list<int>, std::list<int> >()); |
1022 | static_assert(!check_totally_ordered_with<std::list<int>, std::vector<int> >()); |
1023 | |
1024 | static_assert( |
1025 | check_totally_ordered_with<std::map<int, void*>, std::map<int, void*> >()); |
1026 | static_assert( |
1027 | !check_totally_ordered_with<std::map<int, void*>, std::vector<int> >()); |
1028 | static_assert(check_totally_ordered_with<std::optional<std::vector<int> >, |
1029 | std::optional<std::vector<int> > >()); |
1030 | static_assert(check_totally_ordered_with<std::optional<std::vector<int> >, |
1031 | std::vector<int> >()); |
1032 | static_assert( |
1033 | check_totally_ordered_with<std::vector<int>, std::vector<int> >()); |
1034 | static_assert(!check_totally_ordered_with<std::vector<int>, int>()); |
1035 | |
1036 | struct A {}; |
1037 | // FIXME(cjdb): uncomment when operator<=> is implemented for each of these types. |
1038 | // static_assert(!check_totally_ordered_with<std::optional<std::vector<A> >, |
1039 | // std::optional<std::vector<A> > >()); |
1040 | // static_assert(!check_totally_ordered_with<std::optional<std::vector<A> >, |
1041 | // std::vector<A> >()); |
1042 | struct B {}; |
1043 | static_assert(!check_totally_ordered_with<std::vector<A>, std::vector<B> >()); |
1044 | static_assert( |
1045 | !check_totally_ordered_with<std::optional<A>, std::optional<B> >()); |
1046 | } // namespace standard_types |
1047 | |
1048 | namespace types_fit_for_purpose { |
1049 | static_assert(!check_totally_ordered_with<cxx20_member_eq, cxx20_member_eq>()); |
1050 | static_assert(!check_totally_ordered_with<cxx20_friend_eq, cxx20_friend_eq>()); |
1051 | static_assert(!check_totally_ordered_with<cxx20_member_eq, cxx20_friend_eq>()); |
1052 | |
1053 | static_assert(check_totally_ordered_with<member_three_way_comparable, |
1054 | member_three_way_comparable>()); |
1055 | static_assert(check_totally_ordered_with<friend_three_way_comparable, |
1056 | friend_three_way_comparable>()); |
1057 | static_assert(!check_totally_ordered_with<member_three_way_comparable, |
1058 | friend_three_way_comparable>()); |
1059 | |
1060 | static_assert( |
1061 | check_totally_ordered_with<explicit_operators, explicit_operators>()); |
1062 | static_assert(!check_totally_ordered_with<equality_comparable_with_ec1, |
1063 | equality_comparable_with_ec1>()); |
1064 | static_assert(check_totally_ordered_with<different_return_types, |
1065 | different_return_types>()); |
1066 | static_assert(!check_totally_ordered_with<explicit_operators, |
1067 | equality_comparable_with_ec1>()); |
1068 | static_assert( |
1069 | check_totally_ordered_with<explicit_operators, different_return_types>()); |
1070 | |
1071 | static_assert(!check_totally_ordered_with<one_way_eq, one_way_eq>()); |
1072 | static_assert( |
1073 | std::common_reference_with<one_way_eq const&, explicit_operators const&> && |
1074 | !check_totally_ordered_with<one_way_eq, explicit_operators>()); |
1075 | |
1076 | static_assert(!check_totally_ordered_with<one_way_ne, one_way_ne>()); |
1077 | static_assert( |
1078 | std::common_reference_with<one_way_ne const&, explicit_operators const&> && |
1079 | !check_totally_ordered_with<one_way_ne, explicit_operators>()); |
1080 | |
1081 | static_assert( |
1082 | check_totally_ordered_with<totally_ordered_with_others, |
1083 | partial_ordering_totally_ordered_with>()); |
1084 | static_assert(check_totally_ordered_with<totally_ordered_with_others, |
1085 | weak_ordering_totally_ordered_with>()); |
1086 | static_assert( |
1087 | check_totally_ordered_with<totally_ordered_with_others, |
1088 | strong_ordering_totally_ordered_with>()); |
1089 | |
1090 | static_assert(!check_totally_ordered_with<totally_ordered_with_others, |
1091 | eq_returns_explicit_bool>()); |
1092 | static_assert(!check_totally_ordered_with<totally_ordered_with_others, |
1093 | ne_returns_explicit_bool>()); |
1094 | static_assert(std::equality_comparable_with<totally_ordered_with_others, |
1095 | lt_returns_explicit_bool> && |
1096 | !check_totally_ordered_with<totally_ordered_with_others, |
1097 | lt_returns_explicit_bool>()); |
1098 | static_assert(std::equality_comparable_with<totally_ordered_with_others, |
1099 | gt_returns_explicit_bool> && |
1100 | !check_totally_ordered_with<totally_ordered_with_others, |
1101 | gt_returns_explicit_bool>()); |
1102 | static_assert(std::equality_comparable_with<totally_ordered_with_others, |
1103 | le_returns_explicit_bool> && |
1104 | !check_totally_ordered_with<totally_ordered_with_others, |
1105 | le_returns_explicit_bool>()); |
1106 | static_assert(std::equality_comparable_with<totally_ordered_with_others, |
1107 | ge_returns_explicit_bool> && |
1108 | !check_totally_ordered_with<totally_ordered_with_others, |
1109 | ge_returns_explicit_bool>()); |
1110 | static_assert(check_totally_ordered_with<totally_ordered_with_others, |
1111 | returns_true_type>()); |
1112 | static_assert( |
1113 | check_totally_ordered_with<totally_ordered_with_others, returns_int_ptr>()); |
1114 | |
1115 | static_assert( |
1116 | std::totally_ordered<no_lt_not_totally_ordered_with>&& |
1117 | std::equality_comparable_with<totally_ordered_with_others, |
1118 | no_lt_not_totally_ordered_with> && |
1119 | !check_totally_ordered_with<totally_ordered_with_others, |
1120 | no_lt_not_totally_ordered_with>()); |
1121 | static_assert( |
1122 | std::totally_ordered<no_gt_not_totally_ordered_with>&& |
1123 | std::equality_comparable_with<totally_ordered_with_others, |
1124 | no_gt_not_totally_ordered_with> && |
1125 | !check_totally_ordered_with<totally_ordered_with_others, |
1126 | no_gt_not_totally_ordered_with>()); |
1127 | static_assert( |
1128 | std::totally_ordered<no_le_not_totally_ordered_with>&& |
1129 | std::equality_comparable_with<totally_ordered_with_others, |
1130 | no_le_not_totally_ordered_with> && |
1131 | !check_totally_ordered_with<totally_ordered_with_others, |
1132 | no_le_not_totally_ordered_with>()); |
1133 | static_assert( |
1134 | std::totally_ordered<no_ge_not_totally_ordered_with>&& |
1135 | std::equality_comparable_with<totally_ordered_with_others, |
1136 | no_ge_not_totally_ordered_with> && |
1137 | !check_totally_ordered_with<totally_ordered_with_others, |
1138 | no_ge_not_totally_ordered_with>()); |
1139 | } // namespace types_fit_for_purpose |
1140 | |
1141 | int main(int, char**) { return 0; } |
1142 | |