[#bsl-weak_ptr-0d-swap]
= xref:bsl.adoc[bsl]::xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr]::swap
:relfileprefix: ../../
:mrdocs:

Efficiently exchange the states of this weak pointer and the specified `other` weak pointer such that each will refer to the object (if any) and representation (if any) formerly referred to and managed by the other&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;sharedptr&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
swap(xref:bsl/weak_ptr-0d.adoc[weak&lowbar;ptr]& other) noexcept;
----


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