1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14, c++17
11 // template<class T, class U>
12 // concept equality_comparable_with = // see below
18 #include <forward_list>
24 #include <unordered_map>
25 #include <unordered_set>
28 #include "test_macros.h"
30 #ifndef TEST_HAS_NO_THREADS
34 #include "compare_types.h"
36 template <class T
, class U
>
37 constexpr bool check_equality_comparable_with() {
38 constexpr bool result
= std::equality_comparable_with
<T
, U
>;
39 static_assert(std::equality_comparable_with
<U
, T
> == result
);
40 static_assert(std::equality_comparable_with
<T
, U
const> == result
);
41 static_assert(std::equality_comparable_with
<T
const, U
const> == result
);
42 static_assert(std::equality_comparable_with
<T
, U
const&> == result
);
43 static_assert(std::equality_comparable_with
<T
const, U
const&> == result
);
44 static_assert(std::equality_comparable_with
<T
&, U
const> == result
);
45 static_assert(std::equality_comparable_with
<T
const&, U
const> == result
);
46 static_assert(std::equality_comparable_with
<T
&, U
const&> == result
);
47 static_assert(std::equality_comparable_with
<T
const&, U
const&> == result
);
48 static_assert(std::equality_comparable_with
<T
, U
const&&> == result
);
49 static_assert(std::equality_comparable_with
<T
const, U
const&&> == result
);
50 static_assert(std::equality_comparable_with
<T
&, U
const&&> == result
);
51 static_assert(std::equality_comparable_with
<T
const&, U
const&&> == result
);
52 static_assert(std::equality_comparable_with
<T
&&, U
const> == result
);
53 static_assert(std::equality_comparable_with
<T
const&&, U
const> == result
);
54 static_assert(std::equality_comparable_with
<T
&&, U
const&> == result
);
55 static_assert(std::equality_comparable_with
<T
const&&, U
const&> == result
);
56 static_assert(std::equality_comparable_with
<T
&&, U
const&&> == result
);
57 static_assert(std::equality_comparable_with
<T
const&&, U
const&&> == result
);
61 namespace fundamentals
{
62 static_assert(check_equality_comparable_with
<int, int>());
63 static_assert(check_equality_comparable_with
<int, bool>());
64 static_assert(check_equality_comparable_with
<int, char>());
65 static_assert(check_equality_comparable_with
<int, wchar_t>());
66 static_assert(check_equality_comparable_with
<int, double>());
67 static_assert(!check_equality_comparable_with
<int, int*>());
68 static_assert(!check_equality_comparable_with
<int, int[5]>());
69 static_assert(!check_equality_comparable_with
<int, int (*)()>());
70 static_assert(!check_equality_comparable_with
<int, int (&)()>());
73 static_assert(!check_equality_comparable_with
<int, int S::*>());
74 static_assert(!check_equality_comparable_with
<int, int (S::*)()>());
75 static_assert(!check_equality_comparable_with
<int, int (S::*)() noexcept
>());
76 static_assert(!check_equality_comparable_with
<int, int (S::*)() const>());
78 !check_equality_comparable_with
<int, int (S::*)() const noexcept
>());
79 static_assert(!check_equality_comparable_with
<int, int (S::*)() volatile>());
81 !check_equality_comparable_with
<int, int (S::*)() volatile noexcept
>());
83 !check_equality_comparable_with
<int, int (S::*)() const volatile>());
84 static_assert(!check_equality_comparable_with
<
85 int, int (S::*)() const volatile noexcept
>());
86 static_assert(!check_equality_comparable_with
<int, int (S::*)() &>());
87 static_assert(!check_equality_comparable_with
<int, int (S::*)() & noexcept
>());
88 static_assert(!check_equality_comparable_with
<int, int (S::*)() const&>());
90 !check_equality_comparable_with
<int, int (S::*)() const & noexcept
>());
91 static_assert(!check_equality_comparable_with
<int, int (S::*)() volatile&>());
93 !check_equality_comparable_with
<int, int (S::*)() volatile & noexcept
>());
95 !check_equality_comparable_with
<int, int (S::*)() const volatile&>());
96 static_assert(!check_equality_comparable_with
<int, int (S::*)() const volatile &
98 static_assert(!check_equality_comparable_with
<int, int (S::*)() &&>());
99 static_assert(!check_equality_comparable_with
< int,
100 int (S::*)() && noexcept
> ());
101 static_assert(!check_equality_comparable_with
<int, int (S::*)() const&&>());
102 static_assert(!check_equality_comparable_with
< int,
103 int (S::*)() const&& noexcept
> ());
104 static_assert(!check_equality_comparable_with
<int, int (S::*)() volatile&&>());
105 static_assert(!check_equality_comparable_with
< int,
106 int (S::*)() volatile&& noexcept
> ());
108 !check_equality_comparable_with
<int, int (S::*)() const volatile&&>());
109 static_assert(!check_equality_comparable_with
< int,
110 int (S::*)() const volatile&& noexcept
> ());
112 static_assert(check_equality_comparable_with
<int*, int*>());
113 static_assert(check_equality_comparable_with
<int*, int[5]>());
114 static_assert(!check_equality_comparable_with
<int*, int (*)()>());
115 static_assert(!check_equality_comparable_with
<int*, int (&)()>());
116 static_assert(!check_equality_comparable_with
<int*, int (S::*)()>());
117 static_assert(!check_equality_comparable_with
<int*, int (S::*)() noexcept
>());
118 static_assert(!check_equality_comparable_with
<int*, int (S::*)() const>());
120 !check_equality_comparable_with
<int*, int (S::*)() const noexcept
>());
121 static_assert(!check_equality_comparable_with
<int*, int (S::*)() volatile>());
123 !check_equality_comparable_with
<int*, int (S::*)() volatile noexcept
>());
125 !check_equality_comparable_with
<int*, int (S::*)() const volatile>());
126 static_assert(!check_equality_comparable_with
<
127 int*, int (S::*)() const volatile noexcept
>());
128 static_assert(!check_equality_comparable_with
<int*, int (S::*)() &>());
129 static_assert(!check_equality_comparable_with
<int*, int (S::*)() & noexcept
>());
130 static_assert(!check_equality_comparable_with
<int*, int (S::*)() const&>());
132 !check_equality_comparable_with
<int*, int (S::*)() const & noexcept
>());
133 static_assert(!check_equality_comparable_with
<int*, int (S::*)() volatile&>());
135 !check_equality_comparable_with
<int*, int (S::*)() volatile & noexcept
>());
137 !check_equality_comparable_with
<int*, int (S::*)() const volatile&>());
138 static_assert(!check_equality_comparable_with
<
139 int*, int (S::*)() const volatile & noexcept
>());
140 static_assert(!check_equality_comparable_with
<int*, int (S::*)() &&>());
141 static_assert(!check_equality_comparable_with
< int*,
142 int (S::*)() && noexcept
> ());
143 static_assert(!check_equality_comparable_with
<int*, int (S::*)() const&&>());
144 static_assert(!check_equality_comparable_with
< int*,
145 int (S::*)() const&& noexcept
> ());
146 static_assert(!check_equality_comparable_with
<int*, int (S::*)() volatile&&>());
147 static_assert(!check_equality_comparable_with
< int*,
148 int (S::*)() volatile&& noexcept
> ());
150 !check_equality_comparable_with
<int*, int (S::*)() const volatile&&>());
151 static_assert(!check_equality_comparable_with
< int*,
152 int (S::*)() const volatile&& noexcept
> ());
154 static_assert(check_equality_comparable_with
<int[5], int[5]>());
155 static_assert(!check_equality_comparable_with
<int[5], int (*)()>());
156 static_assert(!check_equality_comparable_with
<int[5], int (&)()>());
157 static_assert(!check_equality_comparable_with
<int[5], int (S::*)()>());
158 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() noexcept
>());
159 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() const>());
161 !check_equality_comparable_with
<int[5], int (S::*)() const noexcept
>());
162 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() volatile>());
164 !check_equality_comparable_with
<int[5], int (S::*)() volatile noexcept
>());
166 !check_equality_comparable_with
<int[5], int (S::*)() const volatile>());
167 static_assert(!check_equality_comparable_with
<
168 int[5], int (S::*)() const volatile noexcept
>());
169 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() &>());
171 !check_equality_comparable_with
<int[5], int (S::*)() & noexcept
>());
172 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() const&>());
174 !check_equality_comparable_with
<int[5], int (S::*)() const & noexcept
>());
176 !check_equality_comparable_with
<int[5], int (S::*)() volatile&>());
177 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() volatile &
180 !check_equality_comparable_with
<int[5], int (S::*)() const volatile&>());
181 static_assert(!check_equality_comparable_with
<
182 int[5], int (S::*)() const volatile & noexcept
>());
183 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() &&>());
184 static_assert(!check_equality_comparable_with
< int[5],
185 int (S::*)() && noexcept
> ());
186 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() const&&>());
187 static_assert(!check_equality_comparable_with
< int[5],
188 int (S::*)() const&& noexcept
> ());
190 !check_equality_comparable_with
<int[5], int (S::*)() volatile&&>());
191 static_assert(!check_equality_comparable_with
< int[5],
192 int (S::*)() volatile&& noexcept
> ());
194 !check_equality_comparable_with
<int[5], int (S::*)() const volatile&&>());
195 static_assert(!check_equality_comparable_with
< int[5],
196 int (S::*)() const volatile&& noexcept
> ());
198 static_assert(check_equality_comparable_with
<int (*)(), int (*)()>());
199 static_assert(check_equality_comparable_with
<int (*)(), int (&)()>());
200 static_assert(!check_equality_comparable_with
<int (*)(), int (S::*)()>());
202 !check_equality_comparable_with
<int (*)(), int (S::*)() noexcept
>());
203 static_assert(!check_equality_comparable_with
<int (*)(), int (S::*)() const>());
205 !check_equality_comparable_with
<int (*)(), int (S::*)() const noexcept
>());
207 !check_equality_comparable_with
<int (*)(), int (S::*)() volatile>());
208 static_assert(!check_equality_comparable_with
<
209 int (*)(), int (S::*)() volatile noexcept
>());
211 !check_equality_comparable_with
<int (*)(), int (S::*)() const volatile>());
212 static_assert(!check_equality_comparable_with
<
213 int (*)(), int (S::*)() const volatile noexcept
>());
214 static_assert(!check_equality_comparable_with
<int (*)(), int (S::*)() &>());
216 !check_equality_comparable_with
<int (*)(), int (S::*)() & noexcept
>());
218 !check_equality_comparable_with
<int (*)(), int (S::*)() const&>());
219 static_assert(!check_equality_comparable_with
<int (*)(),
220 int (S::*)() const & noexcept
>());
222 !check_equality_comparable_with
<int (*)(), int (S::*)() volatile&>());
223 static_assert(!check_equality_comparable_with
<int (*)(), int (S::*)() volatile &
226 !check_equality_comparable_with
<int (*)(), int (S::*)() const volatile&>());
227 static_assert(!check_equality_comparable_with
<
228 int (*)(), int (S::*)() const volatile & noexcept
>());
229 static_assert(!check_equality_comparable_with
<int (*)(), int (S::*)() &&>());
230 static_assert(!check_equality_comparable_with
< int (*)(),
231 int (S::*)() && noexcept
> ());
233 !check_equality_comparable_with
<int (*)(), int (S::*)() const&&>());
234 static_assert(!check_equality_comparable_with
< int (*)(),
235 int (S::*)() const&& noexcept
> ());
237 !check_equality_comparable_with
<int (*)(), int (S::*)() volatile&&>());
238 static_assert(!check_equality_comparable_with
< int (*)(),
239 int (S::*)() volatile&& noexcept
> ());
240 static_assert(!check_equality_comparable_with
<int (*)(),
241 int (S::*)() const volatile&&>());
242 static_assert(!check_equality_comparable_with
< int (*)(),
243 int (S::*)() const volatile&& noexcept
> ());
245 static_assert(check_equality_comparable_with
<int (&)(), int (&)()>());
246 static_assert(!check_equality_comparable_with
<int (&)(), int (S::*)()>());
248 !check_equality_comparable_with
<int (&)(), int (S::*)() noexcept
>());
249 static_assert(!check_equality_comparable_with
<int (&)(), int (S::*)() const>());
251 !check_equality_comparable_with
<int (&)(), int (S::*)() const noexcept
>());
253 !check_equality_comparable_with
<int (&)(), int (S::*)() volatile>());
254 static_assert(!check_equality_comparable_with
<
255 int (&)(), int (S::*)() volatile noexcept
>());
257 !check_equality_comparable_with
<int (&)(), int (S::*)() const volatile>());
258 static_assert(!check_equality_comparable_with
<
259 int (&)(), int (S::*)() const volatile noexcept
>());
260 static_assert(!check_equality_comparable_with
<int (&)(), int (S::*)() &>());
262 !check_equality_comparable_with
<int (&)(), int (S::*)() & noexcept
>());
264 !check_equality_comparable_with
<int (&)(), int (S::*)() const&>());
265 static_assert(!check_equality_comparable_with
<int (&)(),
266 int (S::*)() const & noexcept
>());
268 !check_equality_comparable_with
<int (&)(), int (S::*)() volatile&>());
269 static_assert(!check_equality_comparable_with
<int (&)(), int (S::*)() volatile &
272 !check_equality_comparable_with
<int (&)(), int (S::*)() const volatile&>());
273 static_assert(!check_equality_comparable_with
<
274 int (&)(), int (S::*)() const volatile & noexcept
>());
275 static_assert(!check_equality_comparable_with
<int (&)(), int (S::*)() &&>());
276 static_assert(!check_equality_comparable_with
< int (&)(),
277 int (S::*)() && noexcept
> ());
279 !check_equality_comparable_with
<int (&)(), int (S::*)() const&&>());
280 static_assert(!check_equality_comparable_with
< int (&)(),
281 int (S::*)() const&& noexcept
> ());
283 !check_equality_comparable_with
<int (&)(), int (S::*)() volatile&&>());
284 static_assert(!check_equality_comparable_with
< int (&)(),
285 int (S::*)() volatile&& noexcept
> ());
286 static_assert(!check_equality_comparable_with
<int (&)(),
287 int (S::*)() const volatile&&>());
288 static_assert(!check_equality_comparable_with
< int (&)(),
289 int (S::*)() const volatile&& noexcept
> ());
291 static_assert(check_equality_comparable_with
<int (S::*)(), int (S::*)()>());
293 check_equality_comparable_with
<int (S::*)(), int (S::*)() noexcept
>());
295 !check_equality_comparable_with
<int (S::*)(), int (S::*)() const>());
296 static_assert(!check_equality_comparable_with
<int (S::*)(),
297 int (S::*)() const noexcept
>());
299 !check_equality_comparable_with
<int (S::*)(), int (S::*)() volatile>());
300 static_assert(!check_equality_comparable_with
<
301 int (S::*)(), int (S::*)() volatile noexcept
>());
302 static_assert(!check_equality_comparable_with
<int (S::*)(),
303 int (S::*)() const volatile>());
304 static_assert(!check_equality_comparable_with
<
305 int (S::*)(), int (S::*)() const volatile noexcept
>());
306 static_assert(!check_equality_comparable_with
<int (S::*)(), int (S::*)() &>());
308 !check_equality_comparable_with
<int (S::*)(), int (S::*)() & noexcept
>());
310 !check_equality_comparable_with
<int (S::*)(), int (S::*)() const&>());
311 static_assert(!check_equality_comparable_with
<int (S::*)(),
312 int (S::*)() const & noexcept
>());
314 !check_equality_comparable_with
<int (S::*)(), int (S::*)() volatile&>());
315 static_assert(!check_equality_comparable_with
<
316 int (S::*)(), int (S::*)() volatile & noexcept
>());
317 static_assert(!check_equality_comparable_with
<int (S::*)(),
318 int (S::*)() const volatile&>());
319 static_assert(!check_equality_comparable_with
<
320 int (S::*)(), int (S::*)() const volatile & noexcept
>());
321 static_assert(!check_equality_comparable_with
<int (S::*)(), int (S::*)() &&>());
322 static_assert(!check_equality_comparable_with
< int (S::*)(),
323 int (S::*)() && noexcept
> ());
325 !check_equality_comparable_with
<int (S::*)(), int (S::*)() const&&>());
326 static_assert(!check_equality_comparable_with
< int (S::*)(),
327 int (S::*)() const&& noexcept
> ());
329 !check_equality_comparable_with
<int (S::*)(), int (S::*)() volatile&&>());
330 static_assert(!check_equality_comparable_with
< int (S::*)(),
331 int (S::*)() volatile&& noexcept
> ());
332 static_assert(!check_equality_comparable_with
<int (S::*)(),
333 int (S::*)() const volatile&&>());
334 static_assert(!check_equality_comparable_with
< int (S::*)(),
335 int (S::*)() const volatile&& noexcept
> ());
337 static_assert(check_equality_comparable_with
<int (S::*)() noexcept
,
338 int (S::*)() noexcept
>());
339 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
340 int (S::*)() const>());
341 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
342 int (S::*)() const noexcept
>());
343 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
344 int (S::*)() volatile>());
345 static_assert(!check_equality_comparable_with
<
346 int (S::*)() noexcept
, int (S::*)() volatile noexcept
>());
347 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
348 int (S::*)() const volatile>());
349 static_assert(!check_equality_comparable_with
<
350 int (S::*)() noexcept
, int (S::*)() const volatile noexcept
>());
352 !check_equality_comparable_with
<int (S::*)() noexcept
, int (S::*)() &>());
353 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
354 int (S::*)() & noexcept
>());
355 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
356 int (S::*)() const&>());
357 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
358 int (S::*)() const & noexcept
>());
359 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
360 int (S::*)() volatile&>());
361 static_assert(!check_equality_comparable_with
<
362 int (S::*)() noexcept
, int (S::*)() volatile & noexcept
>());
363 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
364 int (S::*)() const volatile&>());
365 static_assert(!check_equality_comparable_with
<
366 int (S::*)() noexcept
, int (S::*)() const volatile & noexcept
>());
368 !check_equality_comparable_with
<int (S::*)() noexcept
, int (S::*)() &&>());
369 static_assert(!check_equality_comparable_with
< int (S::*)() noexcept
,
370 int (S::*)() && noexcept
> ());
371 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
372 int (S::*)() const&&>());
373 static_assert(!check_equality_comparable_with
< int (S::*)() noexcept
,
374 int (S::*)() const&& noexcept
> ());
375 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
376 int (S::*)() volatile&&>());
377 static_assert(!check_equality_comparable_with
< int (S::*)() noexcept
,
378 int (S::*)() volatile&& noexcept
> ());
379 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
380 int (S::*)() const volatile&&>());
381 static_assert(!check_equality_comparable_with
< int (S::*)() noexcept
,
382 int (S::*)() const volatile&& noexcept
> ());
385 check_equality_comparable_with
<int (S::*)() const, int (S::*)() const>());
386 static_assert(check_equality_comparable_with
<int (S::*)() const,
387 int (S::*)() const noexcept
>());
388 static_assert(!check_equality_comparable_with
<int (S::*)() const,
389 int (S::*)() volatile>());
390 static_assert(!check_equality_comparable_with
<
391 int (S::*)() const, int (S::*)() volatile noexcept
>());
392 static_assert(!check_equality_comparable_with
<int (S::*)() const,
393 int (S::*)() const volatile>());
394 static_assert(!check_equality_comparable_with
<
395 int (S::*)() const, int (S::*)() const volatile noexcept
>());
397 !check_equality_comparable_with
<int (S::*)() const, int (S::*)() &>());
398 static_assert(!check_equality_comparable_with
<int (S::*)() const,
399 int (S::*)() & noexcept
>());
401 !check_equality_comparable_with
<int (S::*)() const, int (S::*)() const&>());
402 static_assert(!check_equality_comparable_with
<int (S::*)() const,
403 int (S::*)() const & noexcept
>());
404 static_assert(!check_equality_comparable_with
<int (S::*)() const,
405 int (S::*)() volatile&>());
406 static_assert(!check_equality_comparable_with
<
407 int (S::*)() const, int (S::*)() volatile & noexcept
>());
408 static_assert(!check_equality_comparable_with
<int (S::*)() const,
409 int (S::*)() const volatile&>());
410 static_assert(!check_equality_comparable_with
<
411 int (S::*)() const, int (S::*)() const volatile & noexcept
>());
413 !check_equality_comparable_with
<int (S::*)() const, int (S::*)() &&>());
414 static_assert(!check_equality_comparable_with
< int (S::*)() const,
415 int (S::*)() && noexcept
> ());
416 static_assert(!check_equality_comparable_with
<int (S::*)() const,
417 int (S::*)() const&&>());
418 static_assert(!check_equality_comparable_with
< int (S::*)() const,
419 int (S::*)() const&& noexcept
> ());
420 static_assert(!check_equality_comparable_with
<int (S::*)() const,
421 int (S::*)() volatile&&>());
422 static_assert(!check_equality_comparable_with
< int (S::*)() const,
423 int (S::*)() volatile&& noexcept
> ());
424 static_assert(!check_equality_comparable_with
<int (S::*)() const,
425 int (S::*)() const volatile&&>());
426 static_assert(!check_equality_comparable_with
< int (S::*)() const,
427 int (S::*)() const volatile&& noexcept
> ());
429 static_assert(check_equality_comparable_with
<int (S::*)() const noexcept
,
430 int (S::*)() const noexcept
>());
431 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
432 int (S::*)() volatile>());
433 static_assert(!check_equality_comparable_with
<
434 int (S::*)() const noexcept
, int (S::*)() volatile noexcept
>());
435 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
436 int (S::*)() const volatile>());
438 !check_equality_comparable_with
<int (S::*)() const noexcept
,
439 int (S::*)() const volatile noexcept
>());
440 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
442 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
443 int (S::*)() & noexcept
>());
444 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
445 int (S::*)() const&>());
446 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
447 int (S::*)() const & noexcept
>());
448 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
449 int (S::*)() volatile&>());
450 static_assert(!check_equality_comparable_with
<
451 int (S::*)() const noexcept
, int (S::*)() volatile & noexcept
>());
452 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
453 int (S::*)() const volatile&>());
455 !check_equality_comparable_with
<int (S::*)() const noexcept
,
456 int (S::*)() const volatile & noexcept
>());
457 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
459 static_assert(!check_equality_comparable_with
< int (S::*)() const noexcept
,
460 int (S::*)() && noexcept
> ());
461 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
462 int (S::*)() const&&>());
463 static_assert(!check_equality_comparable_with
< int (S::*)() const noexcept
,
464 int (S::*)() const&& noexcept
> ());
465 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
466 int (S::*)() volatile&&>());
467 static_assert(!check_equality_comparable_with
< int (S::*)() const noexcept
,
468 int (S::*)() volatile&& noexcept
> ());
469 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
470 int (S::*)() const volatile&&>());
471 static_assert(!check_equality_comparable_with
< int (S::*)() const noexcept
,
472 int (S::*)() const volatile&& noexcept
> ());
474 static_assert(check_equality_comparable_with
<int (S::*)() volatile,
475 int (S::*)() volatile>());
476 static_assert(check_equality_comparable_with
<int (S::*)() volatile,
477 int (S::*)() volatile noexcept
>());
478 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
479 int (S::*)() const volatile>());
480 static_assert(!check_equality_comparable_with
<
481 int (S::*)() volatile, int (S::*)() const volatile noexcept
>());
483 !check_equality_comparable_with
<int (S::*)() volatile, int (S::*)() &>());
484 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
485 int (S::*)() & noexcept
>());
486 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
487 int (S::*)() const&>());
488 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
489 int (S::*)() const & noexcept
>());
490 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
491 int (S::*)() volatile&>());
492 static_assert(!check_equality_comparable_with
<
493 int (S::*)() volatile, int (S::*)() volatile & noexcept
>());
494 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
495 int (S::*)() const volatile&>());
496 static_assert(!check_equality_comparable_with
<
497 int (S::*)() volatile, int (S::*)() const volatile & noexcept
>());
499 !check_equality_comparable_with
<int (S::*)() volatile, int (S::*)() &&>());
500 static_assert(!check_equality_comparable_with
< int (S::*)() volatile,
501 int (S::*)() && noexcept
> ());
502 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
503 int (S::*)() const&&>());
504 static_assert(!check_equality_comparable_with
< int (S::*)() volatile,
505 int (S::*)() const&& noexcept
> ());
506 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
507 int (S::*)() volatile&&>());
508 static_assert(!check_equality_comparable_with
< int (S::*)() volatile,
509 int (S::*)() volatile&& noexcept
> ());
510 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
511 int (S::*)() const volatile&&>());
512 static_assert(!check_equality_comparable_with
< int (S::*)() volatile,
513 int (S::*)() const volatile&& noexcept
> ());
515 static_assert(check_equality_comparable_with
<int (S::*)() volatile noexcept
,
516 int (S::*)() volatile noexcept
>());
517 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
518 int (S::*)() const volatile>());
520 !check_equality_comparable_with
<int (S::*)() volatile noexcept
,
521 int (S::*)() const volatile noexcept
>());
522 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
524 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
525 int (S::*)() & noexcept
>());
526 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
527 int (S::*)() const&>());
528 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
529 int (S::*)() const & noexcept
>());
530 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
531 int (S::*)() volatile&>());
533 !check_equality_comparable_with
<int (S::*)() volatile noexcept
,
534 int (S::*)() volatile & noexcept
>());
535 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
536 int (S::*)() const volatile&>());
538 !check_equality_comparable_with
<int (S::*)() volatile noexcept
,
539 int (S::*)() const volatile & noexcept
>());
540 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
542 static_assert(!check_equality_comparable_with
< int (S::*)() volatile noexcept
,
543 int (S::*)() && noexcept
> ());
544 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
545 int (S::*)() const&&>());
546 static_assert(!check_equality_comparable_with
< int (S::*)() volatile noexcept
,
547 int (S::*)() const&& noexcept
> ());
548 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
549 int (S::*)() volatile&&>());
550 static_assert(!check_equality_comparable_with
< int (S::*)() volatile noexcept
,
551 int (S::*)() volatile&& noexcept
> ());
552 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
553 int (S::*)() const volatile&&>());
554 static_assert(!check_equality_comparable_with
< int (S::*)() volatile noexcept
,
555 int (S::*)() const volatile&& noexcept
> ());
557 static_assert(check_equality_comparable_with
<int (S::*)() const volatile,
558 int (S::*)() const volatile>());
560 check_equality_comparable_with
<int (S::*)() const volatile,
561 int (S::*)() const volatile noexcept
>());
562 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
564 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
565 int (S::*)() & noexcept
>());
566 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
567 int (S::*)() const&>());
568 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
569 int (S::*)() const & noexcept
>());
570 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
571 int (S::*)() volatile&>());
572 static_assert(!check_equality_comparable_with
<
573 int (S::*)() const volatile, int (S::*)() volatile & noexcept
>());
574 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
575 int (S::*)() const volatile&>());
577 !check_equality_comparable_with
<int (S::*)() const volatile,
578 int (S::*)() const volatile & noexcept
>());
579 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
581 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile,
582 int (S::*)() && noexcept
> ());
583 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
584 int (S::*)() const&&>());
585 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile,
586 int (S::*)() const&& noexcept
> ());
587 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
588 int (S::*)() volatile&&>());
589 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile,
590 int (S::*)() volatile&& noexcept
> ());
591 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
592 int (S::*)() const volatile&&>());
593 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile,
594 int (S::*)() const volatile&& noexcept
> ());
597 check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
598 int (S::*)() const volatile noexcept
>());
599 static_assert(!check_equality_comparable_with
<
600 int (S::*)() const volatile noexcept
, int (S::*)() &>());
601 static_assert(!check_equality_comparable_with
<
602 int (S::*)() const volatile noexcept
, int (S::*)() & noexcept
>());
603 static_assert(!check_equality_comparable_with
<
604 int (S::*)() const volatile noexcept
, int (S::*)() const&>());
606 !check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
607 int (S::*)() const & noexcept
>());
608 static_assert(!check_equality_comparable_with
<
609 int (S::*)() const volatile noexcept
, int (S::*)() volatile&>());
611 !check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
612 int (S::*)() volatile & noexcept
>());
614 !check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
615 int (S::*)() const volatile&>());
617 !check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
618 int (S::*)() const volatile & noexcept
>());
619 static_assert(!check_equality_comparable_with
<
620 int (S::*)() const volatile noexcept
, int (S::*)() &&>());
621 static_assert(!check_equality_comparable_with
< int (S::*)()
622 const volatile noexcept
,
623 int (S::*)() && noexcept
> ());
624 static_assert(!check_equality_comparable_with
<
625 int (S::*)() const volatile noexcept
, int (S::*)() const&&>());
626 static_assert(!check_equality_comparable_with
< int (S::*)()
627 const volatile noexcept
,
628 int (S::*)() const&& noexcept
> ());
629 static_assert(!check_equality_comparable_with
<
630 int (S::*)() const volatile noexcept
, int (S::*)() volatile&&>());
631 static_assert(!check_equality_comparable_with
< int (S::*)()
632 const volatile noexcept
,
633 int (S::*)() volatile&& noexcept
> ());
635 !check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
636 int (S::*)() const volatile&&>());
637 static_assert(!check_equality_comparable_with
< int (S::*)()
638 const volatile noexcept
,
639 int (S::*)() const volatile&& noexcept
> ());
641 static_assert(check_equality_comparable_with
<int (S::*)() &, int (S::*)() &>());
643 check_equality_comparable_with
<int (S::*)() &, int (S::*)() & noexcept
>());
645 !check_equality_comparable_with
<int (S::*)() &, int (S::*)() const&>());
646 static_assert(!check_equality_comparable_with
<int (S::*)() &,
647 int (S::*)() const & noexcept
>());
649 !check_equality_comparable_with
<int (S::*)() &, int (S::*)() volatile&>());
650 static_assert(!check_equality_comparable_with
<
651 int (S::*)() &, int (S::*)() volatile & noexcept
>());
652 static_assert(!check_equality_comparable_with
<int (S::*)() &,
653 int (S::*)() const volatile&>());
654 static_assert(!check_equality_comparable_with
<
655 int (S::*)() &, int (S::*)() const volatile & noexcept
>());
657 !check_equality_comparable_with
<int (S::*)() &, int (S::*)() &&>());
658 static_assert(!check_equality_comparable_with
< int (S::*)() &,
659 int (S::*)() && noexcept
> ());
661 !check_equality_comparable_with
<int (S::*)() &, int (S::*)() const&&>());
662 static_assert(!check_equality_comparable_with
< int (S::*)() &,
663 int (S::*)() const&& noexcept
> ());
665 !check_equality_comparable_with
<int (S::*)() &, int (S::*)() volatile&&>());
666 static_assert(!check_equality_comparable_with
< int (S::*)() &,
667 int (S::*)() volatile&& noexcept
> ());
668 static_assert(!check_equality_comparable_with
<int (S::*)() &,
669 int (S::*)() const volatile&&>());
670 static_assert(!check_equality_comparable_with
< int (S::*)() &,
671 int (S::*)() const volatile&& noexcept
> ());
673 static_assert(check_equality_comparable_with
<int (S::*)() & noexcept
,
674 int (S::*)() & noexcept
>());
675 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
676 int (S::*)() const&>());
677 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
678 int (S::*)() const & noexcept
>());
679 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
680 int (S::*)() volatile&>());
681 static_assert(!check_equality_comparable_with
<
682 int (S::*)() & noexcept
, int (S::*)() volatile & noexcept
>());
683 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
684 int (S::*)() const volatile&>());
686 !check_equality_comparable_with
<int (S::*)() & noexcept
,
687 int (S::*)() const volatile & noexcept
>());
688 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
690 static_assert(!check_equality_comparable_with
< int (S::*)() & noexcept
,
691 int (S::*)() && noexcept
> ());
692 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
693 int (S::*)() const&&>());
694 static_assert(!check_equality_comparable_with
< int (S::*)() & noexcept
,
695 int (S::*)() const&& noexcept
> ());
696 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
697 int (S::*)() volatile&&>());
698 static_assert(!check_equality_comparable_with
< int (S::*)() & noexcept
,
699 int (S::*)() volatile&& noexcept
> ());
700 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
701 int (S::*)() const volatile&&>());
702 static_assert(!check_equality_comparable_with
< int (S::*)() & noexcept
,
703 int (S::*)() const volatile&& noexcept
> ());
706 check_equality_comparable_with
<int (S::*)() const&, int (S::*)() const&>());
707 static_assert(check_equality_comparable_with
<int (S::*)() const&,
708 int (S::*)() const & noexcept
>());
709 static_assert(!check_equality_comparable_with
<int (S::*)() const&,
710 int (S::*)() volatile&>());
711 static_assert(!check_equality_comparable_with
<
712 int (S::*)() const&, int (S::*)() volatile & noexcept
>());
713 static_assert(!check_equality_comparable_with
<int (S::*)() const&,
714 int (S::*)() const volatile&>());
715 static_assert(!check_equality_comparable_with
<
716 int (S::*)() const&, int (S::*)() const volatile & noexcept
>());
718 !check_equality_comparable_with
<int (S::*)() const&, int (S::*)() &&>());
719 static_assert(!check_equality_comparable_with
< int (S::*)() const&,
720 int (S::*)() && noexcept
> ());
721 static_assert(!check_equality_comparable_with
<int (S::*)() const&,
722 int (S::*)() const&&>());
723 static_assert(!check_equality_comparable_with
< int (S::*)() const&,
724 int (S::*)() const&& noexcept
> ());
725 static_assert(!check_equality_comparable_with
<int (S::*)() const&,
726 int (S::*)() volatile&&>());
727 static_assert(!check_equality_comparable_with
< int (S::*)() const&,
728 int (S::*)() volatile&& noexcept
> ());
729 static_assert(!check_equality_comparable_with
<int (S::*)() const&,
730 int (S::*)() const volatile&&>());
731 static_assert(!check_equality_comparable_with
< int (S::*)() const&,
732 int (S::*)() const volatile&& noexcept
> ());
734 static_assert(check_equality_comparable_with
<int (S::*)() const & noexcept
,
735 int (S::*)() const & noexcept
>());
736 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
737 int (S::*)() volatile&>());
739 !check_equality_comparable_with
<int (S::*)() const & noexcept
,
740 int (S::*)() volatile & noexcept
>());
741 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
742 int (S::*)() const volatile&>());
744 !check_equality_comparable_with
<int (S::*)() const & noexcept
,
745 int (S::*)() const volatile & noexcept
>());
746 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
748 static_assert(!check_equality_comparable_with
< int (S::*)() const& noexcept
,
749 int (S::*)() && noexcept
> ());
750 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
751 int (S::*)() const&&>());
752 static_assert(!check_equality_comparable_with
< int (S::*)() const& noexcept
,
753 int (S::*)() const&& noexcept
> ());
754 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
755 int (S::*)() volatile&&>());
756 static_assert(!check_equality_comparable_with
< int (S::*)() const& noexcept
,
757 int (S::*)() volatile&& noexcept
> ());
758 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
759 int (S::*)() const volatile&&>());
760 static_assert(!check_equality_comparable_with
< int (S::*)() const& noexcept
,
761 int (S::*)() const volatile&& noexcept
> ());
763 static_assert(check_equality_comparable_with
<int (S::*)() volatile&,
764 int (S::*)() volatile&>());
765 static_assert(check_equality_comparable_with
<
766 int (S::*)() volatile&, int (S::*)() volatile & noexcept
>());
767 static_assert(!check_equality_comparable_with
<int (S::*)() volatile&,
768 int (S::*)() const volatile&>());
770 !check_equality_comparable_with
<int (S::*)() volatile&,
771 int (S::*)() const volatile & noexcept
>());
773 !check_equality_comparable_with
<int (S::*)() volatile&, int (S::*)() &&>());
774 static_assert(!check_equality_comparable_with
< int (S::*)() volatile&,
775 int (S::*)() && noexcept
> ());
776 static_assert(!check_equality_comparable_with
<int (S::*)() volatile&,
777 int (S::*)() const&&>());
778 static_assert(!check_equality_comparable_with
< int (S::*)() volatile&,
779 int (S::*)() const&& noexcept
> ());
780 static_assert(!check_equality_comparable_with
<int (S::*)() volatile&,
781 int (S::*)() volatile&&>());
782 static_assert(!check_equality_comparable_with
< int (S::*)() volatile&,
783 int (S::*)() volatile&& noexcept
> ());
784 static_assert(!check_equality_comparable_with
<int (S::*)() volatile&,
785 int (S::*)() const volatile&&>());
786 static_assert(!check_equality_comparable_with
< int (S::*)() volatile&,
787 int (S::*)() const volatile&& noexcept
> ());
790 check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
791 int (S::*)() volatile & noexcept
>());
792 static_assert(!check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
793 int (S::*)() const volatile&>());
795 !check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
796 int (S::*)() const volatile & noexcept
>());
797 static_assert(!check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
799 static_assert(!check_equality_comparable_with
< int (S::*)() volatile& noexcept
,
800 int (S::*)() && noexcept
> ());
801 static_assert(!check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
802 int (S::*)() const&&>());
803 static_assert(!check_equality_comparable_with
< int (S::*)() volatile& noexcept
,
804 int (S::*)() const&& noexcept
> ());
805 static_assert(!check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
806 int (S::*)() volatile&&>());
807 static_assert(!check_equality_comparable_with
< int (S::*)() volatile& noexcept
,
808 int (S::*)() volatile&& noexcept
> ());
809 static_assert(!check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
810 int (S::*)() const volatile&&>());
811 static_assert(!check_equality_comparable_with
< int (S::*)() volatile& noexcept
,
812 int (S::*)() const volatile&& noexcept
> ());
814 static_assert(check_equality_comparable_with
<int (S::*)() const volatile&,
815 int (S::*)() const volatile&>());
817 check_equality_comparable_with
<int (S::*)() const volatile&,
818 int (S::*)() const volatile & noexcept
>());
819 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile&,
821 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile&,
822 int (S::*)() && noexcept
> ());
823 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile&,
824 int (S::*)() const&&>());
825 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile&,
826 int (S::*)() const&& noexcept
> ());
827 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile&,
828 int (S::*)() volatile&&>());
829 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile&,
830 int (S::*)() volatile&& noexcept
> ());
831 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile&,
832 int (S::*)() const volatile&&>());
833 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile&,
834 int (S::*)() const volatile&& noexcept
> ());
837 check_equality_comparable_with
<int (S::*)() const volatile & noexcept
,
838 int (S::*)() const volatile & noexcept
>());
839 static_assert(!check_equality_comparable_with
<
840 int (S::*)() const volatile & noexcept
, int (S::*)() &&>());
841 static_assert(!check_equality_comparable_with
< int (S::*)()
842 const volatile& noexcept
,
843 int (S::*)() && noexcept
> ());
844 static_assert(!check_equality_comparable_with
<
845 int (S::*)() const volatile & noexcept
, int (S::*)() const&&>());
846 static_assert(!check_equality_comparable_with
< int (S::*)()
847 const volatile& noexcept
,
848 int (S::*)() const&& noexcept
> ());
850 !check_equality_comparable_with
<int (S::*)() const volatile & noexcept
,
851 int (S::*)() volatile&&>());
852 static_assert(!check_equality_comparable_with
< int (S::*)()
853 const volatile& noexcept
,
854 int (S::*)() volatile&& noexcept
> ());
856 !check_equality_comparable_with
<int (S::*)() const volatile & noexcept
,
857 int (S::*)() const volatile&&>());
858 static_assert(!check_equality_comparable_with
< int (S::*)()
859 const volatile& noexcept
,
860 int (S::*)() const volatile&& noexcept
> ());
863 check_equality_comparable_with
<int (S::*)() &&, int (S::*)() &&>());
864 static_assert(check_equality_comparable_with
<int (S::*)() &&,
865 int (S::*)() && noexcept
>());
867 !check_equality_comparable_with
<int (S::*)() &&, int (S::*)() const&&>());
868 static_assert(!check_equality_comparable_with
< int (S::*)() &&,
869 int (S::*)() const&& noexcept
> ());
870 static_assert(!check_equality_comparable_with
<int (S::*)() &&,
871 int (S::*)() volatile&&>());
872 static_assert(!check_equality_comparable_with
< int (S::*)() &&,
873 int (S::*)() volatile&& noexcept
> ());
874 static_assert(!check_equality_comparable_with
<int (S::*)() &&,
875 int (S::*)() const volatile&&>());
876 static_assert(!check_equality_comparable_with
< int (S::*)() &&,
877 int (S::*)() const volatile&& noexcept
> ());
879 static_assert(check_equality_comparable_with
<int (S::*)() && noexcept
,
880 int (S::*)() && noexcept
>());
881 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
882 int (S::*)() const&& > ());
883 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
884 int (S::*)() const&& noexcept
> ());
885 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
886 int (S::*)() volatile&& > ());
887 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
888 int (S::*)() volatile&& noexcept
> ());
889 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
890 int (S::*)() const volatile&& > ());
891 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
892 int (S::*)() const volatile&& noexcept
> ());
894 static_assert(check_equality_comparable_with
<int (S::*)() const&&,
895 int (S::*)() const&&>());
896 static_assert(check_equality_comparable_with
<int (S::*)() const&&,
897 int (S::*)() const && noexcept
>());
898 static_assert(!check_equality_comparable_with
<int (S::*)() const&&,
899 int (S::*)() volatile&&>());
900 static_assert(!check_equality_comparable_with
< int (S::*)() const&&,
901 int (S::*)() volatile&& noexcept
> ());
902 static_assert(!check_equality_comparable_with
<int (S::*)() const&&,
903 int (S::*)() const volatile&&>());
904 static_assert(!check_equality_comparable_with
< int (S::*)() const&&,
905 int (S::*)() const volatile&& noexcept
> ());
907 static_assert(check_equality_comparable_with
<int (S::*)() const && noexcept
,
908 int (S::*)() const && noexcept
>());
909 static_assert(!check_equality_comparable_with
< int (S::*)() const&& noexcept
,
910 int (S::*)() volatile&& > ());
911 static_assert(!check_equality_comparable_with
< int (S::*)() const&& noexcept
,
912 int (S::*)() volatile&& noexcept
> ());
913 static_assert(!check_equality_comparable_with
< int (S::*)() const&& noexcept
,
914 int (S::*)() const volatile&& > ());
915 static_assert(!check_equality_comparable_with
< int (S::*)() const&& noexcept
,
916 int (S::*)() const volatile&& noexcept
> ());
918 static_assert(check_equality_comparable_with
<int (S::*)() volatile&&,
919 int (S::*)() volatile&&>());
920 static_assert(check_equality_comparable_with
<
921 int (S::*)() volatile&&, int (S::*)() volatile && noexcept
>());
922 static_assert(!check_equality_comparable_with
<int (S::*)() volatile&&,
923 int (S::*)() const volatile&&>());
924 static_assert(!check_equality_comparable_with
< int (S::*)() volatile&&,
925 int (S::*)() const volatile&& noexcept
> ());
928 check_equality_comparable_with
<int (S::*)() volatile && noexcept
,
929 int (S::*)() volatile && noexcept
>());
930 static_assert(!check_equality_comparable_with
<
931 int (S::*)() volatile&& noexcept
,
932 int (S::*)() const volatile&& > ());
933 static_assert(!check_equality_comparable_with
<
934 int (S::*)() volatile&& noexcept
,
935 int (S::*)() const volatile&& noexcept
> ());
937 static_assert(check_equality_comparable_with
<int (S::*)() const volatile&&,
938 int (S::*)() const volatile&&>());
940 check_equality_comparable_with
<int (S::*)() const volatile&&,
941 int (S::*)() const volatile && noexcept
>());
943 check_equality_comparable_with
<int (S::*)() const volatile && noexcept
,
944 int (S::*)() const volatile && noexcept
>());
946 static_assert(!check_equality_comparable_with
<std::nullptr_t
, int>());
947 static_assert(check_equality_comparable_with
<std::nullptr_t
, int*>());
948 static_assert(check_equality_comparable_with
<std::nullptr_t
, int[5]>());
949 static_assert(check_equality_comparable_with
<std::nullptr_t
, int (*)()>());
950 static_assert(check_equality_comparable_with
<std::nullptr_t
, int (&)()>());
951 static_assert(check_equality_comparable_with
<std::nullptr_t
, int (S::*)()>());
953 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() noexcept
>());
955 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() const>());
956 static_assert(check_equality_comparable_with
<std::nullptr_t
,
957 int (S::*)() const noexcept
>());
959 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() volatile>());
960 static_assert(check_equality_comparable_with
<std::nullptr_t
,
961 int (S::*)() volatile noexcept
>());
962 static_assert(check_equality_comparable_with
<std::nullptr_t
,
963 int (S::*)() const volatile>());
964 static_assert(check_equality_comparable_with
<
965 std::nullptr_t
, int (S::*)() const volatile noexcept
>());
966 static_assert(check_equality_comparable_with
<std::nullptr_t
, int (S::*)() &>());
968 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() & noexcept
>());
970 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() const&>());
971 static_assert(check_equality_comparable_with
<std::nullptr_t
,
972 int (S::*)() const & noexcept
>());
974 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() volatile&>());
975 static_assert(check_equality_comparable_with
<
976 std::nullptr_t
, int (S::*)() volatile & noexcept
>());
977 static_assert(check_equality_comparable_with
<std::nullptr_t
,
978 int (S::*)() const volatile&>());
979 static_assert(check_equality_comparable_with
<
980 std::nullptr_t
, int (S::*)() const volatile & noexcept
>());
982 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() &&>());
984 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() && noexcept
>());
986 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() const&&>());
987 static_assert(check_equality_comparable_with
<std::nullptr_t
,
988 int (S::*)() const && noexcept
>());
990 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() volatile&&>());
991 static_assert(check_equality_comparable_with
<
992 std::nullptr_t
, int (S::*)() volatile && noexcept
>());
993 static_assert(check_equality_comparable_with
<std::nullptr_t
,
994 int (S::*)() const volatile&&>());
995 static_assert(check_equality_comparable_with
<
996 std::nullptr_t
, int (S::*)() const volatile && noexcept
>());
998 static_assert(!std::equality_comparable_with
<void, int>);
999 static_assert(!std::equality_comparable_with
<void, int*>);
1000 static_assert(!std::equality_comparable_with
<void, std::nullptr_t
>);
1001 static_assert(!std::equality_comparable_with
<void, int[5]>);
1002 static_assert(!std::equality_comparable_with
<void, int (*)()>);
1003 static_assert(!std::equality_comparable_with
<void, int (&)()>);
1004 static_assert(!std::equality_comparable_with
<void, int S::*>);
1005 static_assert(!std::equality_comparable_with
<void, int (S::*)()>);
1006 static_assert(!std::equality_comparable_with
<void, int (S::*)() noexcept
>);
1007 static_assert(!std::equality_comparable_with
<void, int (S::*)() const>);
1009 !std::equality_comparable_with
<void, int (S::*)() const noexcept
>);
1010 static_assert(!std::equality_comparable_with
<void, int (S::*)() volatile>);
1012 !std::equality_comparable_with
<void, int (S::*)() volatile noexcept
>);
1014 !std::equality_comparable_with
<void, int (S::*)() const volatile>);
1016 !std::equality_comparable_with
<void, int (S::*)() const volatile noexcept
>);
1017 static_assert(!std::equality_comparable_with
<void, int (S::*)() &>);
1018 static_assert(!std::equality_comparable_with
<void, int (S::*)() & noexcept
>);
1019 static_assert(!std::equality_comparable_with
<void, int (S::*)() const&>);
1021 !std::equality_comparable_with
<void, int (S::*)() const & noexcept
>);
1022 static_assert(!std::equality_comparable_with
<void, int (S::*)() volatile&>);
1024 !std::equality_comparable_with
<void, int (S::*)() volatile & noexcept
>);
1026 !std::equality_comparable_with
<void, int (S::*)() const volatile&>);
1027 static_assert(!std::equality_comparable_with
<void, int (S::*)() const volatile &
1029 static_assert(!std::equality_comparable_with
<void, int (S::*)() &&>);
1030 static_assert(!std::equality_comparable_with
< void,
1031 int (S::*)() && noexcept
>);
1032 static_assert(!std::equality_comparable_with
<void, int (S::*)() const&&>);
1033 static_assert(!std::equality_comparable_with
< void,
1034 int (S::*)() const&& noexcept
>);
1035 static_assert(!std::equality_comparable_with
<void, int (S::*)() volatile&&>);
1036 static_assert(!std::equality_comparable_with
< void,
1037 int (S::*)() volatile&& noexcept
>);
1039 !std::equality_comparable_with
<void, int (S::*)() const volatile&&>);
1040 static_assert(!std::equality_comparable_with
< void,
1041 int (S::*)() const volatile&& noexcept
>);
1042 } // namespace fundamentals
1044 namespace standard_types
{
1045 static_assert(check_equality_comparable_with
<std::array
<int, 10>,
1046 std::array
<int, 10> >());
1047 static_assert(!check_equality_comparable_with
<std::array
<int, 10>,
1048 std::array
<double, 10> >());
1050 check_equality_comparable_with
<std::deque
<int>, std::deque
<int> >());
1052 !check_equality_comparable_with
<std::deque
<int>, std::vector
<int> >());
1053 static_assert(check_equality_comparable_with
<std::forward_list
<int>,
1054 std::forward_list
<int> >());
1055 static_assert(!check_equality_comparable_with
<std::forward_list
<int>,
1056 std::vector
<int> >());
1058 check_equality_comparable_with
<std::list
<int>, std::list
<int> >());
1060 !check_equality_comparable_with
<std::list
<int>, std::vector
<int> >());
1062 #ifndef TEST_HAS_NO_THREADS
1063 static_assert(!check_equality_comparable_with
<std::lock_guard
<std::mutex
>,
1064 std::lock_guard
<std::mutex
> >());
1065 static_assert(!check_equality_comparable_with
<std::lock_guard
<std::mutex
>,
1066 std::vector
<int> >());
1067 static_assert(!check_equality_comparable_with
<std::mutex
, std::mutex
>());
1068 static_assert(!check_equality_comparable_with
<std::mutex
, std::vector
<int> >());
1071 static_assert(check_equality_comparable_with
<std::map
<int, void*>,
1072 std::map
<int, void*> >());
1074 !check_equality_comparable_with
<std::map
<int, void*>, std::vector
<int> >());
1076 check_equality_comparable_with
<std::optional
<std::vector
<int> >,
1077 std::optional
<std::vector
<int> > >());
1078 static_assert(check_equality_comparable_with
<std::optional
<std::vector
<int> >,
1079 std::vector
<int> >());
1081 check_equality_comparable_with
<std::vector
<int>, std::vector
<int> >());
1082 static_assert(!check_equality_comparable_with
<std::vector
<int>, int>());
1083 } // namespace standard_types
1085 namespace types_fit_for_purpose
{
1087 check_equality_comparable_with
<cxx20_member_eq
, cxx20_member_eq
>());
1089 check_equality_comparable_with
<cxx20_friend_eq
, cxx20_friend_eq
>());
1091 !check_equality_comparable_with
<cxx20_member_eq
, cxx20_friend_eq
>());
1093 static_assert(check_equality_comparable_with
<member_three_way_comparable
,
1094 member_three_way_comparable
>());
1095 static_assert(check_equality_comparable_with
<friend_three_way_comparable
,
1096 friend_three_way_comparable
>());
1097 static_assert(!check_equality_comparable_with
<member_three_way_comparable
,
1098 friend_three_way_comparable
>());
1101 check_equality_comparable_with
<explicit_operators
, explicit_operators
>());
1102 static_assert(check_equality_comparable_with
<equality_comparable_with_ec1
,
1103 equality_comparable_with_ec1
>());
1104 static_assert(check_equality_comparable_with
<different_return_types
,
1105 different_return_types
>());
1106 static_assert(check_equality_comparable_with
<explicit_operators
,
1107 equality_comparable_with_ec1
>());
1108 static_assert(check_equality_comparable_with
<explicit_operators
,
1109 different_return_types
>());
1111 static_assert(check_equality_comparable_with
<one_way_eq
, one_way_eq
>());
1113 std::common_reference_with
<one_way_eq
const&, explicit_operators
const&>);
1115 !check_equality_comparable_with
<one_way_eq
, explicit_operators
>());
1117 static_assert(check_equality_comparable_with
<one_way_ne
, one_way_ne
>());
1119 std::common_reference_with
<one_way_ne
const&, explicit_operators
const&>);
1121 !check_equality_comparable_with
<one_way_ne
, explicit_operators
>());
1122 } // namespace types_fit_for_purpose