std::variant_npos (3) - Linux Man Pages

std::variant_npos: std::variant_npos

NAME

std::variant_npos - std::variant_npos

Synopsis


Defined in header <variant>
inline constexpr std::size_t variant_npos = -1; (since C++17)


This is a special value equal to the largest value representable by the type std::size_t, used as the return type of index() when valueless_by_exception() is true

See also


                       returns the zero-based index of the alternative held by the variant
index (public member function)
                       checks if the variant is in the invalid state
valueless_by_exception (public member function)