BloombergLP::bslma::AllocatorUtil::assign

assign overloads

Synopses

Declared in <bslma_allocatorutil.h>

Conditionally assign rhs to *lhs when allowed is false_type.

template<class t_TYPE>
static
t_TYPE&
assign(
    t_TYPE* lhs,
    t_TYPE const& rhs,
    bsl::false_type allowed);
» more...

Conditionally assign rhs to *lhs based on allowed.

template<class t_TYPE>
static
t_TYPE&
assign(
    t_TYPE* lhs,
    t_TYPE const& rhs,
    bsl::true_type allowed);
» more...

Return Value

modifiable reference to *lhs

Parameters

NameDescription
lhsaddress of the object to assign to
rhsvalue compared for equality when assignment is disallowed
allowedfalse_type tag indicating assignment is not permitted