diff --git a/luna/include/luna/Atomic.h b/luna/include/luna/Atomic.h index d6be5f93..8f2dd9ff 100644 --- a/luna/include/luna/Atomic.h +++ b/luna/include/luna/Atomic.h @@ -103,6 +103,16 @@ template class Atomic return fetch_sub(1); } + T operator+=(const T& other) + { + return fetch_add(other) + other; + } + + T operator-=(const T& other) + { + return fetch_sub(other) - other; + } + private: T m_value; }; \ No newline at end of file