This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51795] linear_congruential_engine doesn't work correctly
- From: "paolo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 01 Feb 2012 11:10:35 +0000
- Subject: [Bug libstdc++/51795] linear_congruential_engine doesn't work correctly
- Auto-submitted: auto-generated
- References: <bug-51795-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51795
--- Comment #29 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-02-01 11:10:35 UTC ---
Author: paolo
Date: Wed Feb 1 11:10:30 2012
New Revision: 183795
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183795
Log:
2012-02-01 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/51795
* include/bits/random.h (linear_congruential_generator): Add
static_assert preventing instantiation for values of 'a' and 'm'
currently handled incorrectly but _Mod::__calc.
* include/bits/random.tcc (seed_seq::generate): Avoid unsafe
uses of _Mod::__calc.
Modified:
branches/gcc-4_6-branch/libstdc++-v3/ChangeLog
branches/gcc-4_6-branch/libstdc++-v3/include/bits/random.h
branches/gcc-4_6-branch/libstdc++-v3/include/bits/random.tcc