From: Patrick Palka <ppalka@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: libstdc++@gcc.gnu.org, Patrick Palka <ppalka@redhat.com>
Subject: [PATCH 2/2] libstdc++: Implement LWG 3533 changes to foo_view::iterator::base()
Date: Wed, 5 May 2021 16:23:12 -0400 [thread overview]
Message-ID: <20210505202312.1609984-2-ppalka@redhat.com> (raw)
In-Reply-To: <20210505202312.1609984-1-ppalka@redhat.com>
Tested on x86_64-pc-linux-gnu, does this look OK for trunk/10/11?
libstdc++-v3/ChangeLog:
* include/std/ranges (filter_view::_Iterator::base): Make the
const& overload return a const reference and remove its
constraint as per LWG 3533. Make unconditionally noexcept.
(transform_view::_Iterator::base): Likewise.
(elements_view::_Iterator::base): Likewise.
---
libstdc++-v3/include/std/ranges | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges
index 7075fa3ae6e..bc11505c167 100644
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -1199,9 +1199,8 @@ namespace views::__adaptor
_M_parent(__parent)
{ }
- constexpr _Vp_iter
- base() const &
- requires copyable<_Vp_iter>
+ constexpr const _Vp_iter&
+ base() const & noexcept
{ return _M_current; }
constexpr _Vp_iter
@@ -1467,9 +1466,8 @@ namespace views::__adaptor
: _M_current(std::move(__i._M_current)), _M_parent(__i._M_parent)
{ }
- constexpr _Base_iter
- base() const &
- requires copyable<_Base_iter>
+ constexpr const _Base_iter&
+ base() const & noexcept
{ return _M_current; }
constexpr _Base_iter
@@ -3403,8 +3401,8 @@ namespace views::__adaptor
: _M_base(std::move(base))
{ }
- constexpr _Vp
- base() const& requires copy_constructible<_Vp>
+ constexpr const _Vp&
+ base() const & noexcept
{ return _M_base; }
constexpr _Vp
--
2.31.1.442.g7e39198978
next prev parent reply other threads:[~2021-05-05 20:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 20:23 [PATCH 1/2] libstdc++: Implement LWG 3391 changes to move/counted_iterator::base Patrick Palka
2021-05-05 20:23 ` Patrick Palka [this message]
2021-05-06 10:28 ` [PATCH 2/2] libstdc++: Implement LWG 3533 changes to foo_view::iterator::base() Jonathan Wakely
2021-05-06 10:27 ` [PATCH 1/2] libstdc++: Implement LWG 3391 changes to move/counted_iterator::base Jonathan Wakely
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=20210505202312.1609984-2-ppalka@redhat.com \
--to=ppalka@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@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: link
Be 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).