[破壊的変更] uniform_int_distribution::max() 9 -> numeric_limits::max()

add reset function
This commit is contained in:
bolero-MURAKAMI 2013-11-09 18:13:26 +09:00
parent b60a7aca9c
commit 81603007f6
8 changed files with 19 additions and 8 deletions

View file

@ -801,9 +801,9 @@ namespace sprout {
public:
SPROUT_CONSTEXPR param_type()
: min_(0)
, max_(9)
, max_(sprout::numeric_limits<IntType>::max())
{}
explicit SPROUT_CONSTEXPR param_type(IntType min_arg, IntType max_arg = 9)
explicit SPROUT_CONSTEXPR param_type(IntType min_arg, IntType max_arg = sprout::numeric_limits<IntType>::max())
: min_((SPROUT_ASSERT(min_arg <= max_arg), min_arg))
, max_(max_arg)
{}
@ -861,9 +861,9 @@ namespace sprout {
public:
SPROUT_CONSTEXPR uniform_int_distribution() SPROUT_NOEXCEPT
: min_(0)
, max_(9)
, max_(sprout::numeric_limits<IntType>::max())
{}
explicit SPROUT_CONSTEXPR uniform_int_distribution(IntType min_arg, IntType max_arg = 9)
explicit SPROUT_CONSTEXPR uniform_int_distribution(IntType min_arg, IntType max_arg = sprout::numeric_limits<IntType>::max())
: min_((SPROUT_ASSERT(min_arg <= max_arg), min_arg))
, max_(max_arg)
{}
@ -883,6 +883,7 @@ namespace sprout {
SPROUT_CONSTEXPR result_type max() const SPROUT_NOEXCEPT {
return max_;
}
SPROUT_CXX14_CONSTEXPR void reset() SPROUT_NOEXCEPT {}
SPROUT_CONSTEXPR param_type param() const SPROUT_NOEXCEPT {
return param_type(min_, max_);
}