[#bsl-variant-index] = xref:bsl.adoc[bsl]::xref:bsl/variant.adoc[variant]::index :relfileprefix: ../../ :mrdocs: 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. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::size_t index() const noexcept; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#