18 #ifndef ION_BASE_VARIANTTYPERESOLVER_H_
19 #define ION_BASE_VARIANTTYPERESOLVER_H_
39 template <
typename T,
typename Base>
50 template <
typename VariantType,
typename TypeToResolve,
typename Base =
void>
55 #define ION_SPECIALIZE_VARIANT_RESOLVER_HELPER(VariantSubType) \
56 template <typename VariantType, typename TypeToResolve> \
57 struct ResolverHelper< \
58 VariantType, TypeToResolve, \
59 typename IsSameOrDerivedFrom<TypeToResolve, \
60 typename VariantType::VariantSubType>::Type> { \
61 typedef typename VariantType::VariantSubType Type; \
105 #undef ION_SPECIALIZE_VARIANT_RESOLVER_HELPER
138 template <
typename VariantType,
typename TypeToResolve>
147 #endif // ION_BASE_VARIANTTYPERESOLVER_H_
internal::ResolverHelper< VariantType, TypeToResolve, TypeToResolve >::Type Type
ConditionalType< IsSameType< Base, T >::value||IsBaseOf< Base, T >::value, T, void >::Type Type
This struct is specialized for each of the defined types supported by a Variant.
The VariantTypeResolver struct allows users of the Variant class to determine which type defined by a...
IsBaseOf is similar to std::is_base_of.
ConditionalType is similar to std::conditional.
ION_SPECIALIZE_VARIANT_RESOLVER_HELPER(Type1)