[#absl-BitGenRef-2constructor-08]
= xref:absl.adoc[absl]::xref:absl/BitGenRef.adoc[BitGenRef]::BitGenRef
:relfileprefix: ../../
:mrdocs:

Constructs a reference to the given mockable bit generator&period;

== Synopsis

Declared in `&lt;absl&sol;random&sol;bit&lowbar;gen&lowbar;ref&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename URBGRef,
    typename URBG = xref:absl/remove_cvref_t.adoc[absl::remove&lowbar;cvref&lowbar;t&lt;URBGRef&gt;]&gt;
requires (!std&colon;&colon;is&lowbar;same&lowbar;v&lt;URBG, BitGenRef&gt; &amp;&amp;
                 !std&colon;&colon;is&lowbar;base&lowbar;of&lowbar;v&lt;BitGenRef, URBG&gt; &amp;&amp;
                 !HasConversionOperator&lt;URBG&gt;&colon;&colon;value &amp;&amp;
                 random&lowbar;internal&colon;&colon;is&lowbar;urbg&lt;URBG&gt;&colon;&colon;value &amp;&amp;
                 RandomMockingAccess&colon;&colon;HasInvokeMock&lt;URBG&gt;&colon;&colon;value)
BitGenRef(URBGRef&& gen);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *gen*
| The underlying bit generator to reference&period; It must outlive this reference&period;
|===


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