public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/95322] std::list | take | transform, expression does not work cbegin() == end()
Date: Thu, 28 May 2020 01:48:25 +0000	[thread overview]
Message-ID: <bug-95322-4-R59pNORvCh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95322-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95322

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:fc78e991c35a5ee14efafb4e5566a9570fa31dd4

commit r10-8194-gfc78e991c35a5ee14efafb4e5566a9570fa31dd4
Author: Patrick Palka <ppalka@redhat.com>
Date:   Tue May 26 16:17:34 2020 -0400

    libstdc++: Fix common_iterator::operator-> [PR95322]

    This patch fixes the definition of common_iterator::operator-> when the
    underlying iterator's operator* returns a non-reference.

    The first problem is that the class __detail::_Common_iter_proxy is used
    unqualified.  Fixing that revealed another problem: the class's template
    friend declaration of common_iterator doesn't match up with the
    definition of common_iterator, because the friend declaration isn't
    constrained.

    If we try to make the friend declaration match up by adding constraints,
    we run into frontend bug PR93467.  So we currently can't correctly
    express this friend relation between __detail::_Common_iter_proxy and
    common_iterator.

    As a workaround to this frontend bug, this patch moves the definition of
    _Common_iter_proxy into the class template of common_iterator so that we
    could instead express the friend relation via the injected-class-name.

    (This bug was found when attempting to use views::common to work around
    the compile failure with the testcase in PR95322.)

    libstdc++-v3/ChangeLog:

            PR libstdc++/95322
            * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
            Remove and instead define it ...
            (common_iterator::_Proxy): ... here.
            (common_iterator::operator->): Use it.
            * testsuite/24_iterators/common_iterator/2.cc: New test.
            * testsuite/std/ranges/adaptors/95322.cc: New test.

    (cherry picked from commit 3bf5e7657b752cc2352778e8c20ac9cdddca4f93)

  parent reply	other threads:[~2020-05-28  1:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 18:16 [Bug libstdc++/95322] New: " gcc-bugs at marehr dot dialup.fu-berlin.de
2020-05-26 13:13 ` [Bug libstdc++/95322] " redi at gcc dot gnu.org
2020-05-26 13:18 ` redi at gcc dot gnu.org
2020-05-26 13:21 ` redi at gcc dot gnu.org
2020-05-26 13:54 ` ppalka at gcc dot gnu.org
2020-05-26 20:45 ` cvs-commit at gcc dot gnu.org
2020-05-27 20:00 ` redi at gcc dot gnu.org
2020-05-27 20:04 ` daniel.kruegler at googlemail dot com
2020-05-27 20:29 ` redi at gcc dot gnu.org
2020-05-27 21:08 ` cvs-commit at gcc dot gnu.org
2020-05-27 21:11 ` redi at gcc dot gnu.org
2020-05-28  1:48 ` cvs-commit at gcc dot gnu.org [this message]
2020-05-28 18:51 ` daniel.kruegler at googlemail dot com
2020-07-09 12:59 ` cvs-commit at gcc dot gnu.org
2020-07-09 14:51 ` redi at gcc dot gnu.org
2020-07-09 17:54 ` gcc-bugs at marehr dot dialup.fu-berlin.de
2020-08-27  1:53 ` cvs-commit at gcc dot gnu.org
2020-10-12 17:48 ` cvs-commit at gcc dot gnu.org
2020-10-21  1:57 ` cvs-commit at gcc dot gnu.org
2020-12-01 16:20 ` cvs-commit at gcc dot gnu.org

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=bug-95322-4-R59pNORvCh@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).