* [PATCH] libstdc++: Implement LWG 3517 and 3520 for transform_view/join_view
@ 2021-05-05 1:42 Patrick Palka
2021-05-05 9:42 ` Jonathan Wakely
0 siblings, 1 reply; 2+ messages in thread
From: Patrick Palka @ 2021-05-05 1:42 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++, Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps
10/11?
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.
---
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 4a7ca49b45d..f21e08a36e3 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>;
--
2.31.1.442.g7e39198978
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libstdc++: Implement LWG 3517 and 3520 for transform_view/join_view
2021-05-05 1:42 [PATCH] libstdc++: Implement LWG 3517 and 3520 for transform_view/join_view Patrick Palka
@ 2021-05-05 9:42 ` Jonathan Wakely
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2021-05-05 9:42 UTC (permalink / raw)
To: Patrick Palka; +Cc: gcc-patches, libstdc++
On 04/05/21 21:42 -0400, Patrick Palka via Libstdc++ wrote:
>Tested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps
>10/11?
Yes, for all branches.
>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.
>---
> 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 4a7ca49b45d..f21e08a36e3 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>;
>--
>2.31.1.442.g7e39198978
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-05 9:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 1:42 [PATCH] libstdc++: Implement LWG 3517 and 3520 for transform_view/join_view Patrick Palka
2021-05-05 9:42 ` Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).