|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70782 - trunk/boost/random
From: steven_at_[hidden]
Date: 2011-03-31 10:41:38
Author: steven_watanabe
Date: 2011-03-31 10:41:36 EDT (Thu, 31 Mar 2011)
New Revision: 70782
URL: http://svn.boost.org/trac/boost/changeset/70782
Log:
Somehow sun-5.10 gets the type of bits wrong.
Text files modified:
trunk/boost/random/generate_canonical.hpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
Modified: trunk/boost/random/generate_canonical.hpp
==============================================================================
--- trunk/boost/random/generate_canonical.hpp (original)
+++ trunk/boost/random/generate_canonical.hpp 2011-03-31 10:41:36 EDT (Thu, 31 Mar 2011)
@@ -35,7 +35,9 @@
std::size_t digits = std::numeric_limits<RealType>::digits;
RealType R = RealType((g.max)()) - RealType((g.min)()) + 1;
RealType mult = R;
- RealType limit = pow(RealType(2), RealType((std::min)(bits, digits)));
+ RealType limit =
+ pow(RealType(2),
+ RealType((std::min)(static_cast<std::size_t>(bits), digits)));
RealType S = RealType(detail::subtract<base_result>()(g(), (g.min)()));
while(mult < limit) {
RealType inc = RealType(detail::subtract<base_result>()(g(), (g.min)()));
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