[#bsl-variant-2constructor-04]
= xref:bsl.adoc[bsl]::xref:bsl/variant.adoc[variant]::variant
:relfileprefix: ../../
:mrdocs:

Create a `variant` object whose contained value is direct&hyphen;initialized from the specified `t`&period; The alternative selected is the best match among all alternatives for which the expression `t&lowbar;ALT&lowbar;TYPE x&lsqb;&rsqb;&equals; &lcub;std&colon;&colon;forward&lt;t&lowbar;TYPE&gt;(t)&rcub;&semi;` is well formed, and this constructor participates in overload resolution only if there is a unique best matching alternative and that alternative is constructible from `t`&period; If this `variant` is allocator&hyphen;aware, the currently installed default allocator is used to supply memory&period; Note that the cv&hyphen;qualification of an alternative type does not affect how well the alternative type matches an argument type&period; For simplicity of implementation, this method differs from the standard in the following ways&colon; &ast; `constexpr` is not implemented &ast; `noexcept` specification is not implemented

== Synopsis

Declared in `&lt;bslstl&lowbar;variant&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;TYPE&gt;
variant(t&lowbar;TYPE&& t);
----


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