* [PATCH] libstdc++: Implement LWG 3580 changes to ranges::iota_view
@ 2021-10-19 18:29 Patrick Palka
2021-10-19 18:47 ` Jonathan Wakely
0 siblings, 1 reply; 2+ messages in thread
From: Patrick Palka @ 2021-10-19 18:29 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++, Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk and branches?
libstdc++-v3/ChangeLog:
* include/std/ranges (iota_view::operator+): Adjust definition
as per LWG 3580.
(iota_view::operator-): Likewise.
---
libstdc++-v3/include/std/ranges | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index 18bd087985c..5e18c98eb2f 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -497,7 +497,10 @@ namespace ranges
friend constexpr _Iterator
operator+(_Iterator __i, difference_type __n)
requires __detail::__advanceable<_Winc>
- { return __i += __n; }
+ {
+ __i += __n;
+ return __i;
+ }
friend constexpr _Iterator
operator+(difference_type __n, _Iterator __i)
@@ -507,7 +510,10 @@ namespace ranges
friend constexpr _Iterator
operator-(_Iterator __i, difference_type __n)
requires __detail::__advanceable<_Winc>
- { return __i -= __n; }
+ {
+ __i -= __n;
+ return __i;
+ }
friend constexpr difference_type
operator-(const _Iterator& __x, const _Iterator& __y)
--
2.33.1.711.g9d530dc002
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libstdc++: Implement LWG 3580 changes to ranges::iota_view
2021-10-19 18:29 [PATCH] libstdc++: Implement LWG 3580 changes to ranges::iota_view Patrick Palka
@ 2021-10-19 18:47 ` Jonathan Wakely
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2021-10-19 18:47 UTC (permalink / raw)
To: Patrick Palka; +Cc: gcc-patches, libstdc++
On Tue, 19 Oct 2021, 19:33 Patrick Palka via Libstdc++, <
libstdc++@gcc.gnu.org> wrote:
> Tested on x86_64-pc-linux-gnu, does this look OK for trunk and branches?
>
Yes, thanks.
> libstdc++-v3/ChangeLog:
>
> * include/std/ranges (iota_view::operator+): Adjust definition
> as per LWG 3580.
> (iota_view::operator-): Likewise.
> ---
> libstdc++-v3/include/std/ranges | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/libstdc++-v3/include/std/ranges
> b/libstdc++-v3/include/std/ranges
> index 18bd087985c..5e18c98eb2f 100644
> --- a/libstdc++-v3/include/std/ranges
> +++ b/libstdc++-v3/include/std/ranges
> @@ -497,7 +497,10 @@ namespace ranges
> friend constexpr _Iterator
> operator+(_Iterator __i, difference_type __n)
> requires __detail::__advanceable<_Winc>
> - { return __i += __n; }
> + {
> + __i += __n;
> + return __i;
> + }
>
> friend constexpr _Iterator
> operator+(difference_type __n, _Iterator __i)
> @@ -507,7 +510,10 @@ namespace ranges
> friend constexpr _Iterator
> operator-(_Iterator __i, difference_type __n)
> requires __detail::__advanceable<_Winc>
> - { return __i -= __n; }
> + {
> + __i -= __n;
> + return __i;
> + }
>
> friend constexpr difference_type
> operator-(const _Iterator& __x, const _Iterator& __y)
> --
> 2.33.1.711.g9d530dc002
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-19 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 18:29 [PATCH] libstdc++: Implement LWG 3580 changes to ranges::iota_view Patrick Palka
2021-10-19 18:47 ` 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).