|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72825 - trunk/boost/random
From: steven_at_[hidden]
Date: 2011-06-30 17:52:52
Author: steven_watanabe
Date: 2011-06-30 17:52:51 EDT (Thu, 30 Jun 2011)
New Revision: 72825
URL: http://svn.boost.org/trac/boost/changeset/72825
Log:
Remove use of discard to avoid breaking Boost.TR1.
Text files modified:
trunk/boost/random/discard_block.hpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
Modified: trunk/boost/random/discard_block.hpp
==============================================================================
--- trunk/boost/random/discard_block.hpp (original)
+++ trunk/boost/random/discard_block.hpp 2011-06-30 17:52:51 EDT (Thu, 30 Jun 2011)
@@ -108,7 +108,12 @@
{
if(_n >= returned_block) {
// discard values of random number generator
- _rng.discard(total_block - _n);
+ // Don't use discard, since we still need to
+ // be somewhat compatible with TR1.
+ // _rng.discard(total_block - _n);
+ for(std::size_t i = 0; i < total_block - _n; ++i) {
+ _rng();
+ }
_n = 0;
}
++_n;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk