get_if overloads
Synopses
Declared in <bslstl_variant.h>
Return a pointer to the alternative object with type (template parameter) t_TYPE in the specified obj, or a null pointer if obj itself is a null pointer or if t_TYPE is not the type of the currently active alternative. t_TYPE shall appear exactly once in the variant's list of alternatives.
template<
class t_TYPE,
class t_HEAD,
class... t_TAIL>
add_pointer<t_TYPE>::type
get_if(variant<t_HEAD, t_TAIL...>* obj) noexcept;
Return a pointer to the alternative at index t_INDEX, or null.
template<
std::size_t t_INDEX,
class t_HEAD,
class... t_TAIL>
add_pointer<variant_alternative<t_INDEX, variant<t_HEAD, t_TAIL...>>::type>::type
get_if(variant<t_HEAD, t_TAIL...>* obj) noexcept;
Return a pointer to the alternative object with type (template parameter) t_TYPE in the specified obj, or a null pointer if obj itself is a null pointer or if t_TYPE is not the type of the currently active alternative. t_TYPE shall appear exactly once in the variant's list of alternatives.
template<
class t_TYPE,
class t_HEAD,
class... t_TAIL>
add_pointer<t_TYPE const>::type
get_if(variant<t_HEAD, t_TAIL...> const* obj) noexcept;
Return a pointer to the alternative object with index (template parameter) t_INDEX in the specified obj, or a null pointer if obj itself is a null pointer or if t_INDEX is not the index of the currently active alternative. t_INDEX shall be a valid alternative index.
template<
std::size_t t_INDEX,
class t_HEAD,
class... t_TAIL>
add_pointer<variant_alternative<t_INDEX, variant<t_HEAD, t_TAIL...>>::type const>::type
get_if(variant<t_HEAD, t_TAIL...> const* obj) noexcept;
Created with MrDocs