Make min/max engine members constexpr in random_shuffle.hpp

This commit is contained in:
Peter Dimov
2018-09-24 02:26:50 +03:00
parent 7efe3c68f6
commit b91cb90dca

View File

@ -32,12 +32,12 @@ struct wrap_rand
{
typedef unsigned int result_type;
static result_type (min)()
static BOOST_CONSTEXPR result_type (min)()
{
return 0;
}
static result_type (max)()
static BOOST_CONSTEXPR result_type (max)()
{
return RAND_MAX;
}
@ -64,12 +64,12 @@ struct wrap_generator
wrap_generator(Generator& gen) : g(gen) {}
static result_type (min)()
static BOOST_CONSTEXPR result_type (min)()
{
return 0;
}
static result_type (max)()
static BOOST_CONSTEXPR result_type (max)()
{
return max_arg - 1;
}