From b91cb90dcae9a0aa05e3c91fadb9026e5302bece Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 24 Sep 2018 02:26:50 +0300 Subject: [PATCH] Make min/max engine members constexpr in random_shuffle.hpp --- include/boost/range/algorithm/random_shuffle.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/range/algorithm/random_shuffle.hpp b/include/boost/range/algorithm/random_shuffle.hpp index 2475173..33e98e0 100644 --- a/include/boost/range/algorithm/random_shuffle.hpp +++ b/include/boost/range/algorithm/random_shuffle.hpp @@ -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; }