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++/100287] Using iterator after std::move in ranges::partition Date: Wed, 28 Apr 2021 03:23:30 +0000 [thread overview] Message-ID: <bug-100287-4-ofUJnDqgkg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100287-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100287 --- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:d91e7eab3a2c3957c2220ad71e62d9fc78cccb9b commit r12-178-gd91e7eab3a2c3957c2220ad71e62d9fc78cccb9b 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.
next prev parent reply other threads:[~2021-04-28 3:23 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-27 10:18 [Bug libstdc++/100287] New: " hewillk at gmail dot com 2021-04-27 13:41 ` [Bug libstdc++/100287] " ppalka at gcc dot gnu.org 2021-04-28 3:23 ` cvs-commit at gcc dot gnu.org [this message] 2021-10-13 13:52 ` cvs-commit at gcc dot gnu.org 2021-10-13 13:56 ` cvs-commit at gcc dot gnu.org 2021-10-13 13:59 ` 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-100287-4-ofUJnDqgkg@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: 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).