[#BloombergLP-bslstl-variant_constructsFromStd]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::variant&lowbar;constructsFromStd
:relfileprefix: ../../
:mrdocs:

This component&hyphen;private constexpr variable template is `true` if `t&lowbar;VARIANT` is a specialization of `bsl&colon;&colon;variant`, and `t&lowbar;STD&lowbar;VARIANT` is the `std&colon;&colon;variant` type (possibly with added cvref&hyphen;qualification) that has the same sequence of alternatives, and each alternative of `t&lowbar;VARIANT` is constructible from the corresponding alternative of `t&lowbar;STD&lowbar;VARIANT` (with cv&hyphen;qualification and value category matching that of `t&lowbar;STD&lowbar;VARIANT`)&period; Note that we use `bsl&colon;&colon;conjunction&lowbar;v` for its short&hyphen;circuiting properties&colon; if `t&lowbar;STD&lowbar;VARIANT` isn`t a `std&colon;&colon;variant&grave; (for example, if it`s a `bsl&colon;&colon;variant&grave;) we avoid recursing into the constraints of `bsl&colon;&colon;variant`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;VARIANT,
    class t&lowbar;STD&lowbar;VARIANT&gt;
constexpr bool variant&lowbar;constructsFromStd = bsl&colon;&colon;conjunction&lowbar;v&lt;
      bsl&colon;&colon;is&lowbar;same&lt;typename Variant&lowbar;CorrespondingStdVariant&lt;t&lowbar;VARIANT&gt;&colon;&colon;type,
                   bsl&colon;&colon;remove&lowbar;cvref&lowbar;t&lt;t&lowbar;STD&lowbar;VARIANT&gt;&gt;,
      std&colon;&colon;is&lowbar;constructible&lt;bsl&colon;&colon;remove&lowbar;cvref&lowbar;t&lt;t&lowbar;STD&lowbar;VARIANT&gt;,
                            t&lowbar;STD&lowbar;VARIANT&gt;&gt;;
----


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