public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/100795] ranges::sample should not use std::sample directly Date: Thu, 27 May 2021 10:17:33 +0000 [thread overview] Message-ID: <bug-100795-4-rToK11wA86@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100795-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100795 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-05-27 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- This works though: --- include/bits/ranges_algo.h +++ include/bits/ranges_algo.h @@ -1762,8 +1762,10 @@ // which may take linear time. auto __lasti = ranges::next(__first, __last); return _GLIBCXX_STD_A:: - sample(std::move(__first), std::move(__lasti), std::move(__out), - __n, std::forward<_Gen>(__g)); + __sample(std::move(__first), std::move(__lasti), + forward_iterator_tag{}, + std::move(__out), 0, + __n, std::forward<_Gen>(__g)); } else {
next prev parent reply other threads:[~2021-05-27 10:17 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-27 10:07 [Bug libstdc++/100795] New: " hewillk at gmail dot com 2021-05-27 10:17 ` redi at gcc dot gnu.org [this message] 2021-05-27 11:55 ` [Bug libstdc++/100795] " hewillk at gmail dot com 2021-05-27 12:11 ` hewillk at gmail dot com 2021-05-27 14:53 ` hewillk at gmail dot com 2021-05-27 14:58 ` hewillk at gmail dot com 2021-07-16 16:01 ` ppalka at gcc dot gnu.org 2021-07-16 16:22 ` hewillk at gmail dot com 2021-11-23 16:54 ` barry.revzin at gmail dot com 2022-02-16 0:44 ` pinskia at gcc dot gnu.org 2022-07-20 6:30 ` hewillk at gmail dot com
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-100795-4-rToK11wA86@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).