std::weak_ptr::swap

From cppreference.com
< cpp‎ | memory‎ | weak ptr
 
 
 
Dynamic memory management
Uninitialized storage
(C++17)
(deprecated since c++17)
(deprecated since c++17)
(deprecated since c++17)
Garbage collection support
Miscellaneous
(C++11)
(C++11)
C Library
Low level memory management
 
 
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