cpp/atomic/atomic ref/operator arith

Atomically increments or decrements the current value of the referenced object. These operations are read-modify-write operations.

@1@ Performs atomic pre-increment. Equivalent to. @2@ Performs atomic post-increment. Equivalent to. @3@ Performs atomic pre-decrement. Equivalent to @4@ Performs atomic post-decrement. Equivalent to.

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 operations otherwise have no undefined behavior. The program is ill-formed if is not an object type.

Parameters
(none)

Return value
@1,3@ The value of the referenced object after the modification. @2,4@ The value of the referenced object before the modification.