Compute the type of the alternative at index t_INDEX.
Declared in <bslstl_variant.h>
template<
std::size_t t_INDEX,
class t_TYPE>
struct variant_alternative;
This metafunction calculates the type of the alternative whose index is (template parameter) t_INDEX in the possibly cv-qualified bsl::variant type of (template parameter) t_TYPE.
If t_TYPE is cv-qualified, its cv-qualifiers are applied to the alternative.
| Name | Description |
|---|---|
variant_alternative<t_INDEX, t_TYPE volatile> | Strip volatile from t_TYPE before computing the alternative type. |
variant_alternative<t_INDEX, t_TYPE const> | Strip const from t_TYPE before computing the alternative type. |
variant_alternative<t_INDEX, t_TYPE const volatile> | Strip const volatile from t_TYPE before computing the alternative type. |
variant_alternative<t_INDEX, variant<t_HEAD, t_TAIL...>> | Compute the alternative type at index t_INDEX of a bsl::variant. |