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

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).