Return the index of the currently managed alternative.
Declared in <bslstl_variant.h>
std::size_t
index() const noexcept;
Return the index of the alternative currently managed by this variant object, or bsl::variant_npos if this object is valueless by exception. This method differs from the standard in the following way: * constexpr is not implemented This is because no constructors are currently constexpr and there is no way to test the constexpr property of this function.
index of the active alternative, or variant_npos