[#bsl-variant-valueless_by_exception]
= xref:bsl.adoc[bsl]::xref:bsl/variant.adoc[variant]::valueless&lowbar;by&lowbar;exception
:relfileprefix: ../../
:mrdocs:

Return `false` if there is an alternative object currently managed by this `variant` object, and `true` otherwise&period; A `variant` object can become valueless by exception if the creation of an alternative object exits via an exception, or if it is copied or assigned from another `variant` object that is valueless by exception&period; This method differs from the standard in the following way&colon; &ast; `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&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;variant&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
valueless&lowbar;by&lowbar;exception() const noexcept;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
