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

Constructors

== Synopses

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

Copy constructor&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:absl/BitGenRef/2constructor-06.adoc[BitGenRef](xref:absl/BitGenRef.adoc[BitGenRef] const& other) = default;
----

[.small]#xref:absl/BitGenRef/2constructor-06.adoc[_» more&period;&period;&period;_]#

Move constructor&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:absl/BitGenRef/2constructor-0b.adoc[BitGenRef](xref:absl/BitGenRef.adoc[BitGenRef]&& other) = default;
----

[.small]#xref:absl/BitGenRef/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Constructs a reference to the given bit generator&period;


[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)
xref:absl/BitGenRef/2constructor-04.adoc[BitGenRef](URBGRef&& gen);
----

[.small]#xref:absl/BitGenRef/2constructor-04.adoc[_» more&period;&period;&period;_]#

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


[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)
xref:absl/BitGenRef/2constructor-08.adoc[BitGenRef](URBGRef&& gen);
----

[.small]#xref:absl/BitGenRef/2constructor-08.adoc[_» more&period;&period;&period;_]#

== Parameters

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


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