aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-10-19 18:07:19 -0400
committerPatrick Palka <ppalka@redhat.com>2021-10-19 18:07:19 -0400
commit5566f3c6b46cf053ae4b918513e318561b7af053 (patch)
tree3280845dc7b0b63fb3075592fd3cf99c1a428f84
parentbed1892f5b1a6601caa93d54c156a4d04d76ee7b (diff)
downloadgcc-5566f3c6b46cf053ae4b918513e318561b7af053.zip
gcc-5566f3c6b46cf053ae4b918513e318561b7af053.tar.gz
gcc-5566f3c6b46cf053ae4b918513e318561b7af053.tar.bz2
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.
-rw-r--r--libstdc++-v3/include/std/ranges10
1 files changed, 8 insertions, 2 deletions
diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index c3a6dba..273699a 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)