public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "xry111 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/88935] std::random_shuffle does not work if the sequence is longer than RAND_MAX elements Date: Tue, 16 Jan 2024 15:59:35 +0000 [thread overview] Message-ID: <bug-88935-4-tKnlYYBARa@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-88935-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935 Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement CC| |xry111 at gcc dot gnu.org --- Comment #7 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- The C++11 standard explicitly allows to use rand() as the random source for random_shuffle, thus this is not a bug but an enhancement. As random_shuffle is deprecated since C++14 and removed in C++17 (the interface is just broken beyond any repair), I think we should just emit a deprecation warning telling to use shuffle (it needs an uniform random bit generator to be passed) instead.
next parent reply other threads:[~2024-01-16 15:59 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-88935-4@http.gcc.gnu.org/bugzilla/> 2024-01-16 15:59 ` xry111 at gcc dot gnu.org [this message] 2024-01-16 16:04 ` xry111 at gcc dot gnu.org 2024-01-16 17:31 ` redi at gcc dot gnu.org 2024-01-16 17:31 ` redi at gcc dot gnu.org 2024-01-16 17:37 ` xry111 at gcc dot gnu.org 2024-01-16 21:25 ` redi at gcc dot gnu.org 2024-06-19 6:38 ` agriff at tin dot it 2024-06-19 8:13 ` redi 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-88935-4-tKnlYYBARa@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).