# std::weak_ptr::swap

From cppreference.com
< cpp‎ | memory‎ | weak ptr

void swap( weak_ptr& r ); |  | (since C++11)

Exchanges the contents of *this and `r`

### Parameters

r | - | smart pointer to exchange the contents with

### Return value

(none)

### Exceptions

`noexcept` specification:
noexcept
Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/memory/weak_ptr/swap&oldid=91449"
Category:

- unconditionally noexcept

Hidden categories:

- Pages with unreviewed unconditional noexcept template
- Pages with unreviewed noexcept template