public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/65631] New: seed_seq should not be copyable
@ 2015-03-30 17:33 rs2740 at gmail dot com
2015-03-30 18:40 ` [Bug libstdc++/65631] " redi at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: rs2740 at gmail dot com @ 2015-03-30 17:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65631
Bug ID: 65631
Summary: seed_seq should not be copyable
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: rs2740 at gmail dot com
>From http://stackoverflow.com/q/29350040/2756719, repro:
#include <random>
int main(int, char **)
{
std::seed_seq seed1{1337, 42};
std::seed_seq seed2(seed1);
std::seed_seq seed3 = seed2;
return 0;
}
Per the class synopsis in [rand.util.seedseq], the copy constructor and
assignment operator of seed_seq are deleted:
// no copy functions
seed_seq(const seed_seq& ) = delete;
void operator=(const seed_seq& ) = delete;
But the above code, incorrectly, compiles using libstdc++.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/65631] seed_seq should not be copyable
2015-03-30 17:33 [Bug libstdc++/65631] New: seed_seq should not be copyable rs2740 at gmail dot com
@ 2015-03-30 18:40 ` redi at gcc dot gnu.org
2015-04-28 12:35 ` redi at gcc dot gnu.org
2015-04-28 12:36 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2015-03-30 18:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65631
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-03-30
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Confirmed, but we don't need to fix it for 5.1, it can wait.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/65631] seed_seq should not be copyable
2015-03-30 17:33 [Bug libstdc++/65631] New: seed_seq should not be copyable rs2740 at gmail dot com
2015-03-30 18:40 ` [Bug libstdc++/65631] " redi at gcc dot gnu.org
@ 2015-04-28 12:35 ` redi at gcc dot gnu.org
2015-04-28 12:36 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-28 12:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65631
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |6.0
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
done
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/65631] seed_seq should not be copyable
2015-03-30 17:33 [Bug libstdc++/65631] New: seed_seq should not be copyable rs2740 at gmail dot com
2015-03-30 18:40 ` [Bug libstdc++/65631] " redi at gcc dot gnu.org
2015-04-28 12:35 ` redi at gcc dot gnu.org
@ 2015-04-28 12:36 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-28 12:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65631
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Apr 28 12:35:30 2015
New Revision: 222524
URL: https://gcc.gnu.org/viewcvs?rev=222524&root=gcc&view=rev
Log:
PR libstdc++/65631
* include/bits/random.h (seed_seq) Define copy constructor and copy
assignment as deleted.
* testsuite/26_numerics/random/seed_seq/cons/65631.cc: New.
Added:
trunk/libstdc++-v3/testsuite/26_numerics/random/seed_seq/cons/65631.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/random.h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-28 12:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 17:33 [Bug libstdc++/65631] New: seed_seq should not be copyable rs2740 at gmail dot com
2015-03-30 18:40 ` [Bug libstdc++/65631] " redi at gcc dot gnu.org
2015-04-28 12:35 ` redi at gcc dot gnu.org
2015-04-28 12:36 ` redi at gcc dot gnu.org
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).