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++/100187] Helper lambda in ranges_algo.h misses forwarding return type
Date: Wed, 13 Oct 2021 13:56:52 +0000	[thread overview]
Message-ID: <bug-100187-4-9Mgmec59Ih@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100187-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 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:139bafaaba0c775ca65712621bd60e079b488d73

commit r10-10210-g139bafaaba0c775ca65712621bd60e079b488d73
Author: Patrick Palka <ppalka@redhat.com>
Date:   Tue Apr 27 23:21:19 2021 -0400

    libstdc++: Fix various bugs in ranges_algo.h [PR100187, ...]

    This fixes some bugs with our ranges algorithms in uncommon situations,
    such as when the return type of a predicate is a non-copyable class type
    that's implicitly convertible to bool (PR100187), when a comparison
    predicate isn't invocable as an rvalue (PR100237), and when the return
    type of a projection function is non-copyable (PR100249).

    This also fixes PR100287, which reports that we're moving __first twice
    when constructing with it an empty subrange in ranges::partition.

    libstdc++-v3/ChangeLog:

            PR libstdc++/100187
            PR libstdc++/100237
            PR libstdc++/100249
            PR libstdc++/100287
            * include/bits/ranges_algo.h (__search_n_fn::operator()): Give
            the __value_comp lambda an explicit bool return type.
            (__is_permutation_fn::operator()): Give the __proj_scan local
            variable auto&& return type.  Give the __comp_scan lambda an
            explicit bool return type.
            (__remove_fn::operator()): Give the __pred lambda an explicit
            bool return type.
            (__partition_fn::operator()): Don't std::move __first twice
            when returning an empty subrange.
            (__min_fn::operator()): Don't std::move __comp.
            (__max_fn::operator()): Likewise.
            (__minmax_fn::operator()): Likewise.

    (cherry picked from commit d91e7eab3a2c3957c2220ad71e62d9fc78cccb9b)

  parent reply	other threads:[~2021-10-13 13:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 16:09 [Bug libstdc++/100187] New: ranges::search_n helper lambda " hewillk at gmail dot com
2021-04-21 16:19 ` [Bug libstdc++/100187] " hewillk at gmail dot com
2021-04-21 16:44 ` hewillk at gmail dot com
2021-04-22  6:06 ` hewillk at gmail dot com
2021-04-22 19:12 ` [Bug libstdc++/100187] Helper lambda in ranges_algo.h " ppalka at gcc dot gnu.org
2021-04-28  3:23 ` cvs-commit at gcc dot gnu.org
2021-10-13 13:51 ` cvs-commit at gcc dot gnu.org
2021-10-13 13:56 ` cvs-commit at gcc dot gnu.org [this message]
2021-10-13 13:58 ` ppalka 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-100187-4-9Mgmec59Ih@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).