BloombergLP::bslstl::Variant_TypeToIndex<t_TYPE, bsl::variant<t_HEAD, t_TAIL...>>

Compute the zero-based index of t_TYPE in a bsl::variant.

Synopsis

Declared in <bslstl_variant.h>

template<
    class t_TYPE,
    class t_HEAD,
    class... t_TAIL>
struct Variant_TypeToIndex<t_TYPE, bsl::variant<t_HEAD, t_TAIL...>>
    : 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

NameDescription
Variant_TypeToIndexImpl<0, t_TYPE, t_HEAD, t_TAIL...>Compute t_INDEX + i where i is the index of t_TYPE, or npos.