[#BloombergLP-bdlb-swap-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::swap :relfileprefix: ../../ :mrdocs: 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. == Synopsis Declared in `<bdlb_nullablevalue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> void swap( xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue<TYPE>]& lhs, xref:BloombergLP/bdlb/NullableValue.adoc[NullableValue<TYPE>]& rhs) requires BloombergLP::bslma::UsesBslmaAllocator<TYPE>::value; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#