[#bsl-stack-05-operator_assign-01] = xref:bsl.adoc[bsl]::xref:bsl/stack-05.adoc[stack]::operator= :relfileprefix: ../../ :mrdocs: 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. == Synopsis Declared in `<bslstl_stack.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/stack-05.adoc[stack<VALUE, CONTAINER>]& operator=(xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<stack>] rhs) noexcept(false); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#