[#bsl-get_if-09] = xref:bsl.adoc[bsl]::get_if :relfileprefix: ../ :mrdocs: Return a pointer to the `t_TYPE` alternative in `obj` if active. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_TYPE, class t_HEAD, class... t_TAIL> add_pointer<t_TYPE const>::type get_if(xref:bsl/variant.adoc[variant<t_HEAD, t_TAIL...>] const* obj) noexcept; ---- == Description Same as the non‐`const` overload, for a `const` variant. == Return Value pointer to the active `t_TYPE`, or null if inactive == Parameters [cols="1,4"] |=== | Name| Description | *obj* | variant to query |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#