[#BloombergLP-bdlb-swap-07] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::swap :relfileprefix: ../../ :mrdocs: Exchange the values of two nullable objects. == Synopsis Declared in `<bdlb_nullableallocatedvalue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> void swap( xref:BloombergLP/bdlb/NullableAllocatedValue.adoc[NullableAllocatedValue<TYPE>]& a, xref:BloombergLP/bdlb/NullableAllocatedValue.adoc[NullableAllocatedValue<TYPE>]& b); ---- == Description 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. == Parameters [cols="1,4"] |=== | Name| Description | *a* | first object to swap | *b* | second object to swap |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#