This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/65631] New: seed_seq should not be copyable
- From: "rs2740 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 Mar 2015 16:18:15 +0000
- Subject: [Bug libstdc++/65631] New: seed_seq should not be copyable
- Auto-submitted: auto-generated
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++.