std::experimental::atomic_weak_ptr<T>::exchange

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

# Return value

The value of the atomic variable before the call.

# See also