Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7951: ranlux24_base(0) should be equal to ranlux24_base()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-01-30 04:31:08
#7951: ranlux24_base(0) should be equal to ranlux24_base()
-----------------------------------------------------+----------------------
Reporter: Stephan T. Lavavej <stl@â¦> | Owner: no-maintainer
Type: Bugs | Status: new
Milestone: To Be Determined | Component: random
Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------------------------------+----------------------
Comment (by marshall):
The following change causes your test program to run successfully, and
doesn't break any of the existing Boost.Random tests.
However, someone who understands the random code should probably review
this and make sure it is the correct change.
{{{
Index: boost/random/subtract_with_carry.hpp
===================================================================
--- boost/random/subtract_with_carry.hpp (revision 82663)
+++ boost/random/subtract_with_carry.hpp (working copy)
@@ -161,7 +161,7 @@
IntType, value)
{
typedef linear_congruential_engine<uint32_t,40014,0,2147483563>
gen_t;
- gen_t intgen(static_cast<boost::uint32_t>(value));
+ gen_t intgen(static_cast<boost::uint32_t>(value == 0 ?
default_seed : value));
detail::generator_seed_seq<gen_t> gen(intgen);
seed(gen);
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7951#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC