[#absl-holds_alternative] = xref:absl.adoc[absl]::holds_alternative :relfileprefix: ../ :mrdocs: Tests whether a variant currently holds the alternative `T` (deprecated). == Synopsis Declared in `<absl/types/variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename T, typename... Args> [[deprecated]] constexpr decltype(std::holds_alternative<T>( std::declval<Args>()...)) holds_alternative(Args&&... args); ---- [WARNING] ==== https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged. ==== == Return Value The result of `std::holds_alternative<T>`. == Parameters [cols="1,4"] |=== | Name| Description | *args* | Arguments forwarded to `std::holds_alternative`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#