BloombergLP::bslma::AllocatorUtil::swap

swap overloads

Synopses

Declared in <bslma_allocatorutil.h>

Conditionally swap the values at pa and pb based on allowed.

template<class t_TYPE>
static
void
swap(
    t_TYPE* pa,
    t_TYPE* pb,
    bsl::false_type allowed);
» more...

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

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

Parameters

NameDescription
paaddress of the first object to swap
pbaddress of the second object to swap
allowedwhether swapping is permitted