cpp/atomic/atomic ref/operator arith2

Atomically replaces the current value of the referenced object with the result of computation involving the previous value and. These operations are read-modify-write operations.

@1@ Performs atomic addition. Equivalent to. @2@ Performs atomic subtraction. Equivalent to. @3@ Performs atomic bitwise and. Equivalent to. @4@ Performs atomic bitwise or. Equivalent to. @5@ Performs atomic bitwise exclusive or. Equivalent to.

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

For floating-point types, the floating-point environment in effect may be different from the calling thread's floating-point environment. The operation need not be conform to the corresponding std traits but is encouraged to do so. If the result is not a representable value for its type, the result is unspecified but the operation otherwise has no undefined behavior.

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.

Return value
The resulting value (that is, the result of applying the corresponding binary operator to the value immediately preceding the effects of the corresponding member function).