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

Return a pointer to the alternative at index `t&lowbar;INDEX`, or null&period;

== Synopsis

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

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


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