diff --git a/boost/random/inversive_congruential.hpp b/boost/random/inversive_congruential.hpp
index 93604b3..fe37712 100644
|
a
|
b
|
|
| 21 | 21 | #include <stdexcept> |
| 22 | 22 | #include <boost/config.hpp> |
| 23 | 23 | #include <boost/static_assert.hpp> |
| | 24 | #include <boost/throw_exception.hpp> |
| 24 | 25 | #include <boost/random/detail/config.hpp> |
| 25 | 26 | #include <boost/random/detail/const_mod.hpp> |
| 26 | 27 | |
| … |
… |
public:
|
| 96 | 97 | template<class It> void seed(It& first, It last) |
| 97 | 98 | { |
| 98 | 99 | if(first == last) |
| 99 | | throw std::invalid_argument("inversive_congruential::seed"); |
| | 100 | boost::throw_exception(std::invalid_argument( |
| | 101 | "inversive_congruential::seed")); |
| 100 | 102 | value = *first++; |
| 101 | 103 | } |
| 102 | 104 | IntType operator()() |
diff --git a/boost/random/lagged_fibonacci.hpp b/boost/random/lagged_fibonacci.hpp
index 20860da..21debdb 100644
|
a
|
b
|
|
| 24 | 24 | #include <boost/config.hpp> |
| 25 | 25 | #include <boost/limits.hpp> |
| 26 | 26 | #include <boost/cstdint.hpp> |
| | 27 | #include <boost/throw_exception.hpp> |
| 27 | 28 | #include <boost/detail/workaround.hpp> |
| 28 | 29 | #include <boost/random/linear_congruential.hpp> |
| 29 | 30 | #include <boost/random/uniform_01.hpp> |
| … |
… |
public:
|
| 158 | 159 | x[j] = *first & wordmask; |
| 159 | 160 | i = long_lag; |
| 160 | 161 | if(first == last && j < long_lag) |
| 161 | | throw std::invalid_argument("lagged_fibonacci::seed"); |
| | 162 | boost::throw_exception(std::invalid_argument("lagged_fibonacci::seed")); |
| 162 | 163 | } |
| 163 | 164 | |
| 164 | 165 | /** |
| … |
… |
public:
|
| 411 | 412 | } |
| 412 | 413 | i = long_lag; |
| 413 | 414 | if(first == last && j < long_lag) |
| 414 | | throw std::invalid_argument("lagged_fibonacci_01::seed"); |
| | 415 | boost::throw_exception(std::invalid_argument( |
| | 416 | "lagged_fibonacci_01::seed")); |
| 415 | 417 | } |
| 416 | 418 | |
| 417 | 419 | 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
|
b
|
|
| 22 | 22 | #include <boost/config.hpp> |
| 23 | 23 | #include <boost/limits.hpp> |
| 24 | 24 | #include <boost/static_assert.hpp> |
| | 25 | #include <boost/throw_exception.hpp> |
| 25 | 26 | #include <boost/random/detail/config.hpp> |
| 26 | 27 | #include <boost/random/detail/const_mod.hpp> |
| 27 | 28 | #include <boost/detail/workaround.hpp> |
| … |
… |
public:
|
| 139 | 140 | void seed(It& first, It last) |
| 140 | 141 | { |
| 141 | 142 | if(first == last) |
| 142 | | throw std::invalid_argument("linear_congruential::seed"); |
| | 143 | boost::throw_exception(std::invalid_argument( |
| | 144 | "linear_congruential::seed")); |
| 143 | 145 | seed(*first++); |
| 144 | 146 | } |
| 145 | 147 | |
diff --git a/boost/random/linear_feedback_shift.hpp b/boost/random/linear_feedback_shift.hpp
index 5e9b016..cf94640 100644
|
a
|
b
|
|
| 19 | 19 | #include <stdexcept> |
| 20 | 20 | #include <boost/config.hpp> |
| 21 | 21 | #include <boost/static_assert.hpp> |
| | 22 | #include <boost/throw_exception.hpp> |
| 22 | 23 | #include <boost/limits.hpp> |
| 23 | 24 | #include <boost/random/detail/config.hpp> |
| 24 | 25 | |
| … |
… |
public:
|
| 95 | 96 | template<class It> void seed(It& first, It last) |
| 96 | 97 | { |
| 97 | 98 | if(first == last) |
| 98 | | throw std::invalid_argument("linear_feedback_shift::seed"); |
| | 99 | boost::throw_exception(std::invalid_argument( |
| | 100 | "linear_feedback_shift::seed")); |
| 99 | 101 | value = *first++; |
| 100 | 102 | assert(value >= (1 << (w-k))); |
| 101 | 103 | } |
diff --git a/boost/random/mersenne_twister.hpp b/boost/random/mersenne_twister.hpp
index fa80aa6..8b7f9f5 100644
|
a
|
b
|
|
| 24 | 24 | #include <boost/static_assert.hpp> |
| 25 | 25 | #include <boost/integer_traits.hpp> |
| 26 | 26 | #include <boost/cstdint.hpp> |
| | 27 | #include <boost/throw_exception.hpp> |
| 27 | 28 | #include <boost/random/linear_congruential.hpp> |
| 28 | 29 | #include <boost/detail/workaround.hpp> |
| 29 | 30 | #include <boost/random/detail/config.hpp> |
| … |
… |
public:
|
| 153 | 154 | x[j] = *first; |
| 154 | 155 | i = n; |
| 155 | 156 | if(first == last && j < n) |
| 156 | | throw std::invalid_argument("mersenne_twister::seed"); |
| | 157 | boost::throw_exception(std::invalid_argument("mersenne_twister::seed")); |
| 157 | 158 | } |
| 158 | 159 | |
| 159 | 160 | 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
|
b
|
|
| 25 | 25 | #include <boost/limits.hpp> |
| 26 | 26 | #include <boost/cstdint.hpp> |
| 27 | 27 | #include <boost/static_assert.hpp> |
| | 28 | #include <boost/throw_exception.hpp> |
| 28 | 29 | #include <boost/detail/workaround.hpp> |
| 29 | 30 | #include <boost/random/detail/config.hpp> |
| 30 | 31 | #include <boost/random/detail/seed.hpp> |
| … |
… |
public:
|
| 130 | 131 | for(j = 0; j < long_lag && first != last; ++j, ++first) |
| 131 | 132 | x[j] = *first % modulus; |
| 132 | 133 | if(first == last && j < long_lag) |
| 133 | | throw std::invalid_argument("subtract_with_carry::seed"); |
| | 134 | boost::throw_exception(std::invalid_argument( |
| | 135 | "subtract_with_carry::seed")); |
| 134 | 136 | carry = (x[long_lag-1] == 0); |
| 135 | 137 | k = 0; |
| 136 | 138 | } |
| … |
… |
public:
|
| 330 | 332 | } |
| 331 | 333 | } |
| 332 | 334 | if(first == last && j < long_lag) |
| 333 | | throw std::invalid_argument("subtract_with_carry_01::seed"); |
| | 335 | boost::throw_exception(std::invalid_argument( |
| | 336 | "subtract_with_carry_01::seed")); |
| 334 | 337 | carry = (x[long_lag-1] ? 0 : 1 / _modulus); |
| 335 | 338 | k = 0; |
| 336 | 339 | } |