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