std::variant_npos

Header: <variant>

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

# Declarations

inline constexpr std::size_t variant_npos = -1;

(since C++17)

# See also