Produces random values with an interval tag and inferred return type.
Synopsis
Declared in <absl/random/distributions.h>
template<
typename R = void,
typename TagType,
typename URBG,
typename A,
typename B>
/* implementation-defined */::uniform_inferred_return_t<A, B>
Uniform(
TagType tag,
URBG&& urbg,
A lo,
B hi)
requires std::is_same_v<R, void>;
Description
Overload of Uniform() using different (but compatible) lo, hi types. Note that a compile‐error will result if the return type cannot be deduced correctly from the passed types.
Return Value
A random value uniformly distributed in the interval.
Parameters
Name |
Description |
tag |
The interval tag selecting which endpoints are included. |
urbg |
The uniform random bit generator. |
lo |
The lower bound of the interval. |
hi |
The upper bound of the interval. |
Created with MrDocs