Documentation Home >> Headers >> <jss/experimental_atomic.hpp> Header >> std::experimental::weak_ptr >> std::experimental::weak_ptr::swap member function

Exchange the values of two std::experimental::weak_ptr objects such that each holds the value and ownership properties that the other did prior to the exchange.

void swap(weak_ptr& other) noexcept;

Effects:

Exchange the value and ownership properties of *this with other.

Throws:

Nothing.

Header

#include <experimental/atomic>

See Also