atomicOp

fnTailShared!T atomicOp(string op, T, V1)(ref shared T val, V1 mod) if (__traits(compiles, mixin("*cast(T*)&val" ~ op ~ "mod"))) pure nothrow @nogc @safe

Performs the binary operation 'op' on val using 'mod' as the modifier.

Parameters

valThe target variable.
modThe modifier to apply.

Returns

The result of the operation.