5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TESTING_NAN_REJECTING_DISTRIBUTION_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_TESTING_NAN_REJECTING_DISTRIBUTION_HPP_
10#include "arene/base/stdlib_choice/declval.hpp"
11#include "arene/base/stdlib_choice/enable_if.hpp"
12#include "arene/base/stdlib_choice/is_arithmetic.hpp"
13#include "arene/base/stdlib_choice/is_default_constructible.hpp"
14#include "arene/base/stdlib_choice/is_floating_point.hpp"
22template <
class Distribution>
30 "nan_rejecting_distribution only makes sense for arithmetic distributions"
35 class T = Distribution,
55 auto value = dist_(prng);
56 while (isnan(value)) {
typename Distribution::result_type result_type
The value type produced by this adaptor.
Definition nan_rejecting_distribution.hpp:26
constexpr nan_rejecting_distribution() noexcept
Default construct adapted distribution.
Definition nan_rejecting_distribution.hpp:37
constexpr auto operator()(PRNG &prng) const noexcept(noexcept(std::declval< Distribution const & >()(prng))) -> result_type
Draw a non-NaN value from the wrapped distribution; SFINAE overload for floating-point types.
Definition nan_rejecting_distribution.hpp:53
constexpr nan_rejecting_distribution(Distribution dist) noexcept
Construct the adaptor wrapping the given distribution.
Definition nan_rejecting_distribution.hpp:42
static constexpr value_type value
Definition integral_constant.hpp:34
Definition customization.hpp:31
Definition accumulate.hpp:37
typename constraints_impl::constraints< EnableIfs... >::type constraints
Helper used to express template constraints in a consistent way using std::enable_if_t.
Definition constraints.hpp:51
Definition accumulate.hpp:36
auto declval() noexcept -> T &&
A dummy function that is declared but not defined, with a user-specified return type,...