public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Patrick Palka <ppalka@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-4521] libstdc++: Implement LWG 3580 change to ranges::iota_view Date: Tue, 19 Oct 2021 22:10:05 +0000 (GMT) [thread overview] Message-ID: <20211019221005.5C3193858423@sourceware.org> (raw) 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)
reply other threads:[~2021-10-19 22:10 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211019221005.5C3193858423@sourceware.org \ --to=ppalka@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).