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
19 #include <forward_list>
25 #include "test_macros.h"
27 #ifndef TEST_HAS_NO_THREADS
31 #include "compare_types.h"
33 template <class T
, class U
>
34 constexpr bool check_equality_comparable_with() {
35 constexpr bool result
= std::equality_comparable_with
<T
, U
>;
36 static_assert(std::equality_comparable_with
<U
, T
> == result
);
37 static_assert(std::equality_comparable_with
<T
, U
const> == result
);
38 static_assert(std::equality_comparable_with
<T
const, U
const> == result
);
39 static_assert(std::equality_comparable_with
<T
, U
const&> == result
);
40 static_assert(std::equality_comparable_with
<T
const, U
const&> == result
);
41 static_assert(std::equality_comparable_with
<T
&, U
const> == result
);
42 static_assert(std::equality_comparable_with
<T
const&, U
const> == result
);
43 static_assert(std::equality_comparable_with
<T
&, U
const&> == result
);
44 static_assert(std::equality_comparable_with
<T
const&, U
const&> == result
);
45 static_assert(std::equality_comparable_with
<T
, U
const&&> == result
);
46 static_assert(std::equality_comparable_with
<T
const, U
const&&> == result
);
47 static_assert(std::equality_comparable_with
<T
&, U
const&&> == result
);
48 static_assert(std::equality_comparable_with
<T
const&, U
const&&> == result
);
49 static_assert(std::equality_comparable_with
<T
&&, U
const> == result
);
50 static_assert(std::equality_comparable_with
<T
const&&, U
const> == result
);
51 static_assert(std::equality_comparable_with
<T
&&, U
const&> == result
);
52 static_assert(std::equality_comparable_with
<T
const&&, U
const&> == result
);
53 static_assert(std::equality_comparable_with
<T
&&, U
const&&> == result
);
54 static_assert(std::equality_comparable_with
<T
const&&, U
const&&> == result
);
58 namespace fundamentals
{
59 static_assert(check_equality_comparable_with
<int, int>());
60 static_assert(check_equality_comparable_with
<int, bool>());
61 static_assert(check_equality_comparable_with
<int, char>());
62 static_assert(check_equality_comparable_with
<int, wchar_t>());
63 static_assert(check_equality_comparable_with
<int, double>());
64 static_assert(!check_equality_comparable_with
<int, int*>());
65 static_assert(!check_equality_comparable_with
<int, int[5]>());
66 static_assert(!check_equality_comparable_with
<int, int (*)()>());
67 static_assert(!check_equality_comparable_with
<int, int (&)()>());
70 static_assert(!check_equality_comparable_with
<int, int S::*>());
71 static_assert(!check_equality_comparable_with
<int, int (S::*)()>());
72 static_assert(!check_equality_comparable_with
<int, int (S::*)() noexcept
>());
73 static_assert(!check_equality_comparable_with
<int, int (S::*)() const>());
75 !check_equality_comparable_with
<int, int (S::*)() const noexcept
>());
76 static_assert(!check_equality_comparable_with
<int, int (S::*)() volatile>());
78 !check_equality_comparable_with
<int, int (S::*)() volatile noexcept
>());
80 !check_equality_comparable_with
<int, int (S::*)() const volatile>());
81 static_assert(!check_equality_comparable_with
<
82 int, int (S::*)() const volatile noexcept
>());
83 static_assert(!check_equality_comparable_with
<int, int (S::*)() &>());
84 static_assert(!check_equality_comparable_with
<int, int (S::*)() & noexcept
>());
85 static_assert(!check_equality_comparable_with
<int, int (S::*)() const&>());
87 !check_equality_comparable_with
<int, int (S::*)() const & noexcept
>());
88 static_assert(!check_equality_comparable_with
<int, int (S::*)() volatile&>());
90 !check_equality_comparable_with
<int, int (S::*)() volatile & noexcept
>());
92 !check_equality_comparable_with
<int, int (S::*)() const volatile&>());
93 static_assert(!check_equality_comparable_with
<int, int (S::*)() const volatile &
95 static_assert(!check_equality_comparable_with
<int, int (S::*)() &&>());
96 static_assert(!check_equality_comparable_with
< int,
97 int (S::*)() && noexcept
> ());
98 static_assert(!check_equality_comparable_with
<int, int (S::*)() const&&>());
99 static_assert(!check_equality_comparable_with
< int,
100 int (S::*)() const&& noexcept
> ());
101 static_assert(!check_equality_comparable_with
<int, int (S::*)() volatile&&>());
102 static_assert(!check_equality_comparable_with
< int,
103 int (S::*)() volatile&& noexcept
> ());
105 !check_equality_comparable_with
<int, int (S::*)() const volatile&&>());
106 static_assert(!check_equality_comparable_with
< int,
107 int (S::*)() const volatile&& noexcept
> ());
109 static_assert(check_equality_comparable_with
<int*, int*>());
110 static_assert(check_equality_comparable_with
<int*, int[5]>());
111 static_assert(!check_equality_comparable_with
<int*, int (*)()>());
112 static_assert(!check_equality_comparable_with
<int*, int (&)()>());
113 static_assert(!check_equality_comparable_with
<int*, int (S::*)()>());
114 static_assert(!check_equality_comparable_with
<int*, int (S::*)() noexcept
>());
115 static_assert(!check_equality_comparable_with
<int*, int (S::*)() const>());
117 !check_equality_comparable_with
<int*, int (S::*)() const noexcept
>());
118 static_assert(!check_equality_comparable_with
<int*, int (S::*)() volatile>());
120 !check_equality_comparable_with
<int*, int (S::*)() volatile noexcept
>());
122 !check_equality_comparable_with
<int*, int (S::*)() const volatile>());
123 static_assert(!check_equality_comparable_with
<
124 int*, int (S::*)() const volatile noexcept
>());
125 static_assert(!check_equality_comparable_with
<int*, int (S::*)() &>());
126 static_assert(!check_equality_comparable_with
<int*, int (S::*)() & noexcept
>());
127 static_assert(!check_equality_comparable_with
<int*, int (S::*)() const&>());
129 !check_equality_comparable_with
<int*, int (S::*)() const & noexcept
>());
130 static_assert(!check_equality_comparable_with
<int*, int (S::*)() volatile&>());
132 !check_equality_comparable_with
<int*, int (S::*)() volatile & noexcept
>());
134 !check_equality_comparable_with
<int*, int (S::*)() const volatile&>());
135 static_assert(!check_equality_comparable_with
<
136 int*, int (S::*)() const volatile & noexcept
>());
137 static_assert(!check_equality_comparable_with
<int*, int (S::*)() &&>());
138 static_assert(!check_equality_comparable_with
< int*,
139 int (S::*)() && noexcept
> ());
140 static_assert(!check_equality_comparable_with
<int*, int (S::*)() const&&>());
141 static_assert(!check_equality_comparable_with
< int*,
142 int (S::*)() const&& noexcept
> ());
143 static_assert(!check_equality_comparable_with
<int*, int (S::*)() volatile&&>());
144 static_assert(!check_equality_comparable_with
< int*,
145 int (S::*)() volatile&& noexcept
> ());
147 !check_equality_comparable_with
<int*, int (S::*)() const volatile&&>());
148 static_assert(!check_equality_comparable_with
< int*,
149 int (S::*)() const volatile&& noexcept
> ());
151 static_assert(check_equality_comparable_with
<int[5], int[5]>());
152 static_assert(!check_equality_comparable_with
<int[5], int (*)()>());
153 static_assert(!check_equality_comparable_with
<int[5], int (&)()>());
154 static_assert(!check_equality_comparable_with
<int[5], int (S::*)()>());
155 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() noexcept
>());
156 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() const>());
158 !check_equality_comparable_with
<int[5], int (S::*)() const noexcept
>());
159 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() volatile>());
161 !check_equality_comparable_with
<int[5], int (S::*)() volatile noexcept
>());
163 !check_equality_comparable_with
<int[5], int (S::*)() const volatile>());
164 static_assert(!check_equality_comparable_with
<
165 int[5], int (S::*)() const volatile noexcept
>());
166 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() &>());
168 !check_equality_comparable_with
<int[5], int (S::*)() & noexcept
>());
169 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() const&>());
171 !check_equality_comparable_with
<int[5], int (S::*)() const & noexcept
>());
173 !check_equality_comparable_with
<int[5], int (S::*)() volatile&>());
174 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() volatile &
177 !check_equality_comparable_with
<int[5], int (S::*)() const volatile&>());
178 static_assert(!check_equality_comparable_with
<
179 int[5], int (S::*)() const volatile & noexcept
>());
180 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() &&>());
181 static_assert(!check_equality_comparable_with
< int[5],
182 int (S::*)() && noexcept
> ());
183 static_assert(!check_equality_comparable_with
<int[5], int (S::*)() const&&>());
184 static_assert(!check_equality_comparable_with
< int[5],
185 int (S::*)() const&& noexcept
> ());
187 !check_equality_comparable_with
<int[5], int (S::*)() volatile&&>());
188 static_assert(!check_equality_comparable_with
< int[5],
189 int (S::*)() volatile&& noexcept
> ());
191 !check_equality_comparable_with
<int[5], int (S::*)() const volatile&&>());
192 static_assert(!check_equality_comparable_with
< int[5],
193 int (S::*)() const volatile&& noexcept
> ());
195 static_assert(check_equality_comparable_with
<int (*)(), int (*)()>());
196 static_assert(check_equality_comparable_with
<int (*)(), int (&)()>());
197 static_assert(!check_equality_comparable_with
<int (*)(), int (S::*)()>());
199 !check_equality_comparable_with
<int (*)(), int (S::*)() noexcept
>());
200 static_assert(!check_equality_comparable_with
<int (*)(), int (S::*)() const>());
202 !check_equality_comparable_with
<int (*)(), int (S::*)() const noexcept
>());
204 !check_equality_comparable_with
<int (*)(), int (S::*)() volatile>());
205 static_assert(!check_equality_comparable_with
<
206 int (*)(), int (S::*)() volatile noexcept
>());
208 !check_equality_comparable_with
<int (*)(), int (S::*)() const volatile>());
209 static_assert(!check_equality_comparable_with
<
210 int (*)(), int (S::*)() const volatile noexcept
>());
211 static_assert(!check_equality_comparable_with
<int (*)(), int (S::*)() &>());
213 !check_equality_comparable_with
<int (*)(), int (S::*)() & noexcept
>());
215 !check_equality_comparable_with
<int (*)(), int (S::*)() const&>());
216 static_assert(!check_equality_comparable_with
<int (*)(),
217 int (S::*)() const & noexcept
>());
219 !check_equality_comparable_with
<int (*)(), int (S::*)() volatile&>());
220 static_assert(!check_equality_comparable_with
<int (*)(), int (S::*)() volatile &
223 !check_equality_comparable_with
<int (*)(), int (S::*)() const volatile&>());
224 static_assert(!check_equality_comparable_with
<
225 int (*)(), int (S::*)() const volatile & noexcept
>());
226 static_assert(!check_equality_comparable_with
<int (*)(), int (S::*)() &&>());
227 static_assert(!check_equality_comparable_with
< int (*)(),
228 int (S::*)() && noexcept
> ());
230 !check_equality_comparable_with
<int (*)(), int (S::*)() const&&>());
231 static_assert(!check_equality_comparable_with
< int (*)(),
232 int (S::*)() const&& noexcept
> ());
234 !check_equality_comparable_with
<int (*)(), int (S::*)() volatile&&>());
235 static_assert(!check_equality_comparable_with
< int (*)(),
236 int (S::*)() volatile&& noexcept
> ());
237 static_assert(!check_equality_comparable_with
<int (*)(),
238 int (S::*)() const volatile&&>());
239 static_assert(!check_equality_comparable_with
< int (*)(),
240 int (S::*)() const volatile&& noexcept
> ());
242 static_assert(check_equality_comparable_with
<int (&)(), int (&)()>());
243 static_assert(!check_equality_comparable_with
<int (&)(), int (S::*)()>());
245 !check_equality_comparable_with
<int (&)(), int (S::*)() noexcept
>());
246 static_assert(!check_equality_comparable_with
<int (&)(), int (S::*)() const>());
248 !check_equality_comparable_with
<int (&)(), int (S::*)() const noexcept
>());
250 !check_equality_comparable_with
<int (&)(), int (S::*)() volatile>());
251 static_assert(!check_equality_comparable_with
<
252 int (&)(), int (S::*)() volatile noexcept
>());
254 !check_equality_comparable_with
<int (&)(), int (S::*)() const volatile>());
255 static_assert(!check_equality_comparable_with
<
256 int (&)(), int (S::*)() const volatile noexcept
>());
257 static_assert(!check_equality_comparable_with
<int (&)(), int (S::*)() &>());
259 !check_equality_comparable_with
<int (&)(), int (S::*)() & noexcept
>());
261 !check_equality_comparable_with
<int (&)(), int (S::*)() const&>());
262 static_assert(!check_equality_comparable_with
<int (&)(),
263 int (S::*)() const & noexcept
>());
265 !check_equality_comparable_with
<int (&)(), int (S::*)() volatile&>());
266 static_assert(!check_equality_comparable_with
<int (&)(), int (S::*)() volatile &
269 !check_equality_comparable_with
<int (&)(), int (S::*)() const volatile&>());
270 static_assert(!check_equality_comparable_with
<
271 int (&)(), int (S::*)() const volatile & noexcept
>());
272 static_assert(!check_equality_comparable_with
<int (&)(), int (S::*)() &&>());
273 static_assert(!check_equality_comparable_with
< int (&)(),
274 int (S::*)() && noexcept
> ());
276 !check_equality_comparable_with
<int (&)(), int (S::*)() const&&>());
277 static_assert(!check_equality_comparable_with
< int (&)(),
278 int (S::*)() const&& noexcept
> ());
280 !check_equality_comparable_with
<int (&)(), int (S::*)() volatile&&>());
281 static_assert(!check_equality_comparable_with
< int (&)(),
282 int (S::*)() volatile&& noexcept
> ());
283 static_assert(!check_equality_comparable_with
<int (&)(),
284 int (S::*)() const volatile&&>());
285 static_assert(!check_equality_comparable_with
< int (&)(),
286 int (S::*)() const volatile&& noexcept
> ());
288 static_assert(check_equality_comparable_with
<int (S::*)(), int (S::*)()>());
290 check_equality_comparable_with
<int (S::*)(), int (S::*)() noexcept
>());
292 !check_equality_comparable_with
<int (S::*)(), int (S::*)() const>());
293 static_assert(!check_equality_comparable_with
<int (S::*)(),
294 int (S::*)() const noexcept
>());
296 !check_equality_comparable_with
<int (S::*)(), int (S::*)() volatile>());
297 static_assert(!check_equality_comparable_with
<
298 int (S::*)(), int (S::*)() volatile noexcept
>());
299 static_assert(!check_equality_comparable_with
<int (S::*)(),
300 int (S::*)() const volatile>());
301 static_assert(!check_equality_comparable_with
<
302 int (S::*)(), int (S::*)() const volatile noexcept
>());
303 static_assert(!check_equality_comparable_with
<int (S::*)(), int (S::*)() &>());
305 !check_equality_comparable_with
<int (S::*)(), int (S::*)() & noexcept
>());
307 !check_equality_comparable_with
<int (S::*)(), int (S::*)() const&>());
308 static_assert(!check_equality_comparable_with
<int (S::*)(),
309 int (S::*)() const & noexcept
>());
311 !check_equality_comparable_with
<int (S::*)(), int (S::*)() volatile&>());
312 static_assert(!check_equality_comparable_with
<
313 int (S::*)(), int (S::*)() volatile & noexcept
>());
314 static_assert(!check_equality_comparable_with
<int (S::*)(),
315 int (S::*)() const volatile&>());
316 static_assert(!check_equality_comparable_with
<
317 int (S::*)(), int (S::*)() const volatile & noexcept
>());
318 static_assert(!check_equality_comparable_with
<int (S::*)(), int (S::*)() &&>());
319 static_assert(!check_equality_comparable_with
< int (S::*)(),
320 int (S::*)() && noexcept
> ());
322 !check_equality_comparable_with
<int (S::*)(), int (S::*)() const&&>());
323 static_assert(!check_equality_comparable_with
< int (S::*)(),
324 int (S::*)() const&& noexcept
> ());
326 !check_equality_comparable_with
<int (S::*)(), int (S::*)() volatile&&>());
327 static_assert(!check_equality_comparable_with
< int (S::*)(),
328 int (S::*)() volatile&& noexcept
> ());
329 static_assert(!check_equality_comparable_with
<int (S::*)(),
330 int (S::*)() const volatile&&>());
331 static_assert(!check_equality_comparable_with
< int (S::*)(),
332 int (S::*)() const volatile&& noexcept
> ());
334 static_assert(check_equality_comparable_with
<int (S::*)() noexcept
,
335 int (S::*)() noexcept
>());
336 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
337 int (S::*)() const>());
338 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
339 int (S::*)() const noexcept
>());
340 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
341 int (S::*)() volatile>());
342 static_assert(!check_equality_comparable_with
<
343 int (S::*)() noexcept
, int (S::*)() volatile noexcept
>());
344 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
345 int (S::*)() const volatile>());
346 static_assert(!check_equality_comparable_with
<
347 int (S::*)() noexcept
, int (S::*)() const volatile noexcept
>());
349 !check_equality_comparable_with
<int (S::*)() noexcept
, int (S::*)() &>());
350 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
351 int (S::*)() & noexcept
>());
352 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
353 int (S::*)() const&>());
354 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
355 int (S::*)() const & noexcept
>());
356 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
357 int (S::*)() volatile&>());
358 static_assert(!check_equality_comparable_with
<
359 int (S::*)() noexcept
, int (S::*)() volatile & noexcept
>());
360 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
361 int (S::*)() const volatile&>());
362 static_assert(!check_equality_comparable_with
<
363 int (S::*)() noexcept
, int (S::*)() const volatile & noexcept
>());
365 !check_equality_comparable_with
<int (S::*)() noexcept
, int (S::*)() &&>());
366 static_assert(!check_equality_comparable_with
< int (S::*)() noexcept
,
367 int (S::*)() && noexcept
> ());
368 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
369 int (S::*)() const&&>());
370 static_assert(!check_equality_comparable_with
< int (S::*)() noexcept
,
371 int (S::*)() const&& noexcept
> ());
372 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
373 int (S::*)() volatile&&>());
374 static_assert(!check_equality_comparable_with
< int (S::*)() noexcept
,
375 int (S::*)() volatile&& noexcept
> ());
376 static_assert(!check_equality_comparable_with
<int (S::*)() noexcept
,
377 int (S::*)() const volatile&&>());
378 static_assert(!check_equality_comparable_with
< int (S::*)() noexcept
,
379 int (S::*)() const volatile&& noexcept
> ());
382 check_equality_comparable_with
<int (S::*)() const, int (S::*)() const>());
383 static_assert(check_equality_comparable_with
<int (S::*)() const,
384 int (S::*)() const noexcept
>());
385 static_assert(!check_equality_comparable_with
<int (S::*)() const,
386 int (S::*)() volatile>());
387 static_assert(!check_equality_comparable_with
<
388 int (S::*)() const, int (S::*)() volatile noexcept
>());
389 static_assert(!check_equality_comparable_with
<int (S::*)() const,
390 int (S::*)() const volatile>());
391 static_assert(!check_equality_comparable_with
<
392 int (S::*)() const, int (S::*)() const volatile noexcept
>());
394 !check_equality_comparable_with
<int (S::*)() const, int (S::*)() &>());
395 static_assert(!check_equality_comparable_with
<int (S::*)() const,
396 int (S::*)() & noexcept
>());
398 !check_equality_comparable_with
<int (S::*)() const, int (S::*)() const&>());
399 static_assert(!check_equality_comparable_with
<int (S::*)() const,
400 int (S::*)() const & noexcept
>());
401 static_assert(!check_equality_comparable_with
<int (S::*)() const,
402 int (S::*)() volatile&>());
403 static_assert(!check_equality_comparable_with
<
404 int (S::*)() const, int (S::*)() volatile & noexcept
>());
405 static_assert(!check_equality_comparable_with
<int (S::*)() const,
406 int (S::*)() const volatile&>());
407 static_assert(!check_equality_comparable_with
<
408 int (S::*)() const, int (S::*)() const volatile & noexcept
>());
410 !check_equality_comparable_with
<int (S::*)() const, int (S::*)() &&>());
411 static_assert(!check_equality_comparable_with
< int (S::*)() const,
412 int (S::*)() && noexcept
> ());
413 static_assert(!check_equality_comparable_with
<int (S::*)() const,
414 int (S::*)() const&&>());
415 static_assert(!check_equality_comparable_with
< int (S::*)() const,
416 int (S::*)() const&& noexcept
> ());
417 static_assert(!check_equality_comparable_with
<int (S::*)() const,
418 int (S::*)() volatile&&>());
419 static_assert(!check_equality_comparable_with
< int (S::*)() const,
420 int (S::*)() volatile&& noexcept
> ());
421 static_assert(!check_equality_comparable_with
<int (S::*)() const,
422 int (S::*)() const volatile&&>());
423 static_assert(!check_equality_comparable_with
< int (S::*)() const,
424 int (S::*)() const volatile&& noexcept
> ());
426 static_assert(check_equality_comparable_with
<int (S::*)() const noexcept
,
427 int (S::*)() const noexcept
>());
428 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
429 int (S::*)() volatile>());
430 static_assert(!check_equality_comparable_with
<
431 int (S::*)() const noexcept
, int (S::*)() volatile noexcept
>());
432 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
433 int (S::*)() const volatile>());
435 !check_equality_comparable_with
<int (S::*)() const noexcept
,
436 int (S::*)() const volatile noexcept
>());
437 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
439 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
440 int (S::*)() & noexcept
>());
441 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
442 int (S::*)() const&>());
443 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
444 int (S::*)() const & noexcept
>());
445 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
446 int (S::*)() volatile&>());
447 static_assert(!check_equality_comparable_with
<
448 int (S::*)() const noexcept
, int (S::*)() volatile & noexcept
>());
449 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
450 int (S::*)() const volatile&>());
452 !check_equality_comparable_with
<int (S::*)() const noexcept
,
453 int (S::*)() const volatile & noexcept
>());
454 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
456 static_assert(!check_equality_comparable_with
< int (S::*)() const noexcept
,
457 int (S::*)() && noexcept
> ());
458 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
459 int (S::*)() const&&>());
460 static_assert(!check_equality_comparable_with
< int (S::*)() const noexcept
,
461 int (S::*)() const&& noexcept
> ());
462 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
463 int (S::*)() volatile&&>());
464 static_assert(!check_equality_comparable_with
< int (S::*)() const noexcept
,
465 int (S::*)() volatile&& noexcept
> ());
466 static_assert(!check_equality_comparable_with
<int (S::*)() const noexcept
,
467 int (S::*)() const volatile&&>());
468 static_assert(!check_equality_comparable_with
< int (S::*)() const noexcept
,
469 int (S::*)() const volatile&& noexcept
> ());
471 static_assert(check_equality_comparable_with
<int (S::*)() volatile,
472 int (S::*)() volatile>());
473 static_assert(check_equality_comparable_with
<int (S::*)() volatile,
474 int (S::*)() volatile noexcept
>());
475 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
476 int (S::*)() const volatile>());
477 static_assert(!check_equality_comparable_with
<
478 int (S::*)() volatile, int (S::*)() const volatile noexcept
>());
480 !check_equality_comparable_with
<int (S::*)() volatile, int (S::*)() &>());
481 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
482 int (S::*)() & noexcept
>());
483 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
484 int (S::*)() const&>());
485 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
486 int (S::*)() const & noexcept
>());
487 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
488 int (S::*)() volatile&>());
489 static_assert(!check_equality_comparable_with
<
490 int (S::*)() volatile, int (S::*)() volatile & noexcept
>());
491 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
492 int (S::*)() const volatile&>());
493 static_assert(!check_equality_comparable_with
<
494 int (S::*)() volatile, int (S::*)() const volatile & noexcept
>());
496 !check_equality_comparable_with
<int (S::*)() volatile, int (S::*)() &&>());
497 static_assert(!check_equality_comparable_with
< int (S::*)() volatile,
498 int (S::*)() && noexcept
> ());
499 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
500 int (S::*)() const&&>());
501 static_assert(!check_equality_comparable_with
< int (S::*)() volatile,
502 int (S::*)() const&& noexcept
> ());
503 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
504 int (S::*)() volatile&&>());
505 static_assert(!check_equality_comparable_with
< int (S::*)() volatile,
506 int (S::*)() volatile&& noexcept
> ());
507 static_assert(!check_equality_comparable_with
<int (S::*)() volatile,
508 int (S::*)() const volatile&&>());
509 static_assert(!check_equality_comparable_with
< int (S::*)() volatile,
510 int (S::*)() const volatile&& noexcept
> ());
512 static_assert(check_equality_comparable_with
<int (S::*)() volatile noexcept
,
513 int (S::*)() volatile noexcept
>());
514 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
515 int (S::*)() const volatile>());
517 !check_equality_comparable_with
<int (S::*)() volatile noexcept
,
518 int (S::*)() const volatile noexcept
>());
519 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
521 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
522 int (S::*)() & noexcept
>());
523 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
524 int (S::*)() const&>());
525 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
526 int (S::*)() const & noexcept
>());
527 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
528 int (S::*)() volatile&>());
530 !check_equality_comparable_with
<int (S::*)() volatile noexcept
,
531 int (S::*)() volatile & noexcept
>());
532 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
533 int (S::*)() const volatile&>());
535 !check_equality_comparable_with
<int (S::*)() volatile noexcept
,
536 int (S::*)() const volatile & noexcept
>());
537 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
539 static_assert(!check_equality_comparable_with
< int (S::*)() volatile noexcept
,
540 int (S::*)() && noexcept
> ());
541 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
542 int (S::*)() const&&>());
543 static_assert(!check_equality_comparable_with
< int (S::*)() volatile noexcept
,
544 int (S::*)() const&& noexcept
> ());
545 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
546 int (S::*)() volatile&&>());
547 static_assert(!check_equality_comparable_with
< int (S::*)() volatile noexcept
,
548 int (S::*)() volatile&& noexcept
> ());
549 static_assert(!check_equality_comparable_with
<int (S::*)() volatile noexcept
,
550 int (S::*)() const volatile&&>());
551 static_assert(!check_equality_comparable_with
< int (S::*)() volatile noexcept
,
552 int (S::*)() const volatile&& noexcept
> ());
554 static_assert(check_equality_comparable_with
<int (S::*)() const volatile,
555 int (S::*)() const volatile>());
557 check_equality_comparable_with
<int (S::*)() const volatile,
558 int (S::*)() const volatile noexcept
>());
559 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
561 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
562 int (S::*)() & noexcept
>());
563 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
564 int (S::*)() const&>());
565 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
566 int (S::*)() const & noexcept
>());
567 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
568 int (S::*)() volatile&>());
569 static_assert(!check_equality_comparable_with
<
570 int (S::*)() const volatile, int (S::*)() volatile & noexcept
>());
571 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
572 int (S::*)() const volatile&>());
574 !check_equality_comparable_with
<int (S::*)() const volatile,
575 int (S::*)() const volatile & noexcept
>());
576 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
578 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile,
579 int (S::*)() && noexcept
> ());
580 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
581 int (S::*)() const&&>());
582 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile,
583 int (S::*)() const&& noexcept
> ());
584 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
585 int (S::*)() volatile&&>());
586 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile,
587 int (S::*)() volatile&& noexcept
> ());
588 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile,
589 int (S::*)() const volatile&&>());
590 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile,
591 int (S::*)() const volatile&& noexcept
> ());
594 check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
595 int (S::*)() const volatile noexcept
>());
596 static_assert(!check_equality_comparable_with
<
597 int (S::*)() const volatile noexcept
, int (S::*)() &>());
598 static_assert(!check_equality_comparable_with
<
599 int (S::*)() const volatile noexcept
, int (S::*)() & noexcept
>());
600 static_assert(!check_equality_comparable_with
<
601 int (S::*)() const volatile noexcept
, int (S::*)() const&>());
603 !check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
604 int (S::*)() const & noexcept
>());
605 static_assert(!check_equality_comparable_with
<
606 int (S::*)() const volatile noexcept
, int (S::*)() volatile&>());
608 !check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
609 int (S::*)() volatile & noexcept
>());
611 !check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
612 int (S::*)() const volatile&>());
614 !check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
615 int (S::*)() const volatile & noexcept
>());
616 static_assert(!check_equality_comparable_with
<
617 int (S::*)() const volatile noexcept
, int (S::*)() &&>());
618 static_assert(!check_equality_comparable_with
< int (S::*)()
619 const volatile noexcept
,
620 int (S::*)() && noexcept
> ());
621 static_assert(!check_equality_comparable_with
<
622 int (S::*)() const volatile noexcept
, int (S::*)() const&&>());
623 static_assert(!check_equality_comparable_with
< int (S::*)()
624 const volatile noexcept
,
625 int (S::*)() const&& noexcept
> ());
626 static_assert(!check_equality_comparable_with
<
627 int (S::*)() const volatile noexcept
, int (S::*)() volatile&&>());
628 static_assert(!check_equality_comparable_with
< int (S::*)()
629 const volatile noexcept
,
630 int (S::*)() volatile&& noexcept
> ());
632 !check_equality_comparable_with
<int (S::*)() const volatile noexcept
,
633 int (S::*)() const volatile&&>());
634 static_assert(!check_equality_comparable_with
< int (S::*)()
635 const volatile noexcept
,
636 int (S::*)() const volatile&& noexcept
> ());
638 static_assert(check_equality_comparable_with
<int (S::*)() &, int (S::*)() &>());
640 check_equality_comparable_with
<int (S::*)() &, int (S::*)() & noexcept
>());
642 !check_equality_comparable_with
<int (S::*)() &, int (S::*)() const&>());
643 static_assert(!check_equality_comparable_with
<int (S::*)() &,
644 int (S::*)() const & noexcept
>());
646 !check_equality_comparable_with
<int (S::*)() &, int (S::*)() volatile&>());
647 static_assert(!check_equality_comparable_with
<
648 int (S::*)() &, int (S::*)() volatile & noexcept
>());
649 static_assert(!check_equality_comparable_with
<int (S::*)() &,
650 int (S::*)() const volatile&>());
651 static_assert(!check_equality_comparable_with
<
652 int (S::*)() &, int (S::*)() const volatile & noexcept
>());
654 !check_equality_comparable_with
<int (S::*)() &, int (S::*)() &&>());
655 static_assert(!check_equality_comparable_with
< int (S::*)() &,
656 int (S::*)() && noexcept
> ());
658 !check_equality_comparable_with
<int (S::*)() &, int (S::*)() const&&>());
659 static_assert(!check_equality_comparable_with
< int (S::*)() &,
660 int (S::*)() const&& noexcept
> ());
662 !check_equality_comparable_with
<int (S::*)() &, int (S::*)() volatile&&>());
663 static_assert(!check_equality_comparable_with
< int (S::*)() &,
664 int (S::*)() volatile&& noexcept
> ());
665 static_assert(!check_equality_comparable_with
<int (S::*)() &,
666 int (S::*)() const volatile&&>());
667 static_assert(!check_equality_comparable_with
< int (S::*)() &,
668 int (S::*)() const volatile&& noexcept
> ());
670 static_assert(check_equality_comparable_with
<int (S::*)() & noexcept
,
671 int (S::*)() & noexcept
>());
672 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
673 int (S::*)() const&>());
674 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
675 int (S::*)() const & noexcept
>());
676 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
677 int (S::*)() volatile&>());
678 static_assert(!check_equality_comparable_with
<
679 int (S::*)() & noexcept
, int (S::*)() volatile & noexcept
>());
680 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
681 int (S::*)() const volatile&>());
683 !check_equality_comparable_with
<int (S::*)() & noexcept
,
684 int (S::*)() const volatile & noexcept
>());
685 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
687 static_assert(!check_equality_comparable_with
< int (S::*)() & noexcept
,
688 int (S::*)() && noexcept
> ());
689 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
690 int (S::*)() const&&>());
691 static_assert(!check_equality_comparable_with
< int (S::*)() & noexcept
,
692 int (S::*)() const&& noexcept
> ());
693 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
694 int (S::*)() volatile&&>());
695 static_assert(!check_equality_comparable_with
< int (S::*)() & noexcept
,
696 int (S::*)() volatile&& noexcept
> ());
697 static_assert(!check_equality_comparable_with
<int (S::*)() & noexcept
,
698 int (S::*)() const volatile&&>());
699 static_assert(!check_equality_comparable_with
< int (S::*)() & noexcept
,
700 int (S::*)() const volatile&& noexcept
> ());
703 check_equality_comparable_with
<int (S::*)() const&, int (S::*)() const&>());
704 static_assert(check_equality_comparable_with
<int (S::*)() const&,
705 int (S::*)() const & noexcept
>());
706 static_assert(!check_equality_comparable_with
<int (S::*)() const&,
707 int (S::*)() volatile&>());
708 static_assert(!check_equality_comparable_with
<
709 int (S::*)() const&, int (S::*)() volatile & noexcept
>());
710 static_assert(!check_equality_comparable_with
<int (S::*)() const&,
711 int (S::*)() const volatile&>());
712 static_assert(!check_equality_comparable_with
<
713 int (S::*)() const&, int (S::*)() const volatile & noexcept
>());
715 !check_equality_comparable_with
<int (S::*)() const&, int (S::*)() &&>());
716 static_assert(!check_equality_comparable_with
< int (S::*)() const&,
717 int (S::*)() && noexcept
> ());
718 static_assert(!check_equality_comparable_with
<int (S::*)() const&,
719 int (S::*)() const&&>());
720 static_assert(!check_equality_comparable_with
< int (S::*)() const&,
721 int (S::*)() const&& noexcept
> ());
722 static_assert(!check_equality_comparable_with
<int (S::*)() const&,
723 int (S::*)() volatile&&>());
724 static_assert(!check_equality_comparable_with
< int (S::*)() const&,
725 int (S::*)() volatile&& noexcept
> ());
726 static_assert(!check_equality_comparable_with
<int (S::*)() const&,
727 int (S::*)() const volatile&&>());
728 static_assert(!check_equality_comparable_with
< int (S::*)() const&,
729 int (S::*)() const volatile&& noexcept
> ());
731 static_assert(check_equality_comparable_with
<int (S::*)() const & noexcept
,
732 int (S::*)() const & noexcept
>());
733 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
734 int (S::*)() volatile&>());
736 !check_equality_comparable_with
<int (S::*)() const & noexcept
,
737 int (S::*)() volatile & noexcept
>());
738 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
739 int (S::*)() const volatile&>());
741 !check_equality_comparable_with
<int (S::*)() const & noexcept
,
742 int (S::*)() const volatile & noexcept
>());
743 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
745 static_assert(!check_equality_comparable_with
< int (S::*)() const& noexcept
,
746 int (S::*)() && noexcept
> ());
747 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
748 int (S::*)() const&&>());
749 static_assert(!check_equality_comparable_with
< int (S::*)() const& noexcept
,
750 int (S::*)() const&& noexcept
> ());
751 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
752 int (S::*)() volatile&&>());
753 static_assert(!check_equality_comparable_with
< int (S::*)() const& noexcept
,
754 int (S::*)() volatile&& noexcept
> ());
755 static_assert(!check_equality_comparable_with
<int (S::*)() const & noexcept
,
756 int (S::*)() const volatile&&>());
757 static_assert(!check_equality_comparable_with
< int (S::*)() const& noexcept
,
758 int (S::*)() const volatile&& noexcept
> ());
760 static_assert(check_equality_comparable_with
<int (S::*)() volatile&,
761 int (S::*)() volatile&>());
762 static_assert(check_equality_comparable_with
<
763 int (S::*)() volatile&, int (S::*)() volatile & noexcept
>());
764 static_assert(!check_equality_comparable_with
<int (S::*)() volatile&,
765 int (S::*)() const volatile&>());
767 !check_equality_comparable_with
<int (S::*)() volatile&,
768 int (S::*)() const volatile & noexcept
>());
770 !check_equality_comparable_with
<int (S::*)() volatile&, int (S::*)() &&>());
771 static_assert(!check_equality_comparable_with
< int (S::*)() volatile&,
772 int (S::*)() && noexcept
> ());
773 static_assert(!check_equality_comparable_with
<int (S::*)() volatile&,
774 int (S::*)() const&&>());
775 static_assert(!check_equality_comparable_with
< int (S::*)() volatile&,
776 int (S::*)() const&& noexcept
> ());
777 static_assert(!check_equality_comparable_with
<int (S::*)() volatile&,
778 int (S::*)() volatile&&>());
779 static_assert(!check_equality_comparable_with
< int (S::*)() volatile&,
780 int (S::*)() volatile&& noexcept
> ());
781 static_assert(!check_equality_comparable_with
<int (S::*)() volatile&,
782 int (S::*)() const volatile&&>());
783 static_assert(!check_equality_comparable_with
< int (S::*)() volatile&,
784 int (S::*)() const volatile&& noexcept
> ());
787 check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
788 int (S::*)() volatile & noexcept
>());
789 static_assert(!check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
790 int (S::*)() const volatile&>());
792 !check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
793 int (S::*)() const volatile & noexcept
>());
794 static_assert(!check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
796 static_assert(!check_equality_comparable_with
< int (S::*)() volatile& noexcept
,
797 int (S::*)() && noexcept
> ());
798 static_assert(!check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
799 int (S::*)() const&&>());
800 static_assert(!check_equality_comparable_with
< int (S::*)() volatile& noexcept
,
801 int (S::*)() const&& noexcept
> ());
802 static_assert(!check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
803 int (S::*)() volatile&&>());
804 static_assert(!check_equality_comparable_with
< int (S::*)() volatile& noexcept
,
805 int (S::*)() volatile&& noexcept
> ());
806 static_assert(!check_equality_comparable_with
<int (S::*)() volatile & noexcept
,
807 int (S::*)() const volatile&&>());
808 static_assert(!check_equality_comparable_with
< int (S::*)() volatile& noexcept
,
809 int (S::*)() const volatile&& noexcept
> ());
811 static_assert(check_equality_comparable_with
<int (S::*)() const volatile&,
812 int (S::*)() const volatile&>());
814 check_equality_comparable_with
<int (S::*)() const volatile&,
815 int (S::*)() const volatile & noexcept
>());
816 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile&,
818 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile&,
819 int (S::*)() && noexcept
> ());
820 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile&,
821 int (S::*)() const&&>());
822 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile&,
823 int (S::*)() const&& noexcept
> ());
824 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile&,
825 int (S::*)() volatile&&>());
826 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile&,
827 int (S::*)() volatile&& noexcept
> ());
828 static_assert(!check_equality_comparable_with
<int (S::*)() const volatile&,
829 int (S::*)() const volatile&&>());
830 static_assert(!check_equality_comparable_with
< int (S::*)() const volatile&,
831 int (S::*)() const volatile&& noexcept
> ());
834 check_equality_comparable_with
<int (S::*)() const volatile & noexcept
,
835 int (S::*)() const volatile & noexcept
>());
836 static_assert(!check_equality_comparable_with
<
837 int (S::*)() const volatile & noexcept
, int (S::*)() &&>());
838 static_assert(!check_equality_comparable_with
< int (S::*)()
839 const volatile& noexcept
,
840 int (S::*)() && noexcept
> ());
841 static_assert(!check_equality_comparable_with
<
842 int (S::*)() const volatile & noexcept
, int (S::*)() const&&>());
843 static_assert(!check_equality_comparable_with
< int (S::*)()
844 const volatile& noexcept
,
845 int (S::*)() const&& noexcept
> ());
847 !check_equality_comparable_with
<int (S::*)() const volatile & noexcept
,
848 int (S::*)() volatile&&>());
849 static_assert(!check_equality_comparable_with
< int (S::*)()
850 const volatile& noexcept
,
851 int (S::*)() volatile&& noexcept
> ());
853 !check_equality_comparable_with
<int (S::*)() const volatile & noexcept
,
854 int (S::*)() const volatile&&>());
855 static_assert(!check_equality_comparable_with
< int (S::*)()
856 const volatile& noexcept
,
857 int (S::*)() const volatile&& noexcept
> ());
860 check_equality_comparable_with
<int (S::*)() &&, int (S::*)() &&>());
861 static_assert(check_equality_comparable_with
<int (S::*)() &&,
862 int (S::*)() && noexcept
>());
864 !check_equality_comparable_with
<int (S::*)() &&, int (S::*)() const&&>());
865 static_assert(!check_equality_comparable_with
< int (S::*)() &&,
866 int (S::*)() const&& noexcept
> ());
867 static_assert(!check_equality_comparable_with
<int (S::*)() &&,
868 int (S::*)() volatile&&>());
869 static_assert(!check_equality_comparable_with
< int (S::*)() &&,
870 int (S::*)() volatile&& noexcept
> ());
871 static_assert(!check_equality_comparable_with
<int (S::*)() &&,
872 int (S::*)() const volatile&&>());
873 static_assert(!check_equality_comparable_with
< int (S::*)() &&,
874 int (S::*)() const volatile&& noexcept
> ());
876 static_assert(check_equality_comparable_with
<int (S::*)() && noexcept
,
877 int (S::*)() && noexcept
>());
878 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
879 int (S::*)() const&& > ());
880 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
881 int (S::*)() const&& noexcept
> ());
882 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
883 int (S::*)() volatile&& > ());
884 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
885 int (S::*)() volatile&& noexcept
> ());
886 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
887 int (S::*)() const volatile&& > ());
888 static_assert(!check_equality_comparable_with
< int (S::*)() && noexcept
,
889 int (S::*)() const volatile&& noexcept
> ());
891 static_assert(check_equality_comparable_with
<int (S::*)() const&&,
892 int (S::*)() const&&>());
893 static_assert(check_equality_comparable_with
<int (S::*)() const&&,
894 int (S::*)() const && noexcept
>());
895 static_assert(!check_equality_comparable_with
<int (S::*)() const&&,
896 int (S::*)() volatile&&>());
897 static_assert(!check_equality_comparable_with
< int (S::*)() const&&,
898 int (S::*)() volatile&& noexcept
> ());
899 static_assert(!check_equality_comparable_with
<int (S::*)() const&&,
900 int (S::*)() const volatile&&>());
901 static_assert(!check_equality_comparable_with
< int (S::*)() const&&,
902 int (S::*)() const volatile&& noexcept
> ());
904 static_assert(check_equality_comparable_with
<int (S::*)() const && noexcept
,
905 int (S::*)() const && noexcept
>());
906 static_assert(!check_equality_comparable_with
< int (S::*)() const&& noexcept
,
907 int (S::*)() volatile&& > ());
908 static_assert(!check_equality_comparable_with
< int (S::*)() const&& noexcept
,
909 int (S::*)() volatile&& noexcept
> ());
910 static_assert(!check_equality_comparable_with
< int (S::*)() const&& noexcept
,
911 int (S::*)() const volatile&& > ());
912 static_assert(!check_equality_comparable_with
< int (S::*)() const&& noexcept
,
913 int (S::*)() const volatile&& noexcept
> ());
915 static_assert(check_equality_comparable_with
<int (S::*)() volatile&&,
916 int (S::*)() volatile&&>());
917 static_assert(check_equality_comparable_with
<
918 int (S::*)() volatile&&, int (S::*)() volatile && noexcept
>());
919 static_assert(!check_equality_comparable_with
<int (S::*)() volatile&&,
920 int (S::*)() const volatile&&>());
921 static_assert(!check_equality_comparable_with
< int (S::*)() volatile&&,
922 int (S::*)() const volatile&& noexcept
> ());
925 check_equality_comparable_with
<int (S::*)() volatile && noexcept
,
926 int (S::*)() volatile && noexcept
>());
927 static_assert(!check_equality_comparable_with
<
928 int (S::*)() volatile&& noexcept
,
929 int (S::*)() const volatile&& > ());
930 static_assert(!check_equality_comparable_with
<
931 int (S::*)() volatile&& noexcept
,
932 int (S::*)() const volatile&& noexcept
> ());
934 static_assert(check_equality_comparable_with
<int (S::*)() const volatile&&,
935 int (S::*)() const volatile&&>());
937 check_equality_comparable_with
<int (S::*)() const volatile&&,
938 int (S::*)() const volatile && noexcept
>());
940 check_equality_comparable_with
<int (S::*)() const volatile && noexcept
,
941 int (S::*)() const volatile && noexcept
>());
943 static_assert(!check_equality_comparable_with
<std::nullptr_t
, int>());
944 static_assert(check_equality_comparable_with
<std::nullptr_t
, int*>());
945 static_assert(check_equality_comparable_with
<std::nullptr_t
, int[5]>());
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 (S::*)()>());
950 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() noexcept
>());
952 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() const>());
953 static_assert(check_equality_comparable_with
<std::nullptr_t
,
954 int (S::*)() const noexcept
>());
956 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() volatile>());
957 static_assert(check_equality_comparable_with
<std::nullptr_t
,
958 int (S::*)() volatile noexcept
>());
959 static_assert(check_equality_comparable_with
<std::nullptr_t
,
960 int (S::*)() const volatile>());
961 static_assert(check_equality_comparable_with
<
962 std::nullptr_t
, int (S::*)() const volatile noexcept
>());
963 static_assert(check_equality_comparable_with
<std::nullptr_t
, int (S::*)() &>());
965 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() & noexcept
>());
967 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() const&>());
968 static_assert(check_equality_comparable_with
<std::nullptr_t
,
969 int (S::*)() const & noexcept
>());
971 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() volatile&>());
972 static_assert(check_equality_comparable_with
<
973 std::nullptr_t
, int (S::*)() volatile & noexcept
>());
974 static_assert(check_equality_comparable_with
<std::nullptr_t
,
975 int (S::*)() const volatile&>());
976 static_assert(check_equality_comparable_with
<
977 std::nullptr_t
, int (S::*)() const volatile & noexcept
>());
979 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() &&>());
981 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() && noexcept
>());
983 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() const&&>());
984 static_assert(check_equality_comparable_with
<std::nullptr_t
,
985 int (S::*)() const && noexcept
>());
987 check_equality_comparable_with
<std::nullptr_t
, int (S::*)() volatile&&>());
988 static_assert(check_equality_comparable_with
<
989 std::nullptr_t
, int (S::*)() volatile && noexcept
>());
990 static_assert(check_equality_comparable_with
<std::nullptr_t
,
991 int (S::*)() const volatile&&>());
992 static_assert(check_equality_comparable_with
<
993 std::nullptr_t
, int (S::*)() const volatile && noexcept
>());
995 static_assert(!std::equality_comparable_with
<void, int>);
996 static_assert(!std::equality_comparable_with
<void, int*>);
997 static_assert(!std::equality_comparable_with
<void, std::nullptr_t
>);
998 static_assert(!std::equality_comparable_with
<void, int[5]>);
999 static_assert(!std::equality_comparable_with
<void, int (*)()>);
1000 static_assert(!std::equality_comparable_with
<void, int (&)()>);
1001 static_assert(!std::equality_comparable_with
<void, int S::*>);
1002 static_assert(!std::equality_comparable_with
<void, int (S::*)()>);
1003 static_assert(!std::equality_comparable_with
<void, int (S::*)() noexcept
>);
1004 static_assert(!std::equality_comparable_with
<void, int (S::*)() const>);
1006 !std::equality_comparable_with
<void, int (S::*)() const noexcept
>);
1007 static_assert(!std::equality_comparable_with
<void, int (S::*)() volatile>);
1009 !std::equality_comparable_with
<void, int (S::*)() volatile noexcept
>);
1011 !std::equality_comparable_with
<void, int (S::*)() const volatile>);
1013 !std::equality_comparable_with
<void, int (S::*)() const volatile noexcept
>);
1014 static_assert(!std::equality_comparable_with
<void, int (S::*)() &>);
1015 static_assert(!std::equality_comparable_with
<void, int (S::*)() & noexcept
>);
1016 static_assert(!std::equality_comparable_with
<void, int (S::*)() const&>);
1018 !std::equality_comparable_with
<void, int (S::*)() const & noexcept
>);
1019 static_assert(!std::equality_comparable_with
<void, int (S::*)() volatile&>);
1021 !std::equality_comparable_with
<void, int (S::*)() volatile & noexcept
>);
1023 !std::equality_comparable_with
<void, int (S::*)() const volatile&>);
1024 static_assert(!std::equality_comparable_with
<void, int (S::*)() const volatile &
1026 static_assert(!std::equality_comparable_with
<void, int (S::*)() &&>);
1027 static_assert(!std::equality_comparable_with
< void,
1028 int (S::*)() && noexcept
>);
1029 static_assert(!std::equality_comparable_with
<void, int (S::*)() const&&>);
1030 static_assert(!std::equality_comparable_with
< void,
1031 int (S::*)() const&& noexcept
>);
1032 static_assert(!std::equality_comparable_with
<void, int (S::*)() volatile&&>);
1033 static_assert(!std::equality_comparable_with
< void,
1034 int (S::*)() volatile&& noexcept
>);
1036 !std::equality_comparable_with
<void, int (S::*)() const volatile&&>);
1037 static_assert(!std::equality_comparable_with
< void,
1038 int (S::*)() const volatile&& noexcept
>);
1039 } // namespace fundamentals
1041 namespace standard_types
{
1042 static_assert(check_equality_comparable_with
<std::array
<int, 10>,
1043 std::array
<int, 10> >());
1044 static_assert(!check_equality_comparable_with
<std::array
<int, 10>,
1045 std::array
<double, 10> >());
1047 check_equality_comparable_with
<std::deque
<int>, std::deque
<int> >());
1049 !check_equality_comparable_with
<std::deque
<int>, std::vector
<int> >());
1050 static_assert(check_equality_comparable_with
<std::forward_list
<int>,
1051 std::forward_list
<int> >());
1052 static_assert(!check_equality_comparable_with
<std::forward_list
<int>,
1053 std::vector
<int> >());
1055 check_equality_comparable_with
<std::list
<int>, std::list
<int> >());
1057 !check_equality_comparable_with
<std::list
<int>, std::vector
<int> >());
1059 #ifndef TEST_HAS_NO_THREADS
1060 static_assert(!check_equality_comparable_with
<std::lock_guard
<std::mutex
>,
1061 std::lock_guard
<std::mutex
> >());
1062 static_assert(!check_equality_comparable_with
<std::lock_guard
<std::mutex
>,
1063 std::vector
<int> >());
1064 static_assert(!check_equality_comparable_with
<std::mutex
, std::mutex
>());
1065 static_assert(!check_equality_comparable_with
<std::mutex
, std::vector
<int> >());
1068 static_assert(check_equality_comparable_with
<std::map
<int, void*>,
1069 std::map
<int, void*> >());
1071 !check_equality_comparable_with
<std::map
<int, void*>, std::vector
<int> >());
1073 check_equality_comparable_with
<std::optional
<std::vector
<int> >,
1074 std::optional
<std::vector
<int> > >());
1075 static_assert(check_equality_comparable_with
<std::optional
<std::vector
<int> >,
1076 std::vector
<int> >());
1078 check_equality_comparable_with
<std::vector
<int>, std::vector
<int> >());
1079 static_assert(!check_equality_comparable_with
<std::vector
<int>, int>());
1080 } // namespace standard_types
1082 namespace types_fit_for_purpose
{
1084 check_equality_comparable_with
<cxx20_member_eq
, cxx20_member_eq
>());
1086 check_equality_comparable_with
<cxx20_friend_eq
, cxx20_friend_eq
>());
1088 !check_equality_comparable_with
<cxx20_member_eq
, cxx20_friend_eq
>());
1090 static_assert(check_equality_comparable_with
<member_three_way_comparable
,
1091 member_three_way_comparable
>());
1092 static_assert(check_equality_comparable_with
<friend_three_way_comparable
,
1093 friend_three_way_comparable
>());
1094 static_assert(!check_equality_comparable_with
<member_three_way_comparable
,
1095 friend_three_way_comparable
>());
1098 check_equality_comparable_with
<explicit_operators
, explicit_operators
>());
1099 static_assert(check_equality_comparable_with
<equality_comparable_with_ec1
,
1100 equality_comparable_with_ec1
>());
1101 static_assert(check_equality_comparable_with
<different_return_types
,
1102 different_return_types
>());
1103 static_assert(check_equality_comparable_with
<explicit_operators
,
1104 equality_comparable_with_ec1
>());
1105 static_assert(check_equality_comparable_with
<explicit_operators
,
1106 different_return_types
>());
1108 static_assert(check_equality_comparable_with
<one_way_eq
, one_way_eq
>());
1110 std::common_reference_with
<one_way_eq
const&, explicit_operators
const&>);
1112 !check_equality_comparable_with
<one_way_eq
, explicit_operators
>());
1114 static_assert(check_equality_comparable_with
<one_way_ne
, one_way_ne
>());
1116 std::common_reference_with
<one_way_ne
const&, explicit_operators
const&>);
1118 !check_equality_comparable_with
<one_way_ne
, explicit_operators
>());
1119 } // namespace types_fit_for_purpose