diff --git a/sprout/random/uniform_01.hpp b/sprout/random/uniform_01.hpp index b7ae733d..7b934a95 100644 --- a/sprout/random/uniform_01.hpp +++ b/sprout/random/uniform_01.hpp @@ -140,7 +140,7 @@ namespace sprout { result_type result = result_type(static_cast(eng()) - eng.min()) * ( result_type(1) / ( result_type(eng.max() - eng.min()) + result_type( - std::numeric_limits::is_integer ? 1 : 0 + sprout::numeric_limits::is_integer ? 1 : 0 ) ) ); diff --git a/sprout/random/uniform_int_distribution.hpp b/sprout/random/uniform_int_distribution.hpp index e1ef79cd..5bfd863b 100644 --- a/sprout/random/uniform_int_distribution.hpp +++ b/sprout/random/uniform_int_distribution.hpp @@ -52,7 +52,7 @@ namespace sprout { } else if (brange < range) { for(; ; ) { range_type limit = range_type(); - if (range == std::numeric_limits::max()) { + if (range == sprout::numeric_limits::max()) { limit = range / (range_type(brange) + 1); if (range % (range_type(brange) + 1) == range_type(brange)) { ++limit; @@ -75,7 +75,7 @@ namespace sprout { static_cast(range / mult), std::true_type() ); - if (std::numeric_limits::max() / mult < result_increment) { + if (sprout::numeric_limits::max() / mult < result_increment) { continue; } result_increment *= mult; @@ -90,7 +90,7 @@ namespace sprout { } } else { base_unsigned bucket_size = base_unsigned(); - if (brange == std::numeric_limits::max()) { + if (brange == sprout::numeric_limits::max()) { bucket_size = brange / (static_cast(range) + 1); if (brange % (static_cast(range) + 1) == static_cast(range)) { ++bucket_size;