BloombergLP::bslim::FuzzUtil::consumeNumberInRange

consumeNumberInRange overloads

Synopses

Declared in <bslim_fuzzutil.h>

Return a value of (template parameter) TYPE in [min .. max].

template<class TYPE>
static
TYPE
consumeNumberInRange(
    FuzzDataView* fuzzDataView,
    TYPE min,
    TYPE max)
requires bsl::is_integral<TYPE>::value;
» more...

Same as the preceding overload for floating-point TYPE.

template<class TYPE>
static
TYPE
consumeNumberInRange(
    FuzzDataView* fuzzDataView,
    TYPE min,
    TYPE max)
requires bsl::is_floating_point<TYPE>::value;
» more...

Return Value

a value of TYPE in the inclusive range [min .. max]

Parameters

NameDescription
fuzzDataViewview providing fuzz input bytes
mininclusive lower bound of the result
maxinclusive upper bound of the result