[gcc r11-8356] libstdc++: Implement LWG 3517/3520 for join_view/transform_view
Patrick Palka
ppalka@gcc.gnu.org
Wed May 5 18:18:51 GMT 2021
https://gcc.gnu.org/g:81c705e64d462eae963a469f2173e7d895dd2030
commit r11-8356-g81c705e64d462eae963a469f2173e7d895dd2030
Author: Patrick Palka <ppalka@redhat.com>
Date: Wed May 5 12:07:32 2021 -0400
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.
(cherry picked from commit 2663727d853438ee4d67b200a08f94a318745486)
Diff:
---
libstdc++-v3/include/std/ranges | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index 606ce81f824..af3c108bec8 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -1578,12 +1578,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;
};
@@ -2460,6 +2454,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>;
More information about the Libstdc++-cvs
mailing list