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
|
@ -4,6 +4,7 @@
|
|||
#include <cmath>
|
||||
#include <ios>
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/random/random_result.hpp>
|
||||
#include <sprout/random/uniform_01.hpp>
|
||||
|
@ -35,7 +36,7 @@ namespace sprout {
|
|||
static SPROUT_CONSTEXPR RealType arg_check(RealType p_arg) {
|
||||
return arg_check_nothrow(p_arg)
|
||||
? p_arg
|
||||
: throw "assert(RealType(0) < p_arg && p_arg < RealType(1))"
|
||||
: throw std::invalid_argument("geometric_distribution<>: invalid argument (0 < p_arg && p_arg < 1)")
|
||||
;
|
||||
}
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue