[#bsl-get_if-09]
= xref:bsl.adoc[bsl]::get&lowbar;if
:relfileprefix: ../
:mrdocs:

Return a pointer to the `t&lowbar;TYPE` alternative in `obj` if active&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;variant&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;TYPE,
    class t&lowbar;HEAD,
    class&period;&period;&period; t&lowbar;TAIL&gt;
add&lowbar;pointer&lt;t&lowbar;TYPE const&gt;::type
get&lowbar;if(xref:bsl/variant.adoc[variant&lt;t&lowbar;HEAD, t&lowbar;TAIL&period;&period;&period;&gt;] const* obj) noexcept;
----

== Description

Same as the non&hyphen;`const` overload, for a `const` variant&period;

== Return Value

pointer to the active `t&lowbar;TYPE`, or null if inactive

== Parameters

[cols="1,4"]
|===
| Name| Description
| *obj*
| variant to query
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
