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 r11-9131] libstdc++: Fix up implementation of LWG 3533 [PR101589] Date: Tue, 12 Oct 2021 18:09:26 +0000 (GMT) [thread overview] Message-ID: <20211012180926.DBB803858417@sourceware.org> (raw) https://gcc.gnu.org/g:d187dfbd038a9be68ceb81a6ce4125d50cb453f9 commit r11-9131-gd187dfbd038a9be68ceb81a6ce4125d50cb453f9 Author: Patrick Palka <ppalka@redhat.com> Date: Mon Aug 2 15:30:13 2021 -0400 libstdc++: Fix up implementation of LWG 3533 [PR101589] In r12-569 I accidentally applied the LWG 3533 change to elements_view::iterator::base instead to elements_view::base. This patch corrects this, and also applies the corresponding LWG 3533 change to lazy_split_view::inner-iter::base now that we implement P2210. PR libstdc++/101589 libstdc++-v3/ChangeLog: * include/std/ranges (lazy_split_view::_InnerIter::base): Make the const& overload unconstrained and return a const reference as per LWG 3533. Make unconditionally noexcept. (elements_view::base): Revert accidental r12-569 change. (elements_view::_Iterator::base): Make the const& overload unconstrained and return a const reference as per LWG 3533. Make unconditionally noexcept. (cherry picked from commit 4414057186b227edf5b5efa527732bfcdf39d575) Diff: --- libstdc++-v3/include/std/ranges | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges index b7886346bde..e46d9a059d2 100644 --- a/libstdc++-v3/include/std/ranges +++ b/libstdc++-v3/include/std/ranges @@ -3021,8 +3021,8 @@ namespace views::__adaptor : _M_i(std::move(__i)) { } - constexpr iterator_t<_Base> - base() const& requires copyable<iterator_t<_Base>> + constexpr const iterator_t<_Base>& + base() const& noexcept { return _M_i_current(); } constexpr iterator_t<_Base> @@ -3497,8 +3497,8 @@ namespace views::__adaptor : _M_base(std::move(base)) { } - constexpr const _Vp& - base() const & noexcept + constexpr _Vp + base() const& requires copy_constructible<_Vp> { return _M_base; } constexpr _Vp @@ -3624,9 +3624,8 @@ namespace views::__adaptor : _M_current(std::move(i._M_current)) { } - constexpr iterator_t<_Base> - base() const& - requires copyable<iterator_t<_Base>> + constexpr const iterator_t<_Base>& + base() const& noexcept { return _M_current; } constexpr iterator_t<_Base>
reply other threads:[~2021-10-12 18:09 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=20211012180926.DBB803858417@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).