From: Tim Song <t.canens.cpp@gmail.com>
To: Patrick Palka <ppalka@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
"libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH] libstdc++: Fix iterator caching inside range adaptors [PR100479]
Date: Mon, 17 May 2021 13:39:51 -0500 [thread overview]
Message-ID: <CAPQZVxuZPX+LGwcO1W2D+E_g_O2gk9au+-ywB5G_Ntq4NyiEjg@mail.gmail.com> (raw)
In-Reply-To: <20210517154302.840608-1-ppalka@redhat.com>
On Mon, May 17, 2021 at 11:46 AM Patrick Palka via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
> constexpr void
> _M_set(const _Range&, const iterator_t<_Range>& __it)
> {
> __glibcxx_assert(!_M_has_value());
> - _M_iter = __it;
> + this->_M_payload._M_payload._M_value = __it;
> + this->_M_payload._M_engaged = true;
> }
> };
This part looks questionable - if we don't have a value then we can't
assign to a nonexistent object.
Also, I believe the offset partial specialization of _CachedPosition
needs a change to invalidate the source on move.
next prev parent reply other threads:[~2021-05-17 18:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 15:43 Patrick Palka
2021-05-17 16:51 ` Jonathan Wakely
2021-05-17 18:39 ` Tim Song [this message]
2021-05-17 19:59 ` Patrick Palka
2021-05-17 22:28 ` Tim Song
2021-05-18 4:53 ` Patrick Palka
2021-05-24 18:59 ` 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=CAPQZVxuZPX+LGwcO1W2D+E_g_O2gk9au+-ywB5G_Ntq4NyiEjg@mail.gmail.com \
--to=t.canens.cpp@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=ppalka@redhat.com \
/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).