cpp/atomic/atomic ref/exchange

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

Return value
The value of the referenced object before the call.