[#bsl-variant_alternative-0c]
= xref:bsl.adoc[bsl]::variant&lowbar;alternative
:relfileprefix: ../
:mrdocs:

This metafunction calculates the type of the alternative whose index is (template parameter) `t&lowbar;INDEX` in the possibly cv&hyphen;qualified `bsl&colon;&colon;variant` type of (template parameter) `t&lowbar;TYPE`&period; If `t&lowbar;TYPE` is cv&hyphen;qualified, its cv&hyphen;qualifiers are applied to the alternative&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    std::size&lowbar;t t&lowbar;INDEX,
    class t&lowbar;TYPE&gt;
struct variant&lowbar;alternative;
----

== Specializations

[cols="1"]
|===
| Name
| xref:bsl/variant_alternative-09.adoc[`variant&lowbar;alternative&lt;t&lowbar;INDEX, t&lowbar;TYPE volatile&gt;`] 
| xref:bsl/variant_alternative-0d.adoc[`variant&lowbar;alternative&lt;t&lowbar;INDEX, t&lowbar;TYPE const&gt;`] 
| xref:bsl/variant_alternative-0f.adoc[`variant&lowbar;alternative&lt;t&lowbar;INDEX, t&lowbar;TYPE const volatile&gt;`] 
| xref:bsl/variant_alternative-06.adoc[`variant&lowbar;alternative&lt;t&lowbar;INDEX, variant&lt;t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;&gt;&gt;`] 
|===



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