Effects: Atomically replaces the value referenced by *ptr with
the result of the computation applied to the value referenced by *ptr
and the given operand.
Memory is affected according to the value of order.
These operations are atomic read-modify-write operations ([intro.races]).
Remarks: Except for fetch_max and fetch_min, for signed integer types
the result is as if the object value and parameters
were converted to their corresponding unsigned types,
the computation performed on those types, and
the result converted back to the signed type.
For fetch_max and fetch_min, the maximum and minimum
computation is performed as if by max and min
algorithms ([alg.min.max]), respectively,
with the object value and the first parameter as the arguments.
Effects: Atomically replaces the value referenced by *ptr
with the result of the computation applied to
the value referenced by *ptr and the given operand.
Memory is affected according to the value of order.
These operations are atomic modify-write operations ([atomics.order]).
Remarks: Except for store_max and store_min,
for signed integer types,
the result is as if *ptr and parameters
were converted to their corresponding unsigned types,
the computation performed on those types, and
the result converted back to the signed type.
There are no undefined results arising from the computation.
— end note]
For store_max and store_min,
the maximum and minimum computation is performed
as if by max and min algorithms ([alg.min.max]), respectively,
with *ptr and the first parameter as the arguments.