X Tutup
The Wayback Machine - https://web.archive.org/web/20191021185638/https://en.cppreference.com/w/cpp/memory/weak_ptr/swap
Namespaces
Variants
Views
Actions

std::weak_ptr<T>::swap

From cppreference.com
< cpp‎ | memory‎ | weak ptr
 
 
 
Dynamic memory management
Uninitialized storage
(C++17)
Garbage collection support
Miscellaneous
(C++20)
(C++11)
(C++11)
C Library
Low level memory management
 
 
void swap( weak_ptr& r ) noexcept;
(since C++11)

Exchanges the contents of *this and r

[edit] Parameters

r - smart pointer to exchange the contents with

[edit] Return value

(none)

X Tutup