[#BloombergLP-bslma-AllocatorUtil-assign-05]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/AllocatorUtil.adoc[AllocatorUtil]::assign
:relfileprefix: ../../../
:mrdocs:

`assign` overloads

== Synopses

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

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;TYPE&gt;
static
t&lowbar;TYPE&
xref:BloombergLP/bslma/AllocatorUtil/assign-01.adoc[assign](
    t&lowbar;TYPE* lhs,
    t&lowbar;TYPE const& rhs,
    xref:bsl/false_type.adoc[bsl::false&lowbar;type] allowed);
----

[.small]#xref:BloombergLP/bslma/AllocatorUtil/assign-01.adoc[_» more&period;&period;&period;_]#

If the specified `allowed` tag is `bsl&colon;&colon;true&lowbar;type` assign the allocator object at the specified `lhs` address the value of the specified `rhs`&semi; otherwise, do nothing, and, in both cases, return a modifiable reference to `&ast;lhs`&period; The `t&lowbar;TYPE` template parameter is typically an allocator type and the `allowed` flag is typically a propagation trait dependant on the calling context, such as `propagate&lowbar;on&lowbar;container&lowbar;copy&lowbar;assignment` or `propagate&lowbar;on&lowbar;container&lowbar;move&lowbar;assignment`&period; Instantiation will fail if `allowed` is `true&lowbar;type` and `t&lowbar;TYPE` lacks a publically accessible copy assignment operator&period; The behavior is undefined unless `allowed` is `true&lowbar;type` or `&ast;lhs &equals;&equals; rhs` before the call&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;TYPE&gt;
static
t&lowbar;TYPE&
xref:BloombergLP/bslma/AllocatorUtil/assign-02.adoc[assign](
    t&lowbar;TYPE* lhs,
    t&lowbar;TYPE const& rhs,
    xref:bsl/true_type.adoc[bsl::true&lowbar;type] allowed);
----

[.small]#xref:BloombergLP/bslma/AllocatorUtil/assign-02.adoc[_» more&period;&period;&period;_]#


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