[#BloombergLP-bslma-swap]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::swap
:relfileprefix: ../../
:mrdocs:

Efficiently exchange the values of the specified `a` and `b` objects&period; This function provides the no&hyphen;throw exception&hyphen;safety guarantee&period;

== Synopsis

Declared in `&lt;bslma&lowbar;managedptr&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TARGET&lowbar;TYPE&gt;
void
swap(
    xref:BloombergLP/bslma/ManagedPtr-0fa.adoc[ManagedPtr&lt;TARGET&lowbar;TYPE&gt;]& a,
    xref:BloombergLP/bslma/ManagedPtr-0fa.adoc[ManagedPtr&lt;TARGET&lowbar;TYPE&gt;]& b);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *a*
| first managed pointer to exchange
| *b*
| second managed pointer to exchange
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
