BloombergLP::bslalg::SwapUtil::swap

Exchange the values of the objects pointed to by a and b.

Synopsis

Declared in <bslalg_swaputil.h>

template<class T>
static
void
swap(
    T* a,
    T* b);

Description

Exchange the values of the specified a and b objects using either a swap free function overloaded for type T, in the namespace of type T if it's available, and the default generic bsl::swap otherwise.

Parameters

NameDescription
aaddress of the first object to exchange
baddress of the second object to exchange