[#absl-Uniform-08]
= xref:absl.adoc[absl]::Uniform
:relfileprefix: ../
:mrdocs:

`Uniform` overloads

== Synopses

Declared in `&lt;absl&sol;random&sol;distributions&period;h&gt;`

Produces random values across the full range of an unsigned type&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename R,
    typename URBG&gt;
R
xref:absl/Uniform-02.adoc[Uniform](URBG&& urbg)
requires !std&colon;&colon;numeric&lowbar;limits&lt;R&gt;&colon;&colon;is&lowbar;signed;
----

[.small]#xref:absl/Uniform-02.adoc[_» more&period;&period;&period;_]#

Produces random values of type `T` uniformly distributed in &lsqb;lo, hi)&period;&rsqb;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename R = void,
    typename URBG&gt;
R
xref:absl/Uniform-0e9.adoc[Uniform](
    URBG&& urbg,
    R lo,
    R hi)
requires !std&colon;&colon;is&lowbar;same&lowbar;v&lt;R, void&gt;;
----

[.small]#xref:absl/Uniform-0e9.adoc[_» more&period;&period;&period;_]#

Produces random values in &lsqb;lo, hi) with an inferred return type&period;&rsqb;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename R = void,
    typename URBG,
    typename A,
    typename B&gt;
&sol;&ast; implementation-defined &ast;&sol;::uniform&lowbar;inferred&lowbar;return&lowbar;t&lt;A, B&gt;
xref:absl/Uniform-00.adoc[Uniform](
    URBG&& urbg,
    A lo,
    B hi)
requires std&colon;&colon;is&lowbar;same&lowbar;v&lt;R, void&gt;;
----

[.small]#xref:absl/Uniform-00.adoc[_» more&period;&period;&period;_]#

Produces random values of type `T` uniformly distributed in an interval&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename R = void,
    typename TagType,
    typename URBG&gt;
R
xref:absl/Uniform-0e2.adoc[Uniform](
    TagType tag,
    URBG&& urbg,
    R lo,
    R hi)
requires !std&colon;&colon;is&lowbar;same&lowbar;v&lt;R, void&gt;;
----

[.small]#xref:absl/Uniform-0e2.adoc[_» more&period;&period;&period;_]#

Produces random values with an interval tag and inferred return type&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename R = void,
    typename TagType,
    typename URBG,
    typename A,
    typename B&gt;
&sol;&ast; implementation-defined &ast;&sol;::uniform&lowbar;inferred&lowbar;return&lowbar;t&lt;A, B&gt;
xref:absl/Uniform-0c.adoc[Uniform](
    TagType tag,
    URBG&& urbg,
    A lo,
    B hi)
requires std&colon;&colon;is&lowbar;same&lowbar;v&lt;R, void&gt;;
----

[.small]#xref:absl/Uniform-0c.adoc[_» more&period;&period;&period;_]#

== Return Value

* A random value uniformly distributed across the range of `R`&period;
* A random value uniformly distributed in &lsqb;lo, hi)&period;&rsqb;
* A random value uniformly distributed in the interval&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *urbg*
| The uniform random bit generator&period;
| *lo*
| The inclusive lower bound of the interval&period;
| *hi*
| The exclusive upper bound of the interval&period;
| *tag*
| The interval tag selecting which endpoints are included&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
