Exchange the state of this weak_ptr with other.
Synopsis
Declared in <bslstl_sharedptr.h>
void
swap(weak_ptr& other) noexcept;
Description
Efficiently exchange the states of this weak pointer and the specified other weak pointer such that each will refer to the object (if any) and representation (if any) formerly referred to and managed by the other.
Parameters
Name |
Description |
other |
other pointer to compare or share ownership with |
Created with MrDocs