[#bsl-holds_alternative] = xref:bsl.adoc[bsl]::holds_alternative :relfileprefix: ../ :mrdocs: Return `true` if the specified `obj` currently holds the (template parameter) `t_TYPE` alternative, and `false` otherwise. `t_TYPE` shall appear exactly once in the variant's list of alternatives. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_TYPE, class t_HEAD, class... t_TAIL> bool holds_alternative(xref:bsl/variant.adoc[variant<t_HEAD, t_TAIL...>] const& obj) noexcept; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#