aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-05-05 12:07:32 -0400
committerPatrick Palka <ppalka@redhat.com>2021-05-05 12:07:32 -0400
commit2663727d853438ee4d67b200a08f94a318745486 (patch)
treef35d79f67b89a54c2cc79aaedcc3e724685d342c
parentd9937da063e5847f45f7f1f7a02bed7dbc8fb2f6 (diff)
downloadgcc-2663727d853438ee4d67b200a08f94a318745486.zip
gcc-2663727d853438ee4d67b200a08f94a318745486.tar.gz
gcc-2663727d853438ee4d67b200a08f94a318745486.tar.bz2
libstdc++: Implement LWG 3517/3520 for join_view/transform_view
libstdc++-v3/ChangeLog: * include/std/ranges (transform_view::_Iterator::iter_swap): Remove as per LWG 3520. (join_view::_Iterator::iter_swap): Add indirectly_swappable constraint as per LWG 3517.
-rw-r--r--libstdc++-v3/include/std/ranges7
1 files changed, 1 insertions, 6 deletions
diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index 4a7ca49..f21e08a 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -1581,12 +1581,6 @@ namespace views::__adaptor
return *__i;
}
- friend constexpr void
- iter_swap(const _Iterator& __x, const _Iterator& __y)
- noexcept(noexcept(ranges::iter_swap(__x._M_current, __y._M_current)))
- requires indirectly_swappable<_Base_iter>
- { return ranges::iter_swap(__x._M_current, __y._M_current); }
-
friend _Iterator<!_Const>;
template<bool> friend struct _Sentinel;
};
@@ -2520,6 +2514,7 @@ namespace views::__adaptor
friend constexpr void
iter_swap(const _Iterator& __x, const _Iterator& __y)
noexcept(noexcept(ranges::iter_swap(__x._M_inner, __y._M_inner)))
+ requires indirectly_swappable<_Inner_iter>
{ return ranges::iter_swap(__x._M_inner, __y._M_inner); }
friend _Iterator<!_Const>;