diff --git a/boost/random/inversive_congruential.hpp b/boost/random/inversive_congruential.hpp index 93604b3..fe37712 100644 --- a/boost/random/inversive_congruential.hpp +++ b/boost/random/inversive_congruential.hpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -96,7 +97,8 @@ public: template void seed(It& first, It last) { if(first == last) - throw std::invalid_argument("inversive_congruential::seed"); + boost::throw_exception(std::invalid_argument( + "inversive_congruential::seed")); value = *first++; } IntType operator()() diff --git a/boost/random/lagged_fibonacci.hpp b/boost/random/lagged_fibonacci.hpp index 20860da..21debdb 100644 --- a/boost/random/lagged_fibonacci.hpp +++ b/boost/random/lagged_fibonacci.hpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -158,7 +159,7 @@ public: x[j] = *first & wordmask; i = long_lag; if(first == last && j < long_lag) - throw std::invalid_argument("lagged_fibonacci::seed"); + boost::throw_exception(std::invalid_argument("lagged_fibonacci::seed")); } /** @@ -411,7 +412,8 @@ public: } i = long_lag; if(first == last && j < long_lag) - throw std::invalid_argument("lagged_fibonacci_01::seed"); + boost::throw_exception(std::invalid_argument( + "lagged_fibonacci_01::seed")); } result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return result_type(0); } diff --git a/boost/random/linear_congruential.hpp b/boost/random/linear_congruential.hpp index 351b9c1..1bd3bd3 100644 --- a/boost/random/linear_congruential.hpp +++ b/boost/random/linear_congruential.hpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -139,7 +140,8 @@ public: void seed(It& first, It last) { if(first == last) - throw std::invalid_argument("linear_congruential::seed"); + boost::throw_exception(std::invalid_argument( + "linear_congruential::seed")); seed(*first++); } diff --git a/boost/random/linear_feedback_shift.hpp b/boost/random/linear_feedback_shift.hpp index 5e9b016..cf94640 100644 --- a/boost/random/linear_feedback_shift.hpp +++ b/boost/random/linear_feedback_shift.hpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -95,7 +96,8 @@ public: template void seed(It& first, It last) { if(first == last) - throw std::invalid_argument("linear_feedback_shift::seed"); + boost::throw_exception(std::invalid_argument( + "linear_feedback_shift::seed")); value = *first++; assert(value >= (1 << (w-k))); } diff --git a/boost/random/mersenne_twister.hpp b/boost/random/mersenne_twister.hpp index fa80aa6..8b7f9f5 100644 --- a/boost/random/mersenne_twister.hpp +++ b/boost/random/mersenne_twister.hpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -153,7 +154,7 @@ public: x[j] = *first; i = n; if(first == last && j < n) - throw std::invalid_argument("mersenne_twister::seed"); + boost::throw_exception(std::invalid_argument("mersenne_twister::seed")); } result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return 0; } diff --git a/boost/random/subtract_with_carry.hpp b/boost/random/subtract_with_carry.hpp index ca5c78b..e8820ed 100644 --- a/boost/random/subtract_with_carry.hpp +++ b/boost/random/subtract_with_carry.hpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -130,7 +131,8 @@ public: for(j = 0; j < long_lag && first != last; ++j, ++first) x[j] = *first % modulus; if(first == last && j < long_lag) - throw std::invalid_argument("subtract_with_carry::seed"); + boost::throw_exception(std::invalid_argument( + "subtract_with_carry::seed")); carry = (x[long_lag-1] == 0); k = 0; } @@ -330,7 +332,8 @@ public: } } if(first == last && j < long_lag) - throw std::invalid_argument("subtract_with_carry_01::seed"); + boost::throw_exception(std::invalid_argument( + "subtract_with_carry_01::seed")); carry = (x[long_lag-1] ? 0 : 1 / _modulus); k = 0; }