aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-02-19 21:31:06 +0000
committerJonathan Wakely <jwakely@redhat.com>2020-02-19 21:31:06 +0000
commit241ed965509ac931e9ae5f331d0294c1ee4ccd89 (patch)
treefee1f4451c027b741856759f7c33568c6b4c3ae4
parent77f5310f0205714538668b88fbf1de44f1f435be (diff)
downloadgcc-241ed965509ac931e9ae5f331d0294c1ee4ccd89.zip
gcc-241ed965509ac931e9ae5f331d0294c1ee4ccd89.tar.gz
gcc-241ed965509ac931e9ae5f331d0294c1ee4ccd89.tar.bz2
libstdc++: Simplify std::totally_ordered_with (LWG 3329)
* include/std/concepts (totally_ordered_with): Remove redundant requirement (LWG 3329).
-rw-r--r--libstdc++-v3/ChangeLog3
-rw-r--r--libstdc++-v3/include/std/concepts3
2 files changed, 4 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 6e22536..3941bcb 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/include/std/concepts b/libstdc++-v3/include/std/concepts
index f3db40b..be125c6 100644
--- a/libstdc++-v3/include/std/concepts
+++ b/libstdc++-v3/include/std/concepts
@@ -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;