1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

エラー通知を標準例外に変更

This commit is contained in:
bolero-MURAKAMI 2011-10-26 15:57:31 +09:00
parent 9823888049
commit 4729d31bf2
22 changed files with 76 additions and 57 deletions

View file

@ -3,6 +3,7 @@
#include <cstddef>
#include <cstdint>
#include <stdexcept>
#include <sprout/config.hpp>
#include <sprout/array.hpp>
@ -634,7 +635,7 @@ namespace sprout {
SPROUT_CONSTEXPR T factorial(std::size_t x) {
return x <= sprout::math::detail::factorials<T>::limit
? sprout::math::detail::factorials<T>::table[x]
: throw "assert(x <= sprout::math::detail::factorials<T>::limit)"
: throw std::invalid_argument("factorial(): argument limit exceeded")
;
}
} // namespace math