Boost logo

Boost-Commit :

From: joel_at_[hidden]
Date: 2008-04-30 22:10:56


Author: djowel
Date: 2008-04-30 22:10:56 EDT (Wed, 30 Apr 2008)
New Revision: 44962
URL: http://svn.boost.org/trac/boost/changeset/44962

Log:
integer overflow fix
Text files modified:
   trunk/libs/spirit/test/qi/range_run.cpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/libs/spirit/test/qi/range_run.cpp
==============================================================================
--- trunk/libs/spirit/test/qi/range_run.cpp (original)
+++ trunk/libs/spirit/test/qi/range_run.cpp 2008-04-30 22:10:56 EDT (Wed, 30 Apr 2008)
@@ -28,7 +28,7 @@
     int const test_size = 1000;
 
     boost::mt19937 rng;
- boost::uniform_int<> char_(const_min, const_max);
+ boost::uniform_int<> char_(int(const_min), int(const_max));
     boost::variate_generator<boost::mt19937&, boost::uniform_int<> >
        gen(rng, char_);
     boost::uniform_int<> _1of10(1, 10);
@@ -36,7 +36,7 @@
        on_or_off(rng, _1of10);
 
     range_run<Char> rr;
- boost::dynamic_bitset<> bset(const_max-const_min+1);
+ boost::dynamic_bitset<> bset(int(const_max)-int(const_min)+1);
 
     for (int i = 0; i < test_size; ++i)
     {


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