public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hewillk at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/100249] missing forwarding std::__invoke result in ranges::is_permutation and ranges::clamp
Date: Sat, 08 May 2021 02:24:26 +0000 [thread overview]
Message-ID: <bug-100249-4-X6JJ5SiDvH@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100249-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100249
--- Comment #8 from 康桓瑋 <hewillk at gmail dot com> ---
(In reply to Patrick Palka from comment #6)
> > Maybe this can help:
> >
> > auto&& __proj_val = std::__invoke(__proj, __val);
> > if (std::__invoke(__comp,
> > std::forward<decltype(__proj_val)>(__proj_val), std::__invoke(__proj, __lo)))
> > return __lo;
>
> We could safely forward __proj_val only in the second invocation of __comp,
> after which __proj_val is no longer used, but I'm not sure that's
> worthwhile...
I specifically asked the forum for this, Tim Song replied that both forwards
are safe, you can see more details in
https://stackoverflow.com/a/67348274/11638718.
Sorry to reply so late.
next prev parent reply other threads:[~2021-05-08 2:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-24 18:33 [Bug libstdc++/100249] New: " hewillk at gmail dot com
2021-04-25 5:54 ` [Bug libstdc++/100249] " hewillk at gmail dot com
2021-04-26 12:39 ` ppalka at gcc dot gnu.org
2021-04-27 15:38 ` ppalka at gcc dot gnu.org
2021-04-27 15:43 ` ppalka at gcc dot gnu.org
2021-04-28 1:27 ` hewillk at gmail dot com
2021-04-28 3:15 ` ppalka at gcc dot gnu.org
2021-04-28 3:23 ` cvs-commit at gcc dot gnu.org
2021-05-08 2:24 ` hewillk at gmail dot com [this message]
2021-05-11 16:36 ` ppalka at gcc dot gnu.org
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-11-23 16:52 ` redi at gcc dot gnu.org
2023-08-20 3:24 ` de34 at live dot cn
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-100249-4-X6JJ5SiDvH@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).