std::swap(std::weak_ptr) (3) Linux Manual Page
std::swap(std::weak_ptr) – std::swap(std::weak_ptr)
Synopsis
template <class T>
(since C++ 11)
void swap(weak_ptr<T> &lhs, weak_ptr<T> &rhs) noexcept;
Specializes the std::swap algorithm for std::weak_ptr. Swaps the pointers of lhs and rhs. Calls lhs.swap(rhs).
Parameters
lhs, rhs – smart pointers whose contents to swap
Return value
(none)
Complexity
Constant
See also
swap (function template)
swap (public member function)
