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>
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
Name |
Description |
|
Specializations
Name |
Description |
This partial specialization is used when the list of alternatives |
Derived Classes
Name |
Description |
Created with MrDocs