41template <
typename T,
unsigned N = 2,
typename =
void>
63 typename std::enable_if<std::is_integral<T>::value && !std::numeric_limits<T>::is_signed,
74 v =
static_cast<T
>(rng.
bounded(100));
80 typename std::enable_if<std::is_integral<T>::value && std::numeric_limits<T>::is_signed,
92 v =
static_cast<T
>(rng.
bounded(100));
98using is_float_point =
typename std::enable_if<std::is_floating_point<T>::value,
void>::type;
106 return static_cast<T
>(rng.
bounded(1000));
110 v =
static_cast<T
>(rng.
bounded(1000));
117 typename std::enable_if<detail::is_specialization<T, std::basic_string>::value>::type;
135 impl.Mutate(rng, v, only_shrink);
140using is_modifiable =
typename std::enable_if<detail::is_modifiable<T>::value>::type;
151template <
typename T,
typename U>
154 std::pair<typename std::remove_const<T>::type, typename std::remove_const<U>::type>> {};
157template <
typename... T>
159 :
public AggregateOf<std::tuple<typename std::remove_const<T>::type...>> {};
AggregateOf is a domain that combines multiple inner domains into a tuple or aggregate type.
Definition aggregate_of.h:41
Arbitrary()
Definition arbitrary.h:146
CorpusType GetRandomCorpus(Rng &rng) const override
Definition arbitrary.h:105
T CorpusType
Definition arbitrary.h:103
void Mutate(Rng &rng, CorpusType &v, bool only_shrink) const override
Definition arbitrary.h:109
T ValueType
Definition arbitrary.h:102
void Mutate(Rng &rng, CorpusType &v, bool only_shrink) const override
Definition arbitrary.h:91
T ValueType
Definition arbitrary.h:86
CorpusType GetRandomCorpus(Rng &rng) const override
Definition arbitrary.h:89
T CorpusType
Definition arbitrary.h:87
CorpusType GetRandomCorpus(Rng &rng) const override
Definition arbitrary.h:132
T ValueType
Definition arbitrary.h:124
std::vector< typename T::value_type > CorpusType
Definition arbitrary.h:125
CorpusType FromValue(const ValueType &v) const override
Definition arbitrary.h:128
ValueType GetValue(const CorpusType &v) const override
Definition arbitrary.h:127
void Mutate(Rng &rng, CorpusType &v, bool only_shrink) const override
Definition arbitrary.h:134
void Mutate(Rng &rng, CorpusType &v, bool only_shrink) const override
Definition arbitrary.h:73
CorpusType GetRandomCorpus(Rng &rng) const override
Definition arbitrary.h:71
T ValueType
Definition arbitrary.h:68
T CorpusType
Definition arbitrary.h:69
bool ValueType
Definition arbitrary.h:52
void Mutate(Rng &, CorpusType &v, bool) const override
Definition arbitrary.h:57
CorpusType GetRandomCorpus(Rng &rng) const override
Definition arbitrary.h:55
bool CorpusType
Definition arbitrary.h:53
Arbitrary is a domain that generates random values of a given type.
Definition arbitrary.h:42
DomainConvertable is a base class for domains that can be converted to and from a ValueType.
Definition domain.h:48
Domain class for generating random values of a specific type.
Definition domain.h:21
uint32_t bounded(uint32_t range) noexcept
Definition rng.h:126
Definition container_of.h:97
#define ZEROERR_SUPPRESS_COMMON_WARNINGS_POP
Definition config.h:265
#define ZEROERR_SUPPRESS_COMMON_WARNINGS_PUSH
Definition config.h:218
Definition benchmark.cpp:17
typename std::enable_if< std::is_integral< T >::value &&!std::numeric_limits< T >::is_signed, void >::type is_unsigned_int
Definition arbitrary.h:64
typename std::enable_if< std::is_integral< T >::value &&std::numeric_limits< T >::is_signed, void >::type is_signed_int
Definition arbitrary.h:81
typename std::enable_if< detail::is_specialization< T, std::basic_string >::value >::type is_string
Definition arbitrary.h:117
typename std::enable_if< std::is_floating_point< T >::value, void >::type is_float_point
Definition arbitrary.h:98
typename std::enable_if< detail::is_modifiable< T >::value >::type is_modifiable
Definition arbitrary.h:140
Definition typetraits.h:61