diff options
Diffstat (limited to 'absl/random/distributions.h')
-rw-r--r-- | absl/random/distributions.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/absl/random/distributions.h b/absl/random/distributions.h index d62f7f3b..b6ade685 100644 --- a/absl/random/distributions.h +++ b/absl/random/distributions.h @@ -46,23 +46,23 @@ #ifndef ABSL_RANDOM_DISTRIBUTIONS_H_ #define ABSL_RANDOM_DISTRIBUTIONS_H_ -#include <algorithm> -#include <cmath> #include <limits> -#include <random> #include <type_traits> +#include "absl/base/config.h" #include "absl/base/internal/inline_variable.h" +#include "absl/meta/type_traits.h" #include "absl/random/bernoulli_distribution.h" #include "absl/random/beta_distribution.h" #include "absl/random/exponential_distribution.h" #include "absl/random/gaussian_distribution.h" #include "absl/random/internal/distribution_caller.h" // IWYU pragma: export +#include "absl/random/internal/traits.h" #include "absl/random/internal/uniform_helper.h" // IWYU pragma: export #include "absl/random/log_uniform_int_distribution.h" #include "absl/random/poisson_distribution.h" -#include "absl/random/uniform_int_distribution.h" -#include "absl/random/uniform_real_distribution.h" +#include "absl/random/uniform_int_distribution.h" // IWYU pragma: export +#include "absl/random/uniform_real_distribution.h" // IWYU pragma: export #include "absl/random/zipf_distribution.h" namespace absl { @@ -176,7 +176,7 @@ Uniform(TagType tag, return random_internal::DistributionCaller<gen_t>::template Call< distribution_t>(&urbg, tag, static_cast<return_t>(lo), - static_cast<return_t>(hi)); + static_cast<return_t>(hi)); } // absl::Uniform(bitgen, lo, hi) @@ -200,7 +200,7 @@ Uniform(URBG&& urbg, // NOLINT(runtime/references) return random_internal::DistributionCaller<gen_t>::template Call< distribution_t>(&urbg, static_cast<return_t>(lo), - static_cast<return_t>(hi)); + static_cast<return_t>(hi)); } // absl::Uniform<unsigned T>(bitgen) @@ -208,7 +208,7 @@ Uniform(URBG&& urbg, // NOLINT(runtime/references) // Overload of Uniform() using the minimum and maximum values of a given type // `T` (which must be unsigned), returning a value of type `unsigned T` template <typename R, typename URBG> -typename absl::enable_if_t<!std::is_signed<R>::value, R> // +typename absl::enable_if_t<!std::numeric_limits<R>::is_signed, R> // Uniform(URBG&& urbg) { // NOLINT(runtime/references) using gen_t = absl::decay_t<URBG>; using distribution_t = random_internal::UniformDistributionWrapper<R>; |