cpp/atomic/atomic/fetch add

Atomically replaces the current value with the result of arithmetic addition of the value and. That is, it performs atomic post-increment. The operation is a read-modify-write operation. Memory is affected according to the value of.

For signed types, arithmetic is defined to use two’s complement representation. There are no undefined results.

For types, the result may be an undefined address, but the operation otherwise has no undefined behavior. The program is ill-formed if is not an object type.

Return value
The value immediately preceding the effects of this function in the modification order of.