cpp/atomic/atomic/fetch sub

Atomically replaces the current value with the result of arithmetic subtraction of the value and. That is, it performs atomic post-decrement. The operation is 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.