Atomically store a new value and read the old one.
weak_ptr<T> exchange( weak_ptr<T> new_value, memory_order order = memory_order_seq_cst) noexcept;
and retrieve the existing value of
The value of
immediately prior to the store.
This is an atomic read-modify-write operation for the memory location