[#BloombergLP-bslstl-Variant_TypeToIndex-00] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Variant_TypeToIndex-0d.adoc[Variant_TypeToIndex]<t_TYPE, xref:bsl/variant.adoc[bsl::variant<t_HEAD, t_TAIL...>]> :relfileprefix: ../../ :mrdocs: Compute the zero‐based index of `t_TYPE` in a `bsl::variant`. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_TYPE, class t_HEAD, class... t_TAIL> struct xref:BloombergLP/bslstl/Variant_TypeToIndex-0d.adoc[Variant_TypeToIndex]<t_TYPE, xref:bsl/variant.adoc[bsl::variant<t_HEAD, t_TAIL...>]> : xref:BloombergLP/bslstl/Variant_TypeToIndexImpl-0a.adoc[Variant_TypeToIndexImpl<0, t_TYPE, t_HEAD, t_TAIL...>] ---- == Description This partial specialization of `Variant_TypeToIndex` computes the zero‐based index of `t_TYPE` in the alternatives `t_HEAD, t_TAIL...` of a `bsl::variant` specialization. == Base Classes [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bslstl/Variant_TypeToIndexImpl-0a.adoc[Variant_TypeToIndexImpl<0, t_TYPE, t_HEAD, t_TAIL...>]` | Compute `t_INDEX + i` where `i` is the index of `t_TYPE`, or `npos`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#