[#BloombergLP-bslstl-Variant_TypeToIndex-0d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Variant_TypeToIndex :relfileprefix: ../../ :mrdocs: Compute the zero‐based index of `t_TYPE` in `t_VARIANT`'s alternatives. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_TYPE, class t_VARIANT> struct Variant_TypeToIndex; ---- == Description This component‐private metafunction calculates the zero‐based index of (template parameter) `t_TYPE` in the list of alternatives in (template parameter) `t_VARIANT`, or `bsl::variant_npos` if there is no such alternative. The primary template (used when `t_VARIANT` is not a `bsl::variant`) is not defined. == Specializations [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/Variant_TypeToIndex-00.adoc[`Variant_TypeToIndex<t_TYPE, bsl::variant<t_HEAD, t_TAIL...>>`] | Compute the zero‐based index of `t_TYPE` in a `bsl::variant`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#