BloombergLP::bdlb::swap

swap overloads

Synopses

Declared in <bdlb_nullableallocatedvalue.h>

Exchange the values of two nullable objects.

template<class TYPE>
void
swap(
    NullableAllocatedValue<TYPE>& a,
    NullableAllocatedValue<TYPE>& b);
» more...

Exchange the values of the specified lhs and rhs objects.

template<class TYPE>
void
swap(
    NullableValue<TYPE>& lhs,
    NullableValue<TYPE>& rhs)
requires BloombergLP::bslma::UsesBslmaAllocator<TYPE>::value;
» more...

Exchange the values of the specified lhs and rhs objects when TYPE does not use a bslma::Allocator.

template<class TYPE>
void
swap(
    NullableValue<TYPE>& lhs,
    NullableValue<TYPE>& rhs)
requires !BloombergLP::bslma::UsesBslmaAllocator<TYPE>::value;
» more...

Swap the values of the specified a and b objects.

template<class TYPES>
void
swap(
    VariantImp<TYPES>& a,
    VariantImp<TYPES>& b);
» more...

Exchange the values of the specified a and b objects. This function provides the no-throw exception-safety guarantee.

template<
    class t_TYPE,
    unsigned int t_NUM_BITS>
void
swap(
    NullableAllocatedValue_PointerBitsPair<t_TYPE, t_NUM_BITS>& a,
    NullableAllocatedValue_PointerBitsPair<t_TYPE, t_NUM_BITS>& b);
» more...

Efficiently exchange the values of the specified a and b objects by applying swap to each of the functor and underlying iterator fields of the two objects.

template<
    class FUNCTOR,
    class ITERATOR>
void
swap(
    TransformIterator<FUNCTOR, ITERATOR>& a,
    TransformIterator<FUNCTOR, ITERATOR>& b);
» more...

Parameters

NameDescription
afirst object to swap
bsecond object to swap
lhsleft-hand operand
rhsright-hand operand