[#bsl-allocator-0ac-operator_assign]
= xref:bsl.adoc[bsl]::xref:bsl/allocator-0ac.adoc[allocator&lt;void&gt;]::operator&equals;
:relfileprefix: ../../
:mrdocs:

Modify this allocator to use the same mechanism as the specified `rhs` allocator and return a modifiable reference to this object&period; Note that `bsl&colon;&colon;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&semi; ideally, such code would be replaced by more sophisticated metaprogramming that avoided calls to this operator entirely&period; Invoking this assignment will result in a review error unless `rhs &equals;&equals; &ast;this`, i&period;e&period;, when the assignment would be a no&hyphen;op&period; In the future, the review error may be replaced with an a hard assertion failure&period;

== Synopsis

Declared in `&lt;bslma&lowbar;bslallocator&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/allocator-0df.adoc[allocator&lt;BslAllocator&lowbar;Voidish&gt;]&
operator&equals;(xref:bsl/allocator-0df.adoc[allocator&lt;BslAllocator&lowbar;Voidish&gt;] const& rhs);
----

== Description

DEPRECATED&colon;`bsl&colon;&colon;allocator` should not be assigned&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
