[#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 `<bslma_allocatorutil.h>` Same as the preceding overload. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_TYPE> static t_TYPE& xref:BloombergLP/bslma/AllocatorUtil/assign-01.adoc[assign]( t_TYPE* lhs, t_TYPE const& rhs, xref:bsl/false_type.adoc[bsl::false_type] allowed); ---- [.small]#xref:BloombergLP/bslma/AllocatorUtil/assign-01.adoc[_» more..._]# If the specified `allowed` tag is `bsl::true_type` assign the allocator object at the specified `lhs` address the value of the specified `rhs`; otherwise, do nothing, and, in both cases, return a modifiable reference to `*lhs`. The `t_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_on_container_copy_assignment` or `propagate_on_container_move_assignment`. Instantiation will fail if `allowed` is `true_type` and `t_TYPE` lacks a publically accessible copy assignment operator. The behavior is undefined unless `allowed` is `true_type` or `*lhs == rhs` before the call. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_TYPE> static t_TYPE& xref:BloombergLP/bslma/AllocatorUtil/assign-02.adoc[assign]( t_TYPE* lhs, t_TYPE const& rhs, xref:bsl/true_type.adoc[bsl::true_type] allowed); ---- [.small]#xref:BloombergLP/bslma/AllocatorUtil/assign-02.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#