1#ifndef HALCHECK_GEN_SIZE_HPP
2#define HALCHECK_GEN_SIZE_HPP
10#include <halcheck/lib/effect.hpp>
11#include <halcheck/lib/functional.hpp>
12#include <halcheck/lib/pp.hpp>
16namespace halcheck {
namespace gen {
60 explicit handler(
double amount) : amount(amount) {}
66 handler::owning_scope operator()(
double amount)
const {
return handler(amount).handle(); }
68 template<
typename F,
typename... Args>
An effect handler defines the behaviour of a set of effects.
Definition effect.hpp:158
static lib::effect_result_t< T > invoke(T args)
Invokes an effect.
Definition effect.hpp:118
HALCHECK_INLINE_CONSTEXPR struct halcheck::gen::@17 scale
Applies a multiplier to the result of gen::size.
std::uintmax_t size()
Gets the maximum size of value that should be generated.
Definition size.hpp:35
decltype(lib::invoke(std::declval< F >(), std::declval< Args >()...)) invoke_result_t
An implementation of std::invoke_result_t.
Definition invoke.hpp:42
#define HALCHECK_INLINE_CONSTEXPR
A backwards-compatible substitute for inline constexpr.
Definition pp.hpp:70
std::uintmax_t fallback() const
The default size is zero.
Definition size.hpp:27
An effect for obtaining a size parameter.
Definition size.hpp:22