[#BloombergLP-bslstl-Variant_TypeToIndexImpl-0a] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Variant_TypeToIndexImpl :relfileprefix: ../../ :mrdocs: This component‐private metafunction provides implementation for `Variant_TypeToIndex`. It evaluates to `t_INDEX + i` where `i` is the zero‐based index of (template parameter) `t_TYPE` in (template parameters) `t_HEAD, t_TAIL...`, or `bsl::variant_npos` if `t_TYPE` is not found. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< size_t t_INDEX, class t_TYPE, class t_HEAD = BSLSTL_VARIANT_NOT_A_TYPE, class... t_TAIL> struct Variant_TypeToIndexImpl : bsl::conditional<bsl::is_same<t_TYPE, t_HEAD>::value, bsl::integral_constant<size_t, t_INDEX>, Variant_TypeToIndexImpl<t_INDEX + 1, t_TYPE, t_TAIL...>>::type ---- == Base Classes [cols="1,4"] |=== | Name| Description | `bsl::conditional<bsl::is_same<t_TYPE, t_HEAD>::value, bsl::integral_constant<size_t, t_INDEX>, Variant_TypeToIndexImpl<t_INDEX + 1, t_TYPE, t_TAIL...>>::type` | |=== == Specializations [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/Variant_TypeToIndexImpl-07.adoc[`Variant_TypeToIndexImpl<t_INDEX, t_TYPE, BSLSTL_VARIANT_NOT_A_TYPE>`] | This partial specialization is used when the list of alternatives `t_HEAD, t_TAIL...` is empty, i.e., `t_TYPE` wasn't found in the originally supplied list of alternatives. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslstl/Variant_TypeToIndex-00.adoc[`Variant_TypeToIndex<t_TYPE, bsl::variant<t_HEAD, t_TAIL...>>`] | |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#