/Engine/Source/Runtime/Core/Public/Templates/Atomic.h
It is equivalent to this in non-atomic terms:
boolCompareExchange(T& Expected, T Value){ bool bResult = this->Element == Expected; Expected = this->Element; if (bResult) { this->Element = Value; } return bResult; }
Whether the element compared equal to Expected.
bool CompareExchange ( T & Expected, T Value )