Share via


uniform_int_distribution::uniform_int_distribution

Constructs the distribution.

explicit uniform_int_distribution(result_type min0 = 0,
    result_type max0 = std::numeric_limits<IntType>::max());
explicit uniform_int_distribution(const param_type& par0);

Parameters

  • min0
    The lower bound for random values.

  • max0
    The upper bound for random values.

  • par0
    The parameter package used to construct the distribution.

Remarks

Precondition: min0 < max0

The first constructor constructs an object whose stored value stored_min holds the value min0 and whose stored value stored_max holds the value max0.

The second constructor constructs an object whose stored parameters are initialized from par0.

Requirements

Header: <random>

Namespace: std

See Also

Reference

<random>

uniform_int_distribution Class

Other Resources

<random> Members