[#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;`

Conditionally assign `rhs` to `&ast;lhs` when `allowed` is `false&lowbar;type`&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;_]#

Conditionally assign `rhs` to `&ast;lhs` based on `allowed`&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;_]#

== Return Value

modifiable reference to `&ast;lhs`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| address of the object to assign to
| *rhs*
| value compared for equality when assignment is disallowed
| *allowed*
| `false&lowbar;type` tag indicating assignment is not permitted
|===


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