[#BloombergLP-bdlar-ChoiceRef-2constructor-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlar.adoc[bdlar]::xref:BloombergLP/bdlar/ChoiceRef.adoc[ChoiceRef]::ChoiceRef
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bdlar&lowbar;choiceref&period;h&gt;`

Create `ChoiceRef` object that type erases the supplied `choice` object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;CHOICE&gt;
explicit
xref:BloombergLP/bdlar/ChoiceRef/2constructor-09.adoc[ChoiceRef](t&lowbar;CHOICE& choice)
requires IsChoice&lt;t&lowbar;CHOICE&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/bdlar/ChoiceRef/2constructor-09.adoc[_» more&period;&period;&period;_]#

Create `ChoiceRef` object&period; The behaviour is undefined unless `objectAddress` and `vtable` point to the valid objects&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlar/ChoiceRef/2constructor-0b.adoc[ChoiceRef](
    void* objectAddress,
    xref:BloombergLP/bdlar/ChoiceVtable.adoc[ChoiceVtable] const* vtable);
----

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *choice*
| choice object to wrap
| *objectAddress*
| address of the choice object to wrap
| *vtable*
| pointer to the vtable for the choice type
|===


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