Showing content from https://en.cppreference.com/w/cpp/language/../../cpp/utility/variant/holds_alternative.html below:
std::holds_alternative - cppreference.com
template< class T, class... Types >
constexpr bool holds_alternative( const std::variant<Types...>& v ) noexcept; (since C++17)
Checks if the variant v holds the alternative T
. The call is ill-formed if T
does not appear exactly once in Types...
[edit] Parameters [edit] Return value
true if the variant currently holds the alternative T
, false otherwise.
[edit] Example [edit] See also returns the zero-based index of the alternative held by the variant
(public member function) [edit] reads the value of the variant given the index or the type (if the type is unique), throws on error
(function template) [edit]
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4