[#bsl-stack-05-operator_assign-0a] = xref:bsl.adoc[bsl]::xref:bsl/stack-05.adoc[stack]::operator= :relfileprefix: ../../ :mrdocs: Assignment operators == Synopses Declared in `<bslstl_stack.h>` Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/stack-05.adoc[stack<VALUE, CONTAINER>]& xref:bsl/stack-05/operator_assign-04.adoc[operator=](xref:bsl/stack-05.adoc[stack] const& rhs); ---- [.small]#xref:bsl/stack-05/operator_assign-04.adoc[_» more..._]# Assign to this object the value of the specified `rhs` object, and return a reference providing modifiable access to this object. The contents of `rhs` are moved to this stack using the move‐assignment operator of `CONTAINER`. `rhs` is left in a valid but unspecified state, and if an exception is thrown, `*this` is left in a valid but unspecified state. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/stack-05.adoc[stack<VALUE, CONTAINER>]& xref:bsl/stack-05/operator_assign-01.adoc[operator=](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<stack>] rhs) noexcept(false); ---- [.small]#xref:bsl/stack-05/operator_assign-01.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#