swap overloads

Synopses

Declared in <bdlb_nullableallocatedvalue.h>

Exchange the values of the specified a and b objects. This function provides the no‐throw exception‐safety guarantee if the two objects were created with the same allocator and the basic guarantee otherwise.

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

Exchange the values of the specified rhs and lhs objects. This function provides the no‐throw exception‐safety guarantee if the (template parameter) TYPE provides that guarantee, the two objects were created with the same allocator (if applicable), and the result of the isNull method for the two objects is the same; otherwise this function provides the basic guarantee.

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. This method provides the no‐throw guarantee if the TYPE template parameter has a no‐throw swap and the two variant objects being swapped has the same type; otherwise this method provides the basic guarantee.

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

Created with MrDocs