Updated bounds on uniform_real and uniform_smallint to allow min == max

[SVN r44897]
This commit is contained in:
Marshall Clow 2008-04-29 20:16:19 +00:00
parent 9b987df0ab
commit 9512b57937
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ public:
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
BOOST_STATIC_ASSERT(!std::numeric_limits<RealType>::is_integer);
#endif
assert(min_arg < max_arg);
assert(min_arg <= max_arg);
}
// compiler-generated copy ctor and assignment operator are fine

View File

@ -81,7 +81,7 @@ set(result_type min_arg, result_type max_arg)
{
_min = min_arg;
_max = max_arg;
assert(min_arg < max_arg);
assert(min_arg <= max_arg);
_range = static_cast<base_result>(_max-_min)+1;
_factor = 1;
@ -122,7 +122,7 @@ public:
BOOST_STATIC_ASSERT(!std::numeric_limits<typename base_type::result_type>::is_integer);
#endif
assert(min_arg < max_arg);
assert(min_arg <= max_arg);
set(min_arg, max_arg);
}