[#bsl-allocator-0c2-operator_assign-0ed] = xref:bsl.adoc[bsl]::xref:bsl/allocator-0c2.adoc[allocator<int>]::operator= :relfileprefix: ../../ :mrdocs: Modify this allocator to use the same mechanism as the specified `rhs` allocator and return a modifiable reference to this object. Note that `bsl::allocator` objects should never be assigned at runtime, but, in the absence of `if constexpr`, such assignments can sometimes be found legitimately in dead branches (branches that are never taken at runtime) within function templates; ideally, such code would be replaced by more sophisticated metaprogramming that avoided calls to this operator entirely. Invoking this assignment will result in a review error unless `rhs == *this`, i.e., when the assignment would be a no‐op. In the future, the review error may be replaced with an a hard assertion failure. == Synopsis Declared in `<bslma_bslallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/allocator-0df.adoc[allocator<int>]& operator=(xref:bsl/allocator-0df.adoc[allocator<int>] const& rhs); ---- == Description DEPRECATED:`bsl::allocator` should not be assigned. [.small]#Created with https://www.mrdocs.com[MrDocs]#