BloombergLP::bslma::AllocatorUtil::swap

Conditionally swap the values at pa and pb when allowed is true_type.

Synopsis

Declared in <bslma_allocatorutil.h>

template<class t_TYPE>
static
void
swap(
    t_TYPE* pa,
    t_TYPE* pb,
    bsl::true_type allowed);

Description

Same as the preceding overload, when allowed is true_type.

Parameters

NameDescription
paaddress of the first object to swap
pbaddress of the second object to swap
allowedtrue_type tag indicating swapping is permitted