[#bsl-swap-0447] = xref:bsl.adoc[bsl]::swap :relfileprefix: ../ :mrdocs: Efficiently exchange the states of the specified `a` and `b` weak pointers such that each will refer to the object (if any) and representation formerly referred to by the other. == Synopsis Declared in `<bslstl_sharedptr.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ELEMENT_TYPE> void swap( xref:bsl/weak_ptr-0d.adoc[weak_ptr<ELEMENT_TYPE>]& a, xref:bsl/weak_ptr-0d.adoc[weak_ptr<ELEMENT_TYPE>]& b) noexcept; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#