Tests whether a variant currently holds the alternative T (deprecated).

Synopsis

Declared in <absl/types/variant.h>

template<
    typename T,
    typename... Args>
[[deprecated]]
constexpr
decltype(std::holds_alternative<T>(
    std::declval<Args>()...))
holds_alternative(Args&&... args);
Warning

Deprecated. Use of this entity is allowed but discouraged.

Return Value

The result of std::holds_alternative<T>.

Parameters

Name

Description

args

Arguments forwarded to std::holds_alternative.

Created with MrDocs