Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70784 - trunk/boost/random/detail
From: steven_at_[hidden]
Date: 2011-03-31 10:50:26


Author: steven_watanabe
Date: 2011-03-31 10:50:26 EDT (Thu, 31 Mar 2011)
New Revision: 70784
URL: http://svn.boost.org/trac/boost/changeset/70784

Log:
Attempt to fix sun 5.10 overload resolution problem.
Text files modified:
   trunk/boost/random/detail/seed_impl.hpp | 6 ++----
   1 files changed, 2 insertions(+), 4 deletions(-)

Modified: trunk/boost/random/detail/seed_impl.hpp
==============================================================================
--- trunk/boost/random/detail/seed_impl.hpp (original)
+++ trunk/boost/random/detail/seed_impl.hpp 2011-03-31 10:50:26 EDT (Thu, 31 Mar 2011)
@@ -332,10 +332,9 @@
 template<int w, std::size_t n, class RealType>
 void seed_array_real_impl(const boost::uint_least32_t* storage, RealType (&x)[n])
 {
- using std::pow;
     boost::uint_least32_t mask = ~((~boost::uint_least32_t(0)) << (w%32));
     RealType two32 = 4294967296.0;
- const RealType divisor = pow(RealType(2), -w);
+ const RealType divisor = RealType(1)/detail::pow2<RealType>(w);
     unsigned int j;
     for(j = 0; j < n; ++j) {
         RealType val = RealType(0);
@@ -365,10 +364,9 @@
 template<int w, std::size_t n, class Iter, class RealType>
 void fill_array_real(Iter& first, Iter last, RealType (&x)[n])
 {
- using std::pow;
     boost::uint_least32_t mask = ~((~boost::uint_least32_t(0)) << (w%32));
     RealType two32 = 4294967296.0;
- const RealType divisor = pow(RealType(2), -w);
+ const RealType divisor = RealType(1)/detail::pow2<RealType>(w);
     unsigned int j;
     for(j = 0; j < n; ++j) {
         RealType val = RealType(0);


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