[#bsl-variant-operator_assign-07] = xref:bsl.adoc[bsl]::xref:bsl/variant.adoc[variant]::operator= :relfileprefix: ../../ :mrdocs: Assignment operators == Synopses Declared in `<bslstl_variant.h>` Assign to this object a copy of `rhs`'s alternative. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/variant.adoc[variant]& xref:bsl/variant/operator_assign-03.adoc[operator=](xref:bsl/variant.adoc[variant] const& rhs) = default; ---- [.small]#xref:bsl/variant/operator_assign-03.adoc[_» more..._]# Assign to this object a moved copy of `rhs`'s alternative. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/variant.adoc[variant]& xref:bsl/variant/operator_assign-0a.adoc[operator=](xref:bsl/variant.adoc[variant]&& rhs) = default; ---- [.small]#xref:bsl/variant/operator_assign-0a.adoc[_» more..._]# Assign to this object the specified `value`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_TYPE> xref:bsl/variant.adoc[variant]& xref:bsl/variant/operator_assign-00.adoc[operator=](t_TYPE&& value) requires BloombergLP::bslstl::Variant_AssignsFromType<variant, t_TYPE>::value; ---- [.small]#xref:bsl/variant/operator_assign-00.adoc[_» more..._]# == Return Value reference to this object == Parameters [cols="1,4"] |=== | Name| Description | *rhs* | variant to copy from | *value* | value to assign to the selected alternative |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#