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

Create a `variant` object holding the same alternative (if any) as the specified `original` object&period; If this `variant` is allocator&hyphen;aware, the specified `allocator` is used to supply memory&period; If the `original` object is not valueless by exception&grave;, the contained value is copy&hyphen;constructed from the contained value of `original`&period; This constructor is deleted unless all alternatives are copy constructible&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;FIRST = t&lowbar;HEAD&gt;
requires BloombergLP&colon;&colon;bslstl&colon;&colon;
                Variant&lowbar;IsCopyConstructibleAll&lt;t&lowbar;FIRST, t&lowbar;TAIL&period;&period;&period;&gt;&colon;&colon;value
variant(
    std::allocator&lowbar;arg&lowbar;t,
    xref:bsl/variant/allocator_type.adoc[allocator&lowbar;type] allocator,
    xref:bsl/variant.adoc[variant] const& original);
----


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