std::experimental::atomic_weak_ptr<T>::exchange
Min standard notice:
Atomically replaces the underlying weak_ptr with desired. The operation is a read-modify-write operation. Memory is affected according to the value of order.
# Declarations
weak_ptr<T> exchange( weak_ptr<T> desired, std::memory_order order = std::memory_order_seq_cst ) noexcept;
# Parameters
desired: value to assignorder: memory order constraints to enforce
# Return value
The value of the atomic variable before the call.