[#BloombergLP-bslma-ManagedPtr_Members-swap] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/ManagedPtr_Members.adoc[ManagedPtr_Members]::swap :relfileprefix: ../../../ :mrdocs: Efficiently exchange the state of this object with that of `other`. == Synopsis Declared in `<bslma_managedptr_members.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void swap(xref:BloombergLP/bslma/ManagedPtr_Members.adoc[ManagedPtr_Members]& other); ---- == Description Efficiently exchange the state of this object with the state of the specified `other` object. This method provides the no‐throw exception‐safety guarantee. Note that if either object is in an unset state, then the only guarantee about the unset state that may be exchanged is that the `pointer` value shall be null. == Parameters [cols="1,4"] |=== | Name| Description | *other* | object with which to exchange state |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#