public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-4521] libstdc++: Implement LWG 3580 change to ranges::iota_view
@ 2021-10-19 22:10 Patrick Palka
0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2021-10-19 22:10 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:5566f3c6b46cf053ae4b918513e318561b7af053
commit r12-4521-g5566f3c6b46cf053ae4b918513e318561b7af053
Author: Patrick Palka <ppalka@redhat.com>
Date: Tue Oct 19 18:07:19 2021 -0400
libstdc++: Implement LWG 3580 change to ranges::iota_view
libstdc++-v3/ChangeLog:
* include/std/ranges (iota_view::_Iterator::operator+): Adjust
definition as per LWG 3580.
(iota_view::_Iterator::operator-): Likewise.
Diff:
---
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 c3a6dbab6fd..273699aa790 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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-19 22:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 22:10 [gcc r12-4521] libstdc++: Implement LWG 3580 change to ranges::iota_view Patrick Palka
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).