[#BloombergLP-bslma-AllocatorUtil-assign-02] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/AllocatorUtil.adoc[AllocatorUtil]::assign :relfileprefix: ../../../ :mrdocs: 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. == Synopsis Declared in `<bslma_allocatorutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_TYPE> static t_TYPE& assign( t_TYPE* lhs, t_TYPE const& rhs, xref:bsl/true_type.adoc[bsl::true_type] allowed); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#