Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63284 - trunk/boost/random
From: steven_at_[hidden]
Date: 2010-06-24 10:34:43


Author: steven_watanabe
Date: 2010-06-24 10:34:42 EDT (Thu, 24 Jun 2010)
New Revision: 63284
URL: http://svn.boost.org/trac/boost/changeset/63284

Log:
Fix shadowing of template parameters in linear_congruential_engine. Fixes #4371.
Text files modified:
   trunk/boost/random/linear_congruential.hpp | 6 +++---
   1 files changed, 3 insertions(+), 3 deletions(-)

Modified: trunk/boost/random/linear_congruential.hpp
==============================================================================
--- trunk/boost/random/linear_congruential.hpp (original)
+++ trunk/boost/random/linear_congruential.hpp 2010-06-24 10:34:42 EDT (Thu, 24 Jun 2010)
@@ -148,12 +148,12 @@
         static const int log = ::boost::static_log2<m>::value;
         static const int k =
             (log + ((~(static_cast<IntType>(1) << log) & m)? 32 : 31)) / 32;
- boost::uint32_t a[k + 3];
- seq.generate(&a[0], &a[0] + k + 3);
+ boost::uint32_t array[k + 3];
+ seq.generate(&array[0], &array[0] + k + 3);
         IntType s = 0;
         IntType mul = 1;
         for(int j = 0; j < k; ++j) {
- s = const_mod<IntType, m>::mult_add(a[j + 3], mul, s);
+ s = const_mod<IntType, m>::mult_add(array[j + 3], mul, s);
             mul <<= 32;
         }
         seed(s);


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