[#BloombergLP-bdlb-swap-09] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::swap :relfileprefix: ../../ :mrdocs: `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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> void xref:BloombergLP/bdlb/swap-07.adoc[swap]( xref:BloombergLP/bdlb/NullableAllocatedValue.adoc[NullableAllocatedValue<TYPE>]& a, xref:BloombergLP/bdlb/NullableAllocatedValue.adoc[NullableAllocatedValue<TYPE>]& b); ---- [.small]#xref:BloombergLP/bdlb/swap-07.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> void xref:BloombergLP/bdlb/swap-03.adoc[swap]( xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue<TYPE>]& lhs, xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue<TYPE>]& rhs) requires BloombergLP::bslma::UsesBslmaAllocator<TYPE>::value; ---- [.small]#xref:BloombergLP/bdlb/swap-03.adoc[_» more..._]# Exchange the values of the specified `lhs` and `rhs` objects when `TYPE` does not use a `bslma::Allocator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> void xref:BloombergLP/bdlb/swap-02.adoc[swap]( xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue<TYPE>]& lhs, xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue<TYPE>]& rhs) requires !BloombergLP::bslma::UsesBslmaAllocator<TYPE>::value; ---- [.small]#xref:BloombergLP/bdlb/swap-02.adoc[_» more..._]# 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPES> void xref:BloombergLP/bdlb/swap-04.adoc[swap]( xref:BloombergLP/bdlb/VariantImp.adoc[VariantImp<TYPES>]& a, xref:BloombergLP/bdlb/VariantImp.adoc[VariantImp<TYPES>]& b); ---- [.small]#xref:BloombergLP/bdlb/swap-04.adoc[_» more..._]# Exchange the values of the specified `a` and `b` objects. This function provides the no‐throw exception‐safety guarantee. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_TYPE, unsigned int t_NUM_BITS> void xref:BloombergLP/bdlb/swap-01.adoc[swap]( xref:BloombergLP/bdlb/NullableAllocatedValue_PointerBitsPair.adoc[NullableAllocatedValue_PointerBitsPair<t_TYPE, t_NUM_BITS>]& a, xref:BloombergLP/bdlb/NullableAllocatedValue_PointerBitsPair.adoc[NullableAllocatedValue_PointerBitsPair<t_TYPE, t_NUM_BITS>]& b); ---- [.small]#xref:BloombergLP/bdlb/swap-01.adoc[_» 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class FUNCTOR, class ITERATOR> void xref:BloombergLP/bdlb/swap-0d.adoc[swap]( xref:BloombergLP/bdlb/TransformIterator.adoc[TransformIterator<FUNCTOR, ITERATOR>]& a, xref:BloombergLP/bdlb/TransformIterator.adoc[TransformIterator<FUNCTOR, ITERATOR>]& b); ---- [.small]#xref:BloombergLP/bdlb/swap-0d.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#