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);

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;

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;

Swap the values of the specified a and b objects.

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

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

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);

Parameters

Name

Description

a

first object to swap

b

second object to swap

lhs

left‐hand operand

rhs

right‐hand operand

Created with MrDocs