BloombergLP::bsltf::swap

swap overloads

Synopses

Declared in <bsltf_degeneratefunctor.h>

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.

void
swap(
    MoveOnlyAllocTestType& a,
    MoveOnlyAllocTestType& b);
» more...

Exchange the states of the specified a and b. If the allocators match, both a and b will be left in a moved-into state, otherwise, both will not. If a and b are the same object, this function will have no effect. No allocations shall occur (so no exceptions will be thrown) unless a and b have different allocators.

void
swap(
    WellBehavedMoveOnlyAllocTestType& a,
    WellBehavedMoveOnlyAllocTestType& b);
» more...

Exchange the values of the specified lhs and rhs objects.

template<class FUNCTOR>
void
swap(
    DegenerateFunctor<FUNCTOR, true>& lhs,
    DegenerateFunctor<FUNCTOR, true>& rhs);
» more...