libstdc++: Simplify std::totally_ordered_with (LWG 3329)
authorJonathan Wakely <jwakely@redhat.com>
Wed, 19 Feb 2020 21:31:06 +0000 (21:31 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 19 Feb 2020 21:31:06 +0000 (21:31 +0000)
* include/std/concepts (totally_ordered_with): Remove redundant
requirement (LWG 3329).

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/concepts

index 6e22536680fcdad7af2ba4172b36aaad56a4834a..3941bcbe7ba9b9cd08ea1c64aebd1b76cb940e76 100644 (file)
@@ -1,5 +1,8 @@
 2020-02-19  Jonathan Wakely  <jwakely@redhat.com>
 
+       * include/std/concepts (totally_ordered_with): Remove redundant
+       requirement (LWG 3329).
+
        * include/std/ranges (__detail::__convertible_to_non_slicing): New
        helper concept.
        (__detail::__pair_like_convertible_to): Remove.
index f3db40b798fe23005d7ec56aa0b2e0272f42b75b..be125c636a14feb39ebe3ec4d2af047713cdde5c 100644 (file)
@@ -311,10 +311,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   template<typename _Tp, typename _Up>
     concept totally_ordered_with
       = totally_ordered<_Tp> && totally_ordered<_Up>
-      && common_reference_with<__detail::__cref<_Tp>, __detail::__cref<_Up>>
+      && equality_comparable_with<_Tp, _Up>
       && totally_ordered<common_reference_t<__detail::__cref<_Tp>,
                                            __detail::__cref<_Up>>>
-      && equality_comparable_with<_Tp, _Up>
       && requires(__detail::__cref<_Tp> __t, __detail::__cref<_Up> __u) {
        { __t <  __u } -> __detail::__boolean_testable;
        { __t >  __u } -> __detail::__boolean_testable;