Return a pointer to the t_TYPE alternative in obj if active.
Declared in <bslstl_variant.h>
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;
Same as the non-const overload, for a const variant.
pointer to the active t_TYPE, or null if inactive
| Name | Description |
|---|---|
| obj | variant to query |