Index: boost/random/detail/seed_impl.hpp =================================================================== --- boost/random/detail/seed_impl.hpp (revision 81068) +++ boost/random/detail/seed_impl.hpp (working copy) @@ -14,6 +14,7 @@ #define BOOST_RANDOM_DETAIL_SEED_IMPL_HPP #include +#include #include #include #include @@ -253,7 +254,7 @@ IntType s = 0; for(int j = 0; j < k; ++j) { if(first == last) { - throw ::std::invalid_argument("Not enough elements in call to seed."); + boost::throw_exception(::std::invalid_argument("Not enough elements in call to seed.")); } IntType digit = const_mod::apply(IntType(*first++)); IntType mult = IntType(1) << 32*j; @@ -303,7 +304,7 @@ UIntType val = 0; for(std::size_t k = 0; k < (w+31)/32; ++k) { if(first == last) { - throw std::invalid_argument("Not enough elements in call to seed."); + boost::throw_exception(std::invalid_argument("Not enough elements in call to seed.")); } val += static_cast(*first++) << 32*k; } @@ -373,12 +374,12 @@ RealType val = RealType(0); RealType mult = divisor; for(int k = 0; k < w/32; ++k, ++first) { - if(first == last) throw std::invalid_argument("Not enough elements in call to seed."); + if(first == last) boost::throw_exception(std::invalid_argument("Not enough elements in call to seed.")); val += *first * mult; mult *= two32; } if(mask != 0) { - if(first == last) throw std::invalid_argument("Not enough elements in call to seed."); + if(first == last) boost::throw_exception(std::invalid_argument("Not enough elements in call to seed.")); val += (*first & mask) * mult; ++first; }