[#bsl-variant-operator_assign-0a] = xref:bsl.adoc[bsl]::xref:bsl/variant.adoc[variant]::operator= :relfileprefix: ../../ :mrdocs: If `rhs` holds the same alternative type as this object, move assign the contained value of `rhs` to the contained value of this object. Otherwise, destroy the contained value of this object (if any) and, if `rhs` holds a value, move‐construct the corresponding alternative of this object from the contained value of `rhs`. The allocators of this object and `rhs` both remain unchanged. If the construction of a new alternative object throws an exception, this `variant` object is left in a valueless by exception state. This operator participes in overload resolution only if all alternatives are move constructible and mvoe assignable. For simplicity of implementation, this method differs from the standard in the following ways: * conditional triviality is not implemented * `constexpr` is not implemented * `noexcept` specification is not implemented == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/variant.adoc[variant]& operator=(xref:bsl/variant.adoc[variant]&& rhs) = default; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#