BloombergLP::bsltf::swap

Exchange the states of two objects.

Synopsis

Declared in <bsltf_moveonlyalloctesttype.h>

void
swap(
    MoveOnlyAllocTestType& a,
    MoveOnlyAllocTestType& b);

Description

Exchange the states of the specified a and b. Both a and b will be left in a moved-into state. No allocations shall occur (so no exceptions will be thrown) unless a and b have different allocators.

Parameters

NameDescription
afirst object to swap
bsecond object to swap