mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
エラー通知を標準例外に変更
This commit is contained in:
parent
9823888049
commit
4729d31bf2
22 changed files with 76 additions and 57 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue