[libcxx-commits] [libcxx] 7959d59 - [libcxx] adds concepts `std::totally_ordered` and `std::totally_ordered_with`
Christopher Di Bella via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 1 23:07:45 PDT 2021
Author: Christopher Di Bella
Date: 2021-04-02T06:00:21Z
New Revision: 7959d59028dd126416cdf10dbbd22162922e1336
URL: https://github.com/llvm/llvm-project/commit/7959d59028dd126416cdf10dbbd22162922e1336
DIFF: https://github.com/llvm/llvm-project/commit/7959d59028dd126416cdf10dbbd22162922e1336.diff
LOG: [libcxx] adds concepts `std::totally_ordered` and `std::totally_ordered_with`
Implements parts of:
- P0898R3 Standard Library Concepts
- P1754 Rename concepts to standard_case for C++20, while we still can
Reviewed By: Mordante
Differential Revision: https://reviews.llvm.org/D98983
Added:
libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp
libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered_with.pass.cpp
Modified:
libcxx/include/concepts
libcxx/include/type_traits
libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp
libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp
libcxx/test/std/concepts/concepts.compare/types.h
Removed:
################################################################################
diff --git a/libcxx/include/concepts b/libcxx/include/concepts
index 0a4e7d50c48c2..0a3e9278ea51e 100644
--- a/libcxx/include/concepts
+++ b/libcxx/include/concepts
@@ -214,7 +214,7 @@ concept floating_point = is_floating_point_v<_Tp>;
template<class _Lhs, class _Rhs>
concept assignable_from =
is_lvalue_reference_v<_Lhs> &&
- common_reference_with<const remove_reference_t<_Lhs>&, const remove_reference_t<_Rhs>&> &&
+ common_reference_with<__make_const_lvalue_ref<_Lhs>, __make_const_lvalue_ref<_Rhs>> &&
requires (_Lhs __lhs, _Rhs&& __rhs) {
{ __lhs = _VSTD::forward<_Rhs>(__rhs) } -> same_as<_Lhs>;
};
@@ -346,7 +346,7 @@ concept __boolean_testable = __boolean_testable_impl<_Tp> && requires(_Tp&& __t)
// [concept.equalitycomparable]
template<class _Tp, class _Up>
concept __weakly_equality_comparable_with =
- requires(const remove_reference_t<_Tp>& __t, const remove_reference_t<_Up>& __u) {
+ requires(__make_const_lvalue_ref<_Tp> __t, __make_const_lvalue_ref<_Up> __u) {
{ __t == __u } -> __boolean_testable;
{ __t != __u } -> __boolean_testable;
{ __u == __t } -> __boolean_testable;
@@ -359,13 +359,41 @@ concept equality_comparable = __weakly_equality_comparable_with<_Tp, _Tp>;
template<class _Tp, class _Up>
concept equality_comparable_with =
equality_comparable<_Tp> && equality_comparable<_Up> &&
- common_reference_with<const remove_reference_t<_Tp>&, const remove_reference_t<_Up>&> &&
+ common_reference_with<__make_const_lvalue_ref<_Tp>, __make_const_lvalue_ref<_Up>> &&
equality_comparable<
common_reference_t<
- const remove_reference_t<_Tp>&,
- const remove_reference_t<_Up>&>> &&
+ __make_const_lvalue_ref<_Tp>,
+ __make_const_lvalue_ref<_Up>>> &&
__weakly_equality_comparable_with<_Tp, _Up>;
+// [concept.totallyordered]
+
+template<class _Tp, class _Up>
+concept __partially_ordered_with =
+ requires(__make_const_lvalue_ref<_Tp> __t, __make_const_lvalue_ref<_Up> __u) {
+ { __t < __u } -> __boolean_testable;
+ { __t > __u } -> __boolean_testable;
+ { __t <= __u } -> __boolean_testable;
+ { __t >= __u } -> __boolean_testable;
+ { __u < __t } -> __boolean_testable;
+ { __u > __t } -> __boolean_testable;
+ { __u <= __t } -> __boolean_testable;
+ { __u >= __t } -> __boolean_testable;
+ };
+
+template<class _Tp>
+concept totally_ordered = equality_comparable<_Tp> && __partially_ordered_with<_Tp, _Tp>;
+
+template<class _Tp, class _Up>
+concept totally_ordered_with =
+ totally_ordered<_Tp> && totally_ordered<_Up> &&
+ equality_comparable_with<_Tp, _Up> &&
+ totally_ordered<
+ common_reference_t<
+ __make_const_lvalue_ref<_Tp>,
+ __make_const_lvalue_ref<_Up>>> &&
+ __partially_ordered_with<_Tp, _Up>;
+
// [concepts.object]
template<class _Tp>
concept movable =
diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits
index 0185226446c22..761e883422bde 100644
--- a/libcxx/include/type_traits
+++ b/libcxx/include/type_traits
@@ -4505,6 +4505,9 @@ bool __libcpp_is_constant_evaluated() _NOEXCEPT { return false; }
template <class _CharT>
using _IsCharLikeType = _And<is_standard_layout<_CharT>, is_trivial<_CharT> >;
+template<class _Tp>
+using __make_const_lvalue_ref = const typename remove_reference<_Tp>::type&;
+
_LIBCPP_END_NAMESPACE_STD
#if _LIBCPP_STD_VER > 14
diff --git a/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp b/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp
index 93f79a80e5425..0211ee3d531ec 100644
--- a/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp
+++ b/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp
@@ -112,14 +112,23 @@ static_assert(std::equality_comparable<cxx20_friend_eq>);
static_assert(std::equality_comparable<member_three_way_comparable>);
static_assert(std::equality_comparable<friend_three_way_comparable>);
static_assert(std::equality_comparable<explicit_operators>);
-static_assert(std::equality_comparable<eq_neq_
diff erent_return_types>);
+static_assert(std::equality_comparable<
diff erent_return_types>);
static_assert(std::equality_comparable<one_member_one_friend>);
static_assert(std::equality_comparable<equality_comparable_with_ec1>);
static_assert(!std::equality_comparable<no_eq>);
static_assert(!std::equality_comparable<no_neq>);
+static_assert(std::equality_comparable<no_lt>);
+static_assert(std::equality_comparable<no_gt>);
+static_assert(std::equality_comparable<no_le>);
+static_assert(std::equality_comparable<no_ge>);
+
static_assert(!std::equality_comparable<wrong_return_type_eq>);
static_assert(!std::equality_comparable<wrong_return_type_ne>);
+static_assert(std::equality_comparable<wrong_return_type_lt>);
+static_assert(std::equality_comparable<wrong_return_type_gt>);
+static_assert(std::equality_comparable<wrong_return_type_le>);
+static_assert(std::equality_comparable<wrong_return_type_ge>);
static_assert(!std::equality_comparable<wrong_return_type>);
static_assert(
!std::equality_comparable<cxx20_member_eq_operator_with_deleted_ne>);
@@ -134,9 +143,13 @@ static_assert(
static_assert(
!std::equality_comparable<friend_three_way_comparable_with_deleted_ne>);
-static_assert(!std::equality_comparable<returns_explicit_bool>);
+static_assert(!std::equality_comparable<eq_returns_explicit_bool>);
+static_assert(!std::equality_comparable<ne_returns_explicit_bool>);
+static_assert(std::equality_comparable<lt_returns_explicit_bool>);
+static_assert(std::equality_comparable<gt_returns_explicit_bool>);
+static_assert(std::equality_comparable<le_returns_explicit_bool>);
+static_assert(std::equality_comparable<ge_returns_explicit_bool>);
static_assert(std::equality_comparable<returns_true_type>);
-static_assert(std::equality_comparable<returns_false_type>);
static_assert(std::equality_comparable<returns_int_ptr>);
} // namespace types_fit_for_purpose
diff --git a/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp b/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp
index 4bca901dc5f15..a65e47f936da8 100644
--- a/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp
+++ b/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp
@@ -1097,12 +1097,12 @@ static_assert(
check_equality_comparable_with<explicit_operators, explicit_operators>());
static_assert(check_equality_comparable_with<equality_comparable_with_ec1,
equality_comparable_with_ec1>());
-static_assert(check_equality_comparable_with<eq_neq_
diff erent_return_types,
- eq_neq_
diff erent_return_types>());
+static_assert(check_equality_comparable_with<
diff erent_return_types,
+
diff erent_return_types>());
static_assert(check_equality_comparable_with<explicit_operators,
equality_comparable_with_ec1>());
static_assert(check_equality_comparable_with<explicit_operators,
- eq_neq_
diff erent_return_types>());
+
diff erent_return_types>());
static_assert(check_equality_comparable_with<one_way_eq, one_way_eq>());
static_assert(
diff --git a/libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp b/libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp
new file mode 100644
index 0000000000000..fce1efc0cd5d3
--- /dev/null
+++ b/libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp
@@ -0,0 +1,175 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: libcpp-no-concepts
+
+// template<class T>
+// concept totally_ordered;
+
+#include <concepts>
+
+#include <array>
+#include <deque>
+#include <forward_list>
+#include <list>
+#include <map>
+#include <memory>
+#include <optional>
+#include <set>
+#include <unordered_map>
+#include <unordered_set>
+#include <vector>
+
+#include "../types.h"
+#include "test_macros.h"
+
+// `models_totally_ordered` checks that `std::totally_ordered` subsumes
+// `std::equality_comparable`. This overload should *never* be called.
+template <std::equality_comparable T>
+constexpr bool models_totally_ordered() noexcept {
+ return false;
+}
+
+template <std::totally_ordered T>
+constexpr bool models_totally_ordered() noexcept {
+ return true;
+}
+
+namespace fundamentals {
+static_assert(models_totally_ordered<int>());
+static_assert(models_totally_ordered<double>());
+static_assert(models_totally_ordered<void*>());
+static_assert(models_totally_ordered<char*>());
+static_assert(models_totally_ordered<char const*>());
+static_assert(models_totally_ordered<char volatile*>());
+static_assert(models_totally_ordered<char const volatile*>());
+static_assert(models_totally_ordered<wchar_t&>());
+static_assert(models_totally_ordered<char8_t const&>());
+static_assert(models_totally_ordered<char16_t volatile&>());
+static_assert(models_totally_ordered<char32_t const volatile&>());
+static_assert(models_totally_ordered<unsigned char&&>());
+static_assert(models_totally_ordered<unsigned short const&&>());
+static_assert(models_totally_ordered<unsigned int volatile&&>());
+static_assert(models_totally_ordered<unsigned long const volatile&&>());
+static_assert(models_totally_ordered<int[5]>());
+static_assert(models_totally_ordered<int (*)(int)>());
+static_assert(models_totally_ordered<int (&)(int)>());
+static_assert(models_totally_ordered<int (*)(int) noexcept>());
+static_assert(models_totally_ordered<int (&)(int) noexcept>());
+
+#ifndef TEST_COMPILER_GCC
+static_assert(!std::totally_ordered<std::nullptr_t>);
+#endif
+
+struct S {};
+static_assert(!std::totally_ordered<S>);
+static_assert(!std::totally_ordered<int S::*>);
+static_assert(!std::totally_ordered<int (S::*)()>);
+static_assert(!std::totally_ordered<int (S::*)() noexcept>);
+static_assert(!std::totally_ordered<int (S::*)() &>);
+static_assert(!std::totally_ordered<int (S::*)() & noexcept>);
+static_assert(!std::totally_ordered<int (S::*)() &&>);
+static_assert(!std::totally_ordered < int (S::*)() && noexcept >);
+static_assert(!std::totally_ordered<int (S::*)() const>);
+static_assert(!std::totally_ordered<int (S::*)() const noexcept>);
+static_assert(!std::totally_ordered<int (S::*)() const&>);
+static_assert(!std::totally_ordered<int (S::*)() const & noexcept>);
+static_assert(!std::totally_ordered<int (S::*)() const&&>);
+static_assert(!std::totally_ordered < int (S::*)() const&& noexcept >);
+static_assert(!std::totally_ordered<int (S::*)() volatile>);
+static_assert(!std::totally_ordered<int (S::*)() volatile noexcept>);
+static_assert(!std::totally_ordered<int (S::*)() volatile&>);
+static_assert(!std::totally_ordered<int (S::*)() volatile & noexcept>);
+static_assert(!std::totally_ordered<int (S::*)() volatile&&>);
+static_assert(!std::totally_ordered < int (S::*)() volatile&& noexcept >);
+static_assert(!std::totally_ordered<int (S::*)() const volatile>);
+static_assert(!std::totally_ordered<int (S::*)() const volatile noexcept>);
+static_assert(!std::totally_ordered<int (S::*)() const volatile&>);
+static_assert(!std::totally_ordered<int (S::*)() const volatile & noexcept>);
+static_assert(!std::totally_ordered<int (S::*)() const volatile&&>);
+static_assert(!std::totally_ordered < int (S::*)() const volatile&& noexcept >);
+
+static_assert(!std::totally_ordered<void>);
+} // namespace fundamentals
+
+namespace standard_types {
+static_assert(models_totally_ordered<std::array<int, 10> >());
+static_assert(models_totally_ordered<std::deque<int> >());
+static_assert(models_totally_ordered<std::forward_list<int> >());
+static_assert(models_totally_ordered<std::list<int> >());
+static_assert(models_totally_ordered<std::optional<int> >());
+static_assert(models_totally_ordered<std::set<int> >());
+static_assert(models_totally_ordered<std::vector<bool> >());
+static_assert(models_totally_ordered<std::vector<int> >());
+
+static_assert(!std::totally_ordered<std::unordered_map<int, void*> >);
+static_assert(!std::totally_ordered<std::unordered_set<int> >);
+
+struct A {};
+// FIXME(cjdb): uncomment when operator<=> is implemented for each of these types.
+// static_assert(!std::totally_ordered<std::array<A, 10> >);
+// static_assert(!std::totally_ordered<std::deque<A> >);
+// static_assert(!std::totally_ordered<std::forward_list<A> >);
+// static_assert(!std::totally_ordered<std::list<A> >);
+static_assert(!std::totally_ordered<std::optional<A> >);
+// static_assert(!std::totally_ordered<std::set<A> >);
+// static_assert(!std::totally_ordered<std::vector<A> >);
+} // namespace standard_types
+
+namespace types_fit_for_purpose {
+static_assert(models_totally_ordered<member_three_way_comparable>());
+static_assert(models_totally_ordered<friend_three_way_comparable>());
+static_assert(models_totally_ordered<explicit_operators>());
+static_assert(models_totally_ordered<
diff erent_return_types>());
+static_assert(!std::totally_ordered<cxx20_member_eq>);
+static_assert(!std::totally_ordered<cxx20_friend_eq>);
+static_assert(!std::totally_ordered<one_member_one_friend>);
+static_assert(!std::totally_ordered<equality_comparable_with_ec1>);
+
+static_assert(!std::totally_ordered<no_eq>);
+static_assert(!std::totally_ordered<no_neq>);
+static_assert(!std::totally_ordered<no_lt>);
+static_assert(!std::totally_ordered<no_gt>);
+static_assert(!std::totally_ordered<no_le>);
+static_assert(!std::totally_ordered<no_ge>);
+
+static_assert(!std::totally_ordered<wrong_return_type_eq>);
+static_assert(!std::totally_ordered<wrong_return_type_ne>);
+static_assert(!std::totally_ordered<wrong_return_type_lt>);
+static_assert(!std::totally_ordered<wrong_return_type_gt>);
+static_assert(!std::totally_ordered<wrong_return_type_le>);
+static_assert(!std::totally_ordered<wrong_return_type_ge>);
+static_assert(!std::totally_ordered<wrong_return_type>);
+
+static_assert(!std::totally_ordered<cxx20_member_eq_operator_with_deleted_ne>);
+static_assert(!std::totally_ordered<cxx20_friend_eq_operator_with_deleted_ne>);
+static_assert(
+ !std::totally_ordered<member_three_way_comparable_with_deleted_eq>);
+static_assert(
+ !std::totally_ordered<member_three_way_comparable_with_deleted_ne>);
+static_assert(
+ !std::totally_ordered<friend_three_way_comparable_with_deleted_eq>);
+static_assert(
+ !std::totally_ordered<friend_three_way_comparable_with_deleted_ne>);
+
+static_assert(!std::totally_ordered<eq_returns_explicit_bool>);
+static_assert(!std::totally_ordered<ne_returns_explicit_bool>);
+static_assert(!std::totally_ordered<lt_returns_explicit_bool>);
+static_assert(!std::totally_ordered<gt_returns_explicit_bool>);
+static_assert(!std::totally_ordered<le_returns_explicit_bool>);
+static_assert(!std::totally_ordered<ge_returns_explicit_bool>);
+static_assert(std::totally_ordered<returns_true_type>);
+static_assert(std::totally_ordered<returns_int_ptr>);
+
+static_assert(std::totally_ordered<partial_ordering_totally_ordered_with>);
+static_assert(std::totally_ordered<weak_ordering_totally_ordered_with>);
+static_assert(std::totally_ordered<strong_ordering_totally_ordered_with>);
+} // namespace types_fit_for_purpose
+
+int main(int, char**) { return 0; }
diff --git a/libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered_with.pass.cpp b/libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered_with.pass.cpp
new file mode 100644
index 0000000000000..345abac552fed
--- /dev/null
+++ b/libcxx/test/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered_with.pass.cpp
@@ -0,0 +1,1142 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: libcpp-no-concepts
+
+// template<class T>
+// concept totally_ordered_with;
+
+#include <concepts>
+
+#include <array>
+#include <deque>
+#include <forward_list>
+#include <list>
+#include <map>
+#include <memory>
+#include <optional>
+#include <set>
+#include <unordered_map>
+#include <unordered_set>
+#include <vector>
+
+#include "../types.h"
+#include "test_macros.h"
+
+template <class T, class U>
+constexpr bool check_totally_ordered_with() noexcept {
+ constexpr bool result = std::totally_ordered_with<T, U>;
+ static_assert(std::totally_ordered_with<U, T> == result);
+ static_assert(std::totally_ordered_with<T, U const> == result);
+ static_assert(std::totally_ordered_with<T const, U const> == result);
+ static_assert(std::totally_ordered_with<T, U const&> == result);
+ static_assert(std::totally_ordered_with<T const, U const&> == result);
+ static_assert(std::totally_ordered_with<T&, U const> == result);
+ static_assert(std::totally_ordered_with<T const&, U const> == result);
+ static_assert(std::totally_ordered_with<T&, U const&> == result);
+ static_assert(std::totally_ordered_with<T const&, U const&> == result);
+ static_assert(std::totally_ordered_with<T, U const&&> == result);
+ static_assert(std::totally_ordered_with<T const, U const&&> == result);
+ static_assert(std::totally_ordered_with<T&, U const&&> == result);
+ static_assert(std::totally_ordered_with<T const&, U const&&> == result);
+ static_assert(std::totally_ordered_with<T&&, U const> == result);
+ static_assert(std::totally_ordered_with<T const&&, U const> == result);
+ static_assert(std::totally_ordered_with<T&&, U const&> == result);
+ static_assert(std::totally_ordered_with<T const&&, U const&> == result);
+ static_assert(std::totally_ordered_with<T&&, U const&&> == result);
+ static_assert(std::totally_ordered_with<T const&&, U const&&> == result);
+ return result;
+}
+
+namespace fundamentals {
+static_assert(check_totally_ordered_with<int, int>());
+static_assert(check_totally_ordered_with<int, bool>());
+static_assert(check_totally_ordered_with<int, char>());
+static_assert(check_totally_ordered_with<int, wchar_t>());
+static_assert(check_totally_ordered_with<int, double>());
+static_assert(!check_totally_ordered_with<int, int*>());
+static_assert(!check_totally_ordered_with<int, int[5]>());
+static_assert(!check_totally_ordered_with<int, int (*)()>());
+static_assert(!check_totally_ordered_with<int, int (&)()>());
+
+struct S {};
+static_assert(!check_totally_ordered_with<int, int S::*>());
+static_assert(!check_totally_ordered_with<int, int (S::*)()>());
+static_assert(!check_totally_ordered_with<int, int (S::*)() noexcept>());
+static_assert(!check_totally_ordered_with<int, int (S::*)() const>());
+static_assert(!check_totally_ordered_with<int, int (S::*)() const noexcept>());
+static_assert(!check_totally_ordered_with<int, int (S::*)() volatile>());
+static_assert(
+ !check_totally_ordered_with<int, int (S::*)() volatile noexcept>());
+static_assert(!check_totally_ordered_with<int, int (S::*)() const volatile>());
+static_assert(
+ !check_totally_ordered_with<int, int (S::*)() const volatile noexcept>());
+static_assert(!check_totally_ordered_with<int, int (S::*)() &>());
+static_assert(!check_totally_ordered_with<int, int (S::*)() & noexcept>());
+static_assert(!check_totally_ordered_with<int, int (S::*)() const&>());
+static_assert(
+ !check_totally_ordered_with<int, int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int, int (S::*)() volatile&>());
+static_assert(
+ !check_totally_ordered_with<int, int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int, int (S::*)() const volatile&>());
+static_assert(
+ !check_totally_ordered_with<int, int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int, int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int, int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int, int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int, int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(check_totally_ordered_with<int*, int*>());
+static_assert(check_totally_ordered_with<int*, int[5]>());
+static_assert(!check_totally_ordered_with<int*, int (*)()>());
+static_assert(!check_totally_ordered_with<int*, int (&)()>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)()>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() noexcept>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() const>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() const noexcept>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() volatile>());
+static_assert(
+ !check_totally_ordered_with<int*, int (S::*)() volatile noexcept>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() const volatile>());
+static_assert(
+ !check_totally_ordered_with<int*, int (S::*)() const volatile noexcept>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() &>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() & noexcept>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() const&>());
+static_assert(
+ !check_totally_ordered_with<int*, int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() volatile&>());
+static_assert(
+ !check_totally_ordered_with<int*, int (S::*)() volatile & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int*, int (S::*)() const volatile&>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() const volatile &
+ noexcept>());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int*,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int*,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int*, int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int*,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int*, int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int*,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(check_totally_ordered_with<int[5], int[5]>());
+static_assert(!check_totally_ordered_with<int[5], int (*)()>());
+static_assert(!check_totally_ordered_with<int[5], int (&)()>());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)()>());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)() noexcept>());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)() const>());
+static_assert(
+ !check_totally_ordered_with<int[5], int (S::*)() const noexcept>());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)() volatile>());
+static_assert(
+ !check_totally_ordered_with<int[5], int (S::*)() volatile noexcept>());
+static_assert(
+ !check_totally_ordered_with<int[5], int (S::*)() const volatile>());
+static_assert(!check_totally_ordered_with<
+ int[5], int (S::*)() const volatile noexcept>());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)() &>());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)() & noexcept>());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)() const&>());
+static_assert(
+ !check_totally_ordered_with<int[5], int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)() volatile&>());
+static_assert(
+ !check_totally_ordered_with<int[5], int (S::*)() volatile & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int[5], int (S::*)() const volatile&>());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)() const volatile &
+ noexcept>());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int[5],
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int[5],
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int[5], int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int[5],
+ int (S::*)() volatile&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int[5], int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int[5],
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(check_totally_ordered_with<int (*)(), int (*)()>());
+static_assert(check_totally_ordered_with<int (*)(), int (&)()>());
+static_assert(!check_totally_ordered_with<int (*)(), int (S::*)()>());
+static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() noexcept>());
+static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() const>());
+static_assert(
+ !check_totally_ordered_with<int (*)(), int (S::*)() const noexcept>());
+static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() volatile>());
+static_assert(
+ !check_totally_ordered_with<int (*)(), int (S::*)() volatile noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (*)(), int (S::*)() const volatile>());
+static_assert(!check_totally_ordered_with<
+ int (*)(), int (S::*)() const volatile noexcept>());
+static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() &>());
+static_assert(
+ !check_totally_ordered_with<int (*)(), int (S::*)() & noexcept>());
+static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() const&>());
+static_assert(
+ !check_totally_ordered_with<int (*)(), int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() volatile&>());
+static_assert(
+ !check_totally_ordered_with<int (*)(), int (S::*)() volatile & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (*)(), int (S::*)() const volatile&>());
+static_assert(!check_totally_ordered_with<
+ int (*)(), int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (*)(),
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int (*)(), int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (*)(),
+ int (S::*)() const&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (*)(), int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (*)(),
+ int (S::*)() volatile&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (*)(), int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (*)(),
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(check_totally_ordered_with<int (&)(), int (&)()>());
+static_assert(!check_totally_ordered_with<int (&)(), int (S::*)()>());
+static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() noexcept>());
+static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() const>());
+static_assert(
+ !check_totally_ordered_with<int (&)(), int (S::*)() const noexcept>());
+static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() volatile>());
+static_assert(
+ !check_totally_ordered_with<int (&)(), int (S::*)() volatile noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (&)(), int (S::*)() const volatile>());
+static_assert(!check_totally_ordered_with<
+ int (&)(), int (S::*)() const volatile noexcept>());
+static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() &>());
+static_assert(
+ !check_totally_ordered_with<int (&)(), int (S::*)() & noexcept>());
+static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() const&>());
+static_assert(
+ !check_totally_ordered_with<int (&)(), int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() volatile&>());
+static_assert(
+ !check_totally_ordered_with<int (&)(), int (S::*)() volatile & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (&)(), int (S::*)() const volatile&>());
+static_assert(!check_totally_ordered_with<
+ int (&)(), int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (&)(),
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int (&)(), int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (&)(),
+ int (S::*)() const&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (&)(), int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (&)(),
+ int (S::*)() volatile&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (&)(), int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (&)(),
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)(), int (S::*)()>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)(), int (S::*)() noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)(), int (S::*)() const>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)(), int (S::*)() const noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)(), int (S::*)() volatile>());
+static_assert(!check_totally_ordered_with<int (S::*)(),
+ int (S::*)() volatile noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)(), int (S::*)() const volatile>());
+static_assert(!check_totally_ordered_with<
+ int (S::*)(), int (S::*)() const volatile noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)(), int (S::*)() &>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)(), int (S::*)() & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)(), int (S::*)() const&>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)(), int (S::*)() const & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)(), int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)(),
+ int (S::*)() volatile & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)(), int (S::*)() const volatile&>());
+static_assert(!check_totally_ordered_with<
+ int (S::*)(), int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)(), int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)(),
+ int (S::*)() && noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)(), int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)(),
+ int (S::*)() const&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)(), int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)(),
+ int (S::*)() volatile&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)(), int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)(),
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() noexcept, int (S::*)() const>());
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() const noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() volatile>());
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() volatile noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() const volatile>());
+static_assert(!check_totally_ordered_with<
+ int (S::*)() noexcept, int (S::*)() const volatile noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() noexcept, int (S::*)() &>());
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() noexcept, int (S::*)() const&>());
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() const volatile&>());
+static_assert(!check_totally_ordered_with<
+ int (S::*)() noexcept, int (S::*)() const volatile & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() noexcept, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() noexcept,
+ int (S::*)() && noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() noexcept, int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() noexcept,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() noexcept,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() noexcept,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const, int (S::*)() const>());
+static_assert(!check_totally_ordered_with<int (S::*)() const,
+ int (S::*)() const noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const, int (S::*)() volatile>());
+static_assert(!check_totally_ordered_with<int (S::*)() const,
+ int (S::*)() volatile noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const,
+ int (S::*)() const volatile>());
+static_assert(!check_totally_ordered_with<
+ int (S::*)() const, int (S::*)() const volatile noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const, int (S::*)() &>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const, int (S::*)() & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const, int (S::*)() const&>());
+static_assert(!check_totally_ordered_with<int (S::*)() const,
+ int (S::*)() const & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const, int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() const,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const,
+ int (S::*)() const volatile&>());
+static_assert(!check_totally_ordered_with<
+ int (S::*)() const, int (S::*)() const volatile & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const,
+ int (S::*)() && noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const, int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const,
+ int (S::*)() const&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const, int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() const noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() volatile>());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() volatile noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() const volatile>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() const volatile noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const noexcept, int (S::*)() &>());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() const&>());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() const volatile&>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const noexcept,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const noexcept,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const noexcept,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const noexcept,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() volatile,
+ int (S::*)() volatile>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile,
+ int (S::*)() volatile noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile,
+ int (S::*)() const volatile>());
+static_assert(!check_totally_ordered_with<
+ int (S::*)() volatile, int (S::*)() const volatile noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() volatile, int (S::*)() &>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile,
+ int (S::*)() & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() volatile, int (S::*)() const&>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile,
+ int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile,
+ int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile,
+ int (S::*)() const volatile&>());
+static_assert(!check_totally_ordered_with<
+ int (S::*)() volatile, int (S::*)() const volatile & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() volatile, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile,
+ int (S::*)() && noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() volatile, int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() volatile noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() const volatile>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() const volatile noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() &>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() const&>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() const volatile&>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile noexcept,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile noexcept,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile noexcept,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile noexcept,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() const volatile>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() const volatile noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const volatile, int (S::*)() &>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() const&>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() const volatile&>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const volatile,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const volatile,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const volatile,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const volatile,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() const volatile noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() &>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() const&>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() const volatile&>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)()
+ const volatile noexcept,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)()
+ const volatile noexcept,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)()
+ const volatile noexcept,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile noexcept,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)()
+ const volatile noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() &, int (S::*)() &>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() &, int (S::*)() & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() &, int (S::*)() const&>());
+static_assert(!check_totally_ordered_with<int (S::*)() &,
+ int (S::*)() const & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() &, int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() &,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() &,
+ int (S::*)() const volatile&>());
+static_assert(!check_totally_ordered_with<
+ int (S::*)() &, int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() &, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() &,
+ int (S::*)() && noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() &, int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() &,
+ int (S::*)() const&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() &, int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() &,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() &,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() &,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() & noexcept,
+ int (S::*)() & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() & noexcept,
+ int (S::*)() const&>());
+static_assert(!check_totally_ordered_with<int (S::*)() & noexcept,
+ int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() & noexcept,
+ int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() & noexcept,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() & noexcept,
+ int (S::*)() const volatile&>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() & noexcept,
+ int (S::*)() const volatile & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() & noexcept, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() & noexcept,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() & noexcept,
+ int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() & noexcept,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() & noexcept,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() & noexcept,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() & noexcept,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() & noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const&, int (S::*)() const&>());
+static_assert(!check_totally_ordered_with<int (S::*)() const&,
+ int (S::*)() const & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const&, int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() const&,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const&,
+ int (S::*)() const volatile&>());
+static_assert(!check_totally_ordered_with<
+ int (S::*)() const&, int (S::*)() const volatile & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const&, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const&,
+ int (S::*)() && noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const&, int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const&,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const&,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const&,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const&,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const&,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept,
+ int (S::*)() const & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept,
+ int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept,
+ int (S::*)() const volatile&>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const & noexcept,
+ int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept,
+ int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const& noexcept,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept,
+ int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const& noexcept,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const& noexcept,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const & noexcept,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const& noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() volatile&,
+ int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile&,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile&,
+ int (S::*)() const volatile&>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() volatile&,
+ int (S::*)() const volatile & noexcept>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() volatile&, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile&,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile&,
+ int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile&,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile&,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile&,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile&,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile&,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept,
+ int (S::*)() const volatile&>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() volatile & noexcept,
+ int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept,
+ int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile& noexcept,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept,
+ int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile& noexcept,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile& noexcept,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile & noexcept,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile& noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile&,
+ int (S::*)() const volatile&>());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const volatile&,
+ int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile&,
+ int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const volatile&,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile&,
+ int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const volatile&,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile&,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const volatile&,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile&,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const volatile&,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const volatile & noexcept,
+ int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<
+ int (S::*)() const volatile & noexcept, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)()
+ const volatile& noexcept,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with<
+ int (S::*)() const volatile & noexcept, int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)()
+ const volatile& noexcept,
+ int (S::*)() const&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const volatile & noexcept,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)()
+ const volatile& noexcept,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const volatile & noexcept,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)()
+ const volatile& noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() &&, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < int (S::*)() &&,
+ int (S::*)() && noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() &&, int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() &&,
+ int (S::*)() const&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<int (S::*)() &&, int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() &&,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() &&,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() &&,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with < int (S::*)() && noexcept,
+ int (S::*)() && noexcept > ());
+static_assert(!check_totally_ordered_with < int (S::*)() && noexcept,
+ int (S::*)() const&& > ());
+static_assert(!check_totally_ordered_with < int (S::*)() && noexcept,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with < int (S::*)() && noexcept,
+ int (S::*)() volatile&& > ());
+static_assert(!check_totally_ordered_with < int (S::*)() && noexcept,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with < int (S::*)() && noexcept,
+ int (S::*)() const volatile&& > ());
+static_assert(!check_totally_ordered_with < int (S::*)() && noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(
+ !check_totally_ordered_with<int (S::*)() const&&, int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const&&,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const&&,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const&&,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() const&&,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const&&,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with < int (S::*)() const&& noexcept,
+ int (S::*)() const&& noexcept > ());
+static_assert(!check_totally_ordered_with < int (S::*)() const&& noexcept,
+ int (S::*)() volatile&& > ());
+static_assert(!check_totally_ordered_with < int (S::*)() const&& noexcept,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with < int (S::*)() const&& noexcept,
+ int (S::*)() const volatile&& > ());
+static_assert(!check_totally_ordered_with < int (S::*)() const&& noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() volatile&&,
+ int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile&&,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<int (S::*)() volatile&&,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile&&,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with < int (S::*)() volatile&& noexcept,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile&& noexcept,
+ int (S::*)() const volatile&& > ());
+static_assert(!check_totally_ordered_with < int (S::*)() volatile&& noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!check_totally_ordered_with<int (S::*)() const volatile&&,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < int (S::*)() const volatile&&,
+ int (S::*)() const volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with < int (S::*)()
+ const volatile&& noexcept,
+ int (S::*)() const volatile&& noexcept > ());
+
+#if !defined(TEST_COMPILER_GCC)
+static_assert(!check_totally_ordered_with<std::nullptr_t, int>());
+
+static_assert(!check_totally_ordered_with<std::nullptr_t, int*>());
+static_assert(!check_totally_ordered_with<std::nullptr_t, int[]>());
+static_assert(!check_totally_ordered_with<std::nullptr_t, int[5]>());
+static_assert(!check_totally_ordered_with<std::nullptr_t, int (*)()>());
+static_assert(!check_totally_ordered_with<std::nullptr_t, int (&)()>());
+#endif
+
+static_assert(!check_totally_ordered_with<std::nullptr_t, int (S::*)()>());
+static_assert(
+ !check_totally_ordered_with<std::nullptr_t, int (S::*)() noexcept>());
+static_assert(
+ !check_totally_ordered_with<std::nullptr_t, int (S::*)() const>());
+static_assert(
+ !check_totally_ordered_with<std::nullptr_t, int (S::*)() const noexcept>());
+static_assert(
+ !check_totally_ordered_with<std::nullptr_t, int (S::*)() volatile>());
+static_assert(!check_totally_ordered_with<std::nullptr_t,
+ int (S::*)() volatile noexcept>());
+static_assert(
+ !check_totally_ordered_with<std::nullptr_t, int (S::*)() const volatile>());
+static_assert(!check_totally_ordered_with<
+ std::nullptr_t, int (S::*)() const volatile noexcept>());
+static_assert(!check_totally_ordered_with<std::nullptr_t, int (S::*)() &>());
+static_assert(
+ !check_totally_ordered_with<std::nullptr_t, int (S::*)() & noexcept>());
+static_assert(
+ !check_totally_ordered_with<std::nullptr_t, int (S::*)() const&>());
+static_assert(!check_totally_ordered_with<std::nullptr_t,
+ int (S::*)() const & noexcept>());
+static_assert(
+ !check_totally_ordered_with<std::nullptr_t, int (S::*)() volatile&>());
+static_assert(!check_totally_ordered_with<std::nullptr_t,
+ int (S::*)() volatile & noexcept>());
+static_assert(!check_totally_ordered_with<std::nullptr_t,
+ int (S::*)() const volatile&>());
+static_assert(!check_totally_ordered_with<
+ std::nullptr_t, int (S::*)() const volatile & noexcept>());
+static_assert(!check_totally_ordered_with<std::nullptr_t, int (S::*)() &&>());
+static_assert(!check_totally_ordered_with < std::nullptr_t,
+ int (S::*)() && noexcept > ());
+static_assert(
+ !check_totally_ordered_with<std::nullptr_t, int (S::*)() const&&>());
+static_assert(!check_totally_ordered_with < std::nullptr_t,
+ int (S::*)() const&& noexcept > ());
+static_assert(
+ !check_totally_ordered_with<std::nullptr_t, int (S::*)() volatile&&>());
+static_assert(!check_totally_ordered_with < std::nullptr_t,
+ int (S::*)() volatile&& noexcept > ());
+static_assert(!check_totally_ordered_with<std::nullptr_t,
+ int (S::*)() const volatile&&>());
+static_assert(!check_totally_ordered_with < std::nullptr_t,
+ int (S::*)() const volatile&& noexcept > ());
+
+static_assert(!std::equality_comparable_with<void, int>);
+static_assert(!std::equality_comparable_with<void, int*>);
+static_assert(!std::equality_comparable_with<void, std::nullptr_t>);
+static_assert(!std::equality_comparable_with<void, int[5]>);
+static_assert(!std::equality_comparable_with<void, int (*)()>);
+static_assert(!std::equality_comparable_with<void, int (&)()>);
+static_assert(!std::equality_comparable_with<void, int S::*>);
+static_assert(!std::equality_comparable_with<void, int (S::*)()>);
+static_assert(!std::equality_comparable_with<void, int (S::*)() noexcept>);
+static_assert(!std::equality_comparable_with<void, int (S::*)() const>);
+static_assert(
+ !std::equality_comparable_with<void, int (S::*)() const noexcept>);
+static_assert(!std::equality_comparable_with<void, int (S::*)() volatile>);
+static_assert(
+ !std::equality_comparable_with<void, int (S::*)() volatile noexcept>);
+static_assert(
+ !std::equality_comparable_with<void, int (S::*)() const volatile>);
+static_assert(
+ !std::equality_comparable_with<void, int (S::*)() const volatile noexcept>);
+static_assert(!std::equality_comparable_with<void, int (S::*)() &>);
+static_assert(!std::equality_comparable_with<void, int (S::*)() & noexcept>);
+static_assert(!std::equality_comparable_with<void, int (S::*)() const&>);
+static_assert(
+ !std::equality_comparable_with<void, int (S::*)() const & noexcept>);
+static_assert(!std::equality_comparable_with<void, int (S::*)() volatile&>);
+static_assert(
+ !std::equality_comparable_with<void, int (S::*)() volatile & noexcept>);
+static_assert(
+ !std::equality_comparable_with<void, int (S::*)() const volatile&>);
+static_assert(!std::equality_comparable_with<void, int (S::*)() const volatile &
+ noexcept>);
+static_assert(!std::equality_comparable_with<void, int (S::*)() &&>);
+static_assert(!std::equality_comparable_with < void,
+ int (S::*)() && noexcept >);
+static_assert(!std::equality_comparable_with<void, int (S::*)() const&&>);
+static_assert(!std::equality_comparable_with < void,
+ int (S::*)() const&& noexcept >);
+static_assert(!std::equality_comparable_with<void, int (S::*)() volatile&&>);
+static_assert(!std::equality_comparable_with < void,
+ int (S::*)() volatile&& noexcept >);
+static_assert(
+ !std::equality_comparable_with<void, int (S::*)() const volatile&&>);
+static_assert(!std::equality_comparable_with < void,
+ int (S::*)() const volatile&& noexcept >);
+} // namespace fundamentals
+
+namespace standard_types {
+static_assert(
+ check_totally_ordered_with<std::array<int, 10>, std::array<int, 10> >());
+static_assert(!check_totally_ordered_with<std::array<int, 10>,
+ std::array<double, 10> >());
+static_assert(check_totally_ordered_with<std::deque<int>, std::deque<int> >());
+static_assert(
+ !check_totally_ordered_with<std::deque<int>, std::vector<int> >());
+static_assert(check_totally_ordered_with<std::forward_list<int>,
+ std::forward_list<int> >());
+static_assert(
+ !check_totally_ordered_with<std::forward_list<int>, std::vector<int> >());
+static_assert(check_totally_ordered_with<std::list<int>, std::list<int> >());
+static_assert(!check_totally_ordered_with<std::list<int>, std::vector<int> >());
+
+static_assert(
+ check_totally_ordered_with<std::map<int, void*>, std::map<int, void*> >());
+static_assert(
+ !check_totally_ordered_with<std::map<int, void*>, std::vector<int> >());
+static_assert(check_totally_ordered_with<std::optional<std::vector<int> >,
+ std::optional<std::vector<int> > >());
+static_assert(check_totally_ordered_with<std::optional<std::vector<int> >,
+ std::vector<int> >());
+static_assert(
+ check_totally_ordered_with<std::vector<int>, std::vector<int> >());
+static_assert(!check_totally_ordered_with<std::vector<int>, int>());
+
+struct A {};
+// FIXME(cjdb): uncomment when operator<=> is implemented for each of these types.
+// static_assert(!check_totally_ordered_with<std::optional<std::vector<A> >,
+// std::optional<std::vector<A> > >());
+// static_assert(!check_totally_ordered_with<std::optional<std::vector<A> >,
+// std::vector<A> >());
+struct B {};
+static_assert(!check_totally_ordered_with<std::vector<A>, std::vector<B> >());
+static_assert(
+ !check_totally_ordered_with<std::optional<A>, std::optional<B> >());
+} // namespace standard_types
+
+namespace types_fit_for_purpose {
+static_assert(!check_totally_ordered_with<cxx20_member_eq, cxx20_member_eq>());
+static_assert(!check_totally_ordered_with<cxx20_friend_eq, cxx20_friend_eq>());
+static_assert(!check_totally_ordered_with<cxx20_member_eq, cxx20_friend_eq>());
+
+static_assert(check_totally_ordered_with<member_three_way_comparable,
+ member_three_way_comparable>());
+static_assert(check_totally_ordered_with<friend_three_way_comparable,
+ friend_three_way_comparable>());
+static_assert(!check_totally_ordered_with<member_three_way_comparable,
+ friend_three_way_comparable>());
+
+static_assert(
+ check_totally_ordered_with<explicit_operators, explicit_operators>());
+static_assert(!check_totally_ordered_with<equality_comparable_with_ec1,
+ equality_comparable_with_ec1>());
+static_assert(check_totally_ordered_with<
diff erent_return_types,
+
diff erent_return_types>());
+static_assert(!check_totally_ordered_with<explicit_operators,
+ equality_comparable_with_ec1>());
+static_assert(
+ check_totally_ordered_with<explicit_operators,
diff erent_return_types>());
+
+static_assert(!check_totally_ordered_with<one_way_eq, one_way_eq>());
+static_assert(
+ std::common_reference_with<one_way_eq const&, explicit_operators const&> &&
+ !check_totally_ordered_with<one_way_eq, explicit_operators>());
+
+static_assert(!check_totally_ordered_with<one_way_ne, one_way_ne>());
+static_assert(
+ std::common_reference_with<one_way_ne const&, explicit_operators const&> &&
+ !check_totally_ordered_with<one_way_ne, explicit_operators>());
+
+static_assert(
+ check_totally_ordered_with<totally_ordered_with_others,
+ partial_ordering_totally_ordered_with>());
+static_assert(check_totally_ordered_with<totally_ordered_with_others,
+ weak_ordering_totally_ordered_with>());
+static_assert(
+ check_totally_ordered_with<totally_ordered_with_others,
+ strong_ordering_totally_ordered_with>());
+
+static_assert(!check_totally_ordered_with<totally_ordered_with_others,
+ eq_returns_explicit_bool>());
+static_assert(!check_totally_ordered_with<totally_ordered_with_others,
+ ne_returns_explicit_bool>());
+static_assert(std::equality_comparable_with<totally_ordered_with_others,
+ lt_returns_explicit_bool> &&
+ !check_totally_ordered_with<totally_ordered_with_others,
+ lt_returns_explicit_bool>());
+static_assert(std::equality_comparable_with<totally_ordered_with_others,
+ gt_returns_explicit_bool> &&
+ !check_totally_ordered_with<totally_ordered_with_others,
+ gt_returns_explicit_bool>());
+static_assert(std::equality_comparable_with<totally_ordered_with_others,
+ le_returns_explicit_bool> &&
+ !check_totally_ordered_with<totally_ordered_with_others,
+ le_returns_explicit_bool>());
+static_assert(std::equality_comparable_with<totally_ordered_with_others,
+ ge_returns_explicit_bool> &&
+ !check_totally_ordered_with<totally_ordered_with_others,
+ ge_returns_explicit_bool>());
+static_assert(check_totally_ordered_with<totally_ordered_with_others,
+ returns_true_type>());
+static_assert(
+ check_totally_ordered_with<totally_ordered_with_others, returns_int_ptr>());
+
+static_assert(
+ std::totally_ordered<no_lt_not_totally_ordered_with>&&
+ std::equality_comparable_with<totally_ordered_with_others,
+ no_lt_not_totally_ordered_with> &&
+ !check_totally_ordered_with<totally_ordered_with_others,
+ no_lt_not_totally_ordered_with>());
+static_assert(
+ std::totally_ordered<no_gt_not_totally_ordered_with>&&
+ std::equality_comparable_with<totally_ordered_with_others,
+ no_gt_not_totally_ordered_with> &&
+ !check_totally_ordered_with<totally_ordered_with_others,
+ no_gt_not_totally_ordered_with>());
+static_assert(
+ std::totally_ordered<no_le_not_totally_ordered_with>&&
+ std::equality_comparable_with<totally_ordered_with_others,
+ no_le_not_totally_ordered_with> &&
+ !check_totally_ordered_with<totally_ordered_with_others,
+ no_le_not_totally_ordered_with>());
+static_assert(
+ std::totally_ordered<no_ge_not_totally_ordered_with>&&
+ std::equality_comparable_with<totally_ordered_with_others,
+ no_ge_not_totally_ordered_with> &&
+ !check_totally_ordered_with<totally_ordered_with_others,
+ no_ge_not_totally_ordered_with>());
+} // namespace types_fit_for_purpose
+
+int main(int, char**) { return 0; }
diff --git a/libcxx/test/std/concepts/concepts.compare/types.h b/libcxx/test/std/concepts/concepts.compare/types.h
index 6f7689e22c613..de816a371e45e 100644
--- a/libcxx/test/std/concepts/concepts.compare/types.h
+++ b/libcxx/test/std/concepts/concepts.compare/types.h
@@ -5,8 +5,8 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-#ifndef TEST_STD_CONCEPTS_COMPARISON_EQUALITYCOMPARABLE_H
-#define TEST_STD_CONCEPTS_COMPARISON_EQUALITYCOMPARABLE_H
+#ifndef TEST_STD_CONCEPTS_COMPARISON_TYPES_H
+#define TEST_STD_CONCEPTS_COMPARISON_TYPES_H
#include <compare>
#include <concepts>
@@ -39,6 +39,11 @@ struct friend_three_way_comparable {
struct explicit_operators {
friend bool operator==(explicit_operators, explicit_operators) noexcept;
friend bool operator!=(explicit_operators, explicit_operators) noexcept;
+ friend bool operator<(explicit_operators, explicit_operators) noexcept;
+ friend bool operator>(explicit_operators, explicit_operators) noexcept;
+ friend bool operator<=(explicit_operators, explicit_operators) noexcept;
+ friend bool operator>=(explicit_operators, explicit_operators) noexcept;
+ friend bool operator<=>(explicit_operators, explicit_operators) noexcept;
friend bool operator==(explicit_operators const&,
equality_comparable_with_ec1 const&) noexcept;
@@ -50,15 +55,18 @@ struct explicit_operators {
explicit_operators const&) noexcept;
};
-struct eq_neq_
diff erent_return_types {
- int operator==(eq_neq_
diff erent_return_types) const noexcept;
- friend long operator!=(eq_neq_
diff erent_return_types,
- eq_neq_
diff erent_return_types) noexcept;
+struct
diff erent_return_types {
+ bool operator==(
diff erent_return_types) const noexcept;
+ char operator!=(
diff erent_return_types) const noexcept;
+ short operator<(
diff erent_return_types) const noexcept;
+ int operator>(
diff erent_return_types) const noexcept;
+ long operator<=(
diff erent_return_types) const noexcept;
+ long long operator>=(
diff erent_return_types) const noexcept;
- friend int operator==(explicit_operators, eq_neq_
diff erent_return_types);
- friend int operator==(eq_neq_
diff erent_return_types, explicit_operators);
- friend long operator!=(explicit_operators, eq_neq_
diff erent_return_types);
- friend long operator!=(eq_neq_
diff erent_return_types, explicit_operators);
+ friend signed char operator==(explicit_operators,
diff erent_return_types);
+ friend unsigned char operator==(
diff erent_return_types, explicit_operators);
+ friend float operator!=(explicit_operators,
diff erent_return_types);
+ friend double operator!=(
diff erent_return_types, explicit_operators);
operator explicit_operators() const;
};
@@ -73,7 +81,7 @@ struct one_member_one_friend {
boolean operator!=(one_member_one_friend) const noexcept;
operator explicit_operators() const noexcept;
- operator eq_neq_
diff erent_return_types() const noexcept;
+ operator
diff erent_return_types() const noexcept;
};
struct equality_comparable_with_ec1 {
@@ -83,27 +91,120 @@ struct equality_comparable_with_ec1 {
};
struct no_eq {
+ friend bool operator==(no_eq, no_eq) = delete;
friend bool operator!=(no_eq, no_eq) noexcept;
+ friend bool operator<(no_eq, no_eq) noexcept;
+ friend bool operator>(no_eq, no_eq) noexcept;
+ friend bool operator>=(no_eq, no_eq) noexcept;
+ friend bool operator<=(no_eq, no_eq) noexcept;
};
struct no_neq {
friend bool operator==(no_neq, no_neq) noexcept;
friend bool operator!=(no_neq, no_neq) = delete;
+ friend bool operator<(no_eq, no_eq) noexcept;
+ friend bool operator>(no_eq, no_eq) noexcept;
+ friend bool operator>=(no_eq, no_eq) noexcept;
+ friend bool operator<=(no_eq, no_eq) noexcept;
+};
+
+struct no_lt {
+ friend bool operator==(no_lt, no_lt) noexcept;
+ friend bool operator!=(no_lt, no_lt) noexcept;
+ friend bool operator<(no_lt, no_lt) = delete;
+ friend bool operator>(no_lt, no_lt) noexcept;
+ friend bool operator>=(no_lt, no_lt) noexcept;
+ friend bool operator<=(no_lt, no_lt) noexcept;
+};
+
+struct no_gt {
+ friend bool operator==(no_gt, no_gt) noexcept;
+ friend bool operator!=(no_gt, no_gt) noexcept;
+ friend bool operator<(no_gt, no_gt) noexcept;
+ friend bool operator>(no_gt, no_gt) = delete;
+ friend bool operator>=(no_gt, no_gt) noexcept;
+ friend bool operator<=(no_gt, no_gt) noexcept;
+};
+
+struct no_le {
+ friend bool operator==(no_le, no_le) noexcept;
+ friend bool operator!=(no_le, no_le) noexcept;
+ friend bool operator<(no_le, no_le) noexcept;
+ friend bool operator>(no_le, no_le) noexcept;
+ friend bool operator>=(no_le, no_le) = delete;
+ friend bool operator<=(no_le, no_le) noexcept;
+};
+
+struct no_ge {
+ friend bool operator==(no_ge, no_ge) noexcept;
+ friend bool operator!=(no_ge, no_ge) noexcept;
+ friend bool operator<(no_ge, no_ge) noexcept;
+ friend bool operator>(no_ge, no_ge) noexcept;
+ friend bool operator>=(no_ge, no_ge) noexcept;
+ friend bool operator<=(no_ge, no_ge) = delete;
};
struct wrong_return_type_eq {
void operator==(wrong_return_type_eq) const noexcept;
bool operator!=(wrong_return_type_eq) const noexcept;
+ bool operator<(wrong_return_type_eq) const noexcept;
+ bool operator>(wrong_return_type_eq) const noexcept;
+ bool operator>=(wrong_return_type_eq) const noexcept;
+ bool operator<=(wrong_return_type_eq) const noexcept;
};
struct wrong_return_type_ne {
bool operator==(wrong_return_type_ne) const noexcept;
void operator!=(wrong_return_type_ne) const noexcept;
+ bool operator<(wrong_return_type_ne) const noexcept;
+ bool operator>(wrong_return_type_ne) const noexcept;
+ bool operator>=(wrong_return_type_ne) const noexcept;
+ bool operator<=(wrong_return_type_ne) const noexcept;
+};
+
+struct wrong_return_type_lt {
+ bool operator==(wrong_return_type_lt) const noexcept;
+ bool operator!=(wrong_return_type_lt) const noexcept;
+ void operator<(wrong_return_type_lt) const noexcept;
+ bool operator>(wrong_return_type_lt) const noexcept;
+ bool operator>=(wrong_return_type_lt) const noexcept;
+ bool operator<=(wrong_return_type_lt) const noexcept;
+};
+
+struct wrong_return_type_gt {
+ bool operator==(wrong_return_type_gt) const noexcept;
+ bool operator!=(wrong_return_type_gt) const noexcept;
+ bool operator<(wrong_return_type_gt) const noexcept;
+ void operator>(wrong_return_type_gt) const noexcept;
+ bool operator>=(wrong_return_type_gt) const noexcept;
+ bool operator<=(wrong_return_type_gt) const noexcept;
+};
+
+struct wrong_return_type_le {
+ bool operator==(wrong_return_type_le) const noexcept;
+ bool operator!=(wrong_return_type_le) const noexcept;
+ bool operator<(wrong_return_type_le) const noexcept;
+ bool operator>(wrong_return_type_le) const noexcept;
+ void operator>=(wrong_return_type_le) const noexcept;
+ bool operator<=(wrong_return_type_le) const noexcept;
+};
+
+struct wrong_return_type_ge {
+ bool operator==(wrong_return_type_ge) const noexcept;
+ bool operator!=(wrong_return_type_ge) const noexcept;
+ bool operator<(wrong_return_type_ge) const noexcept;
+ bool operator>(wrong_return_type_ge) const noexcept;
+ bool operator>=(wrong_return_type_ge) const noexcept;
+ void operator<=(wrong_return_type_ge) const noexcept;
};
struct wrong_return_type {
void operator==(wrong_return_type) const noexcept;
void operator!=(wrong_return_type) const noexcept;
+ void operator<(wrong_return_type) const noexcept;
+ void operator>(wrong_return_type) const noexcept;
+ void operator>=(wrong_return_type) const noexcept;
+ void operator<=(wrong_return_type_ge) const noexcept;
};
struct cxx20_member_eq_operator_with_deleted_ne {
@@ -177,24 +278,296 @@ struct explicit_bool {
explicit operator bool() const noexcept;
};
-struct returns_explicit_bool {
- friend explicit_bool operator==(returns_explicit_bool, returns_explicit_bool);
- friend explicit_bool operator!=(returns_explicit_bool, returns_explicit_bool);
+struct totally_ordered_with_others {
+ auto operator<=>(totally_ordered_with_others const&) const = default;
+};
+
+struct no_lt_not_totally_ordered_with {
+ [[nodiscard]] bool
+ operator==(no_lt_not_totally_ordered_with const&) const = default;
+ [[nodiscard]] auto
+ operator<=>(no_lt_not_totally_ordered_with const&) const = default;
+ operator totally_ordered_with_others() const noexcept;
+
+ [[nodiscard]] bool operator==(totally_ordered_with_others const&) const;
+ [[nodiscard]] auto operator<=>(totally_ordered_with_others const&) const;
+ [[nodiscard]] auto operator<(totally_ordered_with_others const&) const;
+};
+
+struct no_gt_not_totally_ordered_with {
+ [[nodiscard]] bool
+ operator==(no_gt_not_totally_ordered_with const&) const = default;
+ [[nodiscard]] auto
+ operator<=>(no_gt_not_totally_ordered_with const&) const = default;
+ operator totally_ordered_with_others() const noexcept;
+
+ [[nodiscard]] bool operator==(totally_ordered_with_others const&) const;
+ [[nodiscard]] auto operator<=>(totally_ordered_with_others const&) const;
+ [[nodiscard]] auto operator>(totally_ordered_with_others const&) const;
+};
+
+struct no_le_not_totally_ordered_with {
+ [[nodiscard]] bool
+ operator==(no_le_not_totally_ordered_with const&) const = default;
+ [[nodiscard]] auto
+ operator<=>(no_le_not_totally_ordered_with const&) const = default;
+ operator totally_ordered_with_others() const noexcept;
+
+ [[nodiscard]] bool operator==(totally_ordered_with_others const&) const;
+ [[nodiscard]] auto operator<=>(totally_ordered_with_others const&) const;
+ [[nodiscard]] auto operator<=(totally_ordered_with_others const&) const;
+};
+
+struct no_ge_not_totally_ordered_with {
+ [[nodiscard]] bool
+ operator==(no_ge_not_totally_ordered_with const&) const = default;
+ [[nodiscard]] auto
+ operator<=>(no_ge_not_totally_ordered_with const&) const = default;
+ operator totally_ordered_with_others() const noexcept;
+
+ [[nodiscard]] bool operator==(totally_ordered_with_others const&) const;
+ [[nodiscard]] auto operator<=>(totally_ordered_with_others const&) const;
+ [[nodiscard]] auto operator>=(totally_ordered_with_others const&) const;
+};
+
+struct partial_ordering_totally_ordered_with {
+ [[nodiscard]] auto operator<=>(
+ partial_ordering_totally_ordered_with const&) const noexcept = default;
+ [[nodiscard]] std::partial_ordering
+ operator<=>(totally_ordered_with_others const&) const noexcept;
+
+ operator totally_ordered_with_others() const;
+};
+
+struct weak_ordering_totally_ordered_with {
+ [[nodiscard]] auto operator<=>(
+ weak_ordering_totally_ordered_with const&) const noexcept = default;
+ [[nodiscard]] std::weak_ordering
+ operator<=>(totally_ordered_with_others const&) const noexcept;
+
+ operator totally_ordered_with_others() const;
+};
+
+struct strong_ordering_totally_ordered_with {
+ [[nodiscard]] auto operator<=>(
+ strong_ordering_totally_ordered_with const&) const noexcept = default;
+ [[nodiscard]] std::strong_ordering
+ operator<=>(totally_ordered_with_others const&) const noexcept;
+
+ operator totally_ordered_with_others() const;
+};
+
+struct eq_returns_explicit_bool {
+ friend explicit_bool operator==(eq_returns_explicit_bool,
+ eq_returns_explicit_bool);
+ friend bool operator!=(eq_returns_explicit_bool, eq_returns_explicit_bool);
+ friend bool operator<(eq_returns_explicit_bool, eq_returns_explicit_bool);
+ friend bool operator>(eq_returns_explicit_bool, eq_returns_explicit_bool);
+ friend bool operator<=(eq_returns_explicit_bool, eq_returns_explicit_bool);
+ friend bool operator>=(eq_returns_explicit_bool, eq_returns_explicit_bool);
+
+ operator totally_ordered_with_others() const;
+
+ friend explicit_bool operator==(eq_returns_explicit_bool,
+ totally_ordered_with_others);
+ friend explicit_bool operator==(totally_ordered_with_others,
+ eq_returns_explicit_bool);
+ friend bool operator!=(eq_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator!=(totally_ordered_with_others, eq_returns_explicit_bool);
+ friend bool operator<(eq_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator<(totally_ordered_with_others, eq_returns_explicit_bool);
+ friend bool operator>(eq_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator>(totally_ordered_with_others, eq_returns_explicit_bool);
+ friend bool operator<=(eq_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator<=(totally_ordered_with_others, eq_returns_explicit_bool);
+ friend bool operator>=(eq_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator>=(totally_ordered_with_others, eq_returns_explicit_bool);
+};
+
+struct ne_returns_explicit_bool {
+ friend bool operator==(ne_returns_explicit_bool, ne_returns_explicit_bool);
+ friend explicit_bool operator!=(ne_returns_explicit_bool,
+ ne_returns_explicit_bool);
+ friend bool operator<(ne_returns_explicit_bool, ne_returns_explicit_bool);
+ friend bool operator>(ne_returns_explicit_bool, ne_returns_explicit_bool);
+ friend bool operator<=(ne_returns_explicit_bool, ne_returns_explicit_bool);
+ friend bool operator>=(ne_returns_explicit_bool, ne_returns_explicit_bool);
+
+ operator totally_ordered_with_others() const;
+
+ friend bool operator==(ne_returns_explicit_bool, totally_ordered_with_others);
+ friend explicit_bool operator!=(ne_returns_explicit_bool,
+ totally_ordered_with_others);
+ friend explicit_bool operator!=(totally_ordered_with_others,
+ ne_returns_explicit_bool);
+ friend bool operator<(ne_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator<(totally_ordered_with_others, ne_returns_explicit_bool);
+ friend bool operator>(ne_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator>(totally_ordered_with_others, ne_returns_explicit_bool);
+ friend bool operator<=(ne_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator<=(totally_ordered_with_others, ne_returns_explicit_bool);
+ friend bool operator>=(ne_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator>=(totally_ordered_with_others, ne_returns_explicit_bool);
+};
+
+struct lt_returns_explicit_bool {
+ friend bool operator==(lt_returns_explicit_bool, lt_returns_explicit_bool);
+ friend bool operator!=(lt_returns_explicit_bool, lt_returns_explicit_bool);
+ friend explicit_bool operator<(lt_returns_explicit_bool,
+ lt_returns_explicit_bool);
+ friend bool operator>(lt_returns_explicit_bool, lt_returns_explicit_bool);
+ friend bool operator<=(lt_returns_explicit_bool, lt_returns_explicit_bool);
+ friend bool operator>=(lt_returns_explicit_bool, lt_returns_explicit_bool);
+
+ operator totally_ordered_with_others() const;
+
+ friend bool operator==(lt_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator!=(lt_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator!=(totally_ordered_with_others, lt_returns_explicit_bool);
+ friend explicit_bool operator<(lt_returns_explicit_bool,
+ totally_ordered_with_others);
+ friend bool operator<(totally_ordered_with_others, lt_returns_explicit_bool);
+ friend bool operator>(lt_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator>(totally_ordered_with_others, lt_returns_explicit_bool);
+ friend bool operator<=(lt_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator<=(totally_ordered_with_others, lt_returns_explicit_bool);
+ friend bool operator>=(lt_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator>=(totally_ordered_with_others, lt_returns_explicit_bool);
+};
+
+struct gt_returns_explicit_bool {
+ friend bool operator==(gt_returns_explicit_bool, gt_returns_explicit_bool);
+ friend bool operator!=(gt_returns_explicit_bool, gt_returns_explicit_bool);
+ friend bool operator<(gt_returns_explicit_bool, gt_returns_explicit_bool);
+ friend explicit_bool operator>(gt_returns_explicit_bool,
+ gt_returns_explicit_bool);
+ friend bool operator<=(gt_returns_explicit_bool, gt_returns_explicit_bool);
+ friend bool operator>=(gt_returns_explicit_bool, gt_returns_explicit_bool);
+
+ operator totally_ordered_with_others() const;
+
+ friend bool operator==(gt_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator!=(gt_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator!=(totally_ordered_with_others, gt_returns_explicit_bool);
+ friend bool operator<(gt_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator<(totally_ordered_with_others, gt_returns_explicit_bool);
+ friend explicit_bool operator>(gt_returns_explicit_bool,
+ totally_ordered_with_others);
+ friend bool operator>(totally_ordered_with_others, gt_returns_explicit_bool);
+ friend bool operator<=(gt_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator<=(totally_ordered_with_others, gt_returns_explicit_bool);
+ friend bool operator>=(gt_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator>=(totally_ordered_with_others, gt_returns_explicit_bool);
+};
+
+struct le_returns_explicit_bool {
+ friend bool operator==(le_returns_explicit_bool, le_returns_explicit_bool);
+ friend bool operator!=(le_returns_explicit_bool, le_returns_explicit_bool);
+ friend bool operator<(le_returns_explicit_bool, le_returns_explicit_bool);
+ friend bool operator>(le_returns_explicit_bool, le_returns_explicit_bool);
+ friend explicit_bool operator<=(le_returns_explicit_bool,
+ le_returns_explicit_bool);
+ friend bool operator>=(le_returns_explicit_bool, le_returns_explicit_bool);
+
+ operator totally_ordered_with_others() const;
+
+ friend bool operator==(le_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator!=(le_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator!=(totally_ordered_with_others, le_returns_explicit_bool);
+ friend bool operator<(le_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator<(totally_ordered_with_others, le_returns_explicit_bool);
+ friend bool operator>(le_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator>(totally_ordered_with_others, le_returns_explicit_bool);
+ friend bool operator<=(le_returns_explicit_bool, totally_ordered_with_others);
+ friend explicit_bool operator<=(totally_ordered_with_others,
+ le_returns_explicit_bool);
+ friend bool operator>=(le_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator>=(totally_ordered_with_others, le_returns_explicit_bool);
+};
+
+struct ge_returns_explicit_bool {
+ friend bool operator==(ge_returns_explicit_bool, ge_returns_explicit_bool);
+ friend bool operator!=(ge_returns_explicit_bool, ge_returns_explicit_bool);
+ friend bool operator<(ge_returns_explicit_bool, ge_returns_explicit_bool);
+ friend bool operator>(ge_returns_explicit_bool, ge_returns_explicit_bool);
+ friend bool operator<=(ge_returns_explicit_bool, ge_returns_explicit_bool);
+ friend explicit_bool operator>=(ge_returns_explicit_bool,
+ ge_returns_explicit_bool);
+
+ operator totally_ordered_with_others() const;
+
+ friend bool operator==(ge_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator!=(ge_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator!=(totally_ordered_with_others, ge_returns_explicit_bool);
+ friend bool operator<(ge_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator<(totally_ordered_with_others, ge_returns_explicit_bool);
+ friend bool operator>(ge_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator>(totally_ordered_with_others, ge_returns_explicit_bool);
+ friend bool operator<=(ge_returns_explicit_bool, totally_ordered_with_others);
+ friend bool operator<=(totally_ordered_with_others, ge_returns_explicit_bool);
+ friend bool operator>=(ge_returns_explicit_bool, totally_ordered_with_others);
+ friend explicit_bool operator>=(totally_ordered_with_others,
+ ge_returns_explicit_bool);
};
struct returns_true_type {
friend std::true_type operator==(returns_true_type, returns_true_type);
friend std::true_type operator!=(returns_true_type, returns_true_type);
-};
-
-struct returns_false_type {
- friend std::false_type operator==(returns_false_type, returns_false_type);
- friend std::false_type operator!=(returns_false_type, returns_false_type);
+ friend std::true_type operator<(returns_true_type, returns_true_type);
+ friend std::true_type operator>(returns_true_type, returns_true_type);
+ friend std::true_type operator<=(returns_true_type, returns_true_type);
+ friend std::true_type operator>=(returns_true_type, returns_true_type);
+
+ operator totally_ordered_with_others() const;
+
+ friend std::true_type operator==(returns_true_type,
+ totally_ordered_with_others);
+ friend std::true_type operator==(totally_ordered_with_others,
+ returns_true_type);
+ friend std::true_type operator!=(returns_true_type,
+ totally_ordered_with_others);
+ friend std::true_type operator!=(totally_ordered_with_others,
+ returns_true_type);
+ friend std::true_type operator<(returns_true_type,
+ totally_ordered_with_others);
+ friend std::true_type operator<(totally_ordered_with_others,
+ returns_true_type);
+ friend std::true_type operator>(returns_true_type,
+ totally_ordered_with_others);
+ friend std::true_type operator>(totally_ordered_with_others,
+ returns_true_type);
+ friend std::true_type operator<=(returns_true_type,
+ totally_ordered_with_others);
+ friend std::true_type operator<=(totally_ordered_with_others,
+ returns_true_type);
+ friend std::true_type operator>=(returns_true_type,
+ totally_ordered_with_others);
+ friend std::true_type operator>=(totally_ordered_with_others,
+ returns_true_type);
};
struct returns_int_ptr {
friend int* operator==(returns_int_ptr, returns_int_ptr);
friend int* operator!=(returns_int_ptr, returns_int_ptr);
+ friend int* operator<(returns_int_ptr, returns_int_ptr);
+ friend int* operator>(returns_int_ptr, returns_int_ptr);
+ friend int* operator<=(returns_int_ptr, returns_int_ptr);
+ friend int* operator>=(returns_int_ptr, returns_int_ptr);
+
+ operator totally_ordered_with_others() const;
+
+ friend int* operator==(returns_int_ptr, totally_ordered_with_others);
+ friend int* operator==(totally_ordered_with_others, returns_int_ptr);
+ friend int* operator!=(returns_int_ptr, totally_ordered_with_others);
+ friend int* operator!=(totally_ordered_with_others, returns_int_ptr);
+ friend int* operator<(returns_int_ptr, totally_ordered_with_others);
+ friend int* operator<(totally_ordered_with_others, returns_int_ptr);
+ friend int* operator>(returns_int_ptr, totally_ordered_with_others);
+ friend int* operator>(totally_ordered_with_others, returns_int_ptr);
+ friend int* operator<=(returns_int_ptr, totally_ordered_with_others);
+ friend int* operator<=(totally_ordered_with_others, returns_int_ptr);
+ friend int* operator>=(returns_int_ptr, totally_ordered_with_others);
+ friend int* operator>=(totally_ordered_with_others, returns_int_ptr);
};
-#endif // TEST_STD_CONCEPTS_COMPARISON_EQUALITYCOMPARABLE_H
+#endif // TEST_STD_CONCEPTS_COMPARISON_TYPES_H
More information about the libcxx-commits
mailing list