cpp/experimental/atomic weak ptr/exchange

Atomically replaces the underlying with. The operation is a read-modify-write operation. Memory is affected according to the value of.

Return value
The value of the atomic variable before the call.