[Bug libstdc++/65631] New: seed_seq should not be copyable
rs2740 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Mar 30 17:33:00 GMT 2015
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++.
More information about the Gcc-bugs
mailing list