From 9b56c490292db395da200c0216bd21d95082fcdb Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 10 Feb 2023 16:51:56 +0200 Subject: [PATCH] Added -> operator --- include/atomic.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/atomic.hpp b/include/atomic.hpp index 41c03a2..69bf6b8 100644 --- a/include/atomic.hpp +++ b/include/atomic.hpp @@ -190,6 +190,7 @@ public: } operator bool() { return this->Load() != 0; } + T operator->() { return this->Load(); } T operator++() { return this->FetchAdd(1) + 1; } T operator--() { return this->FetchSub(1) - 1; } T operator++(int) { return this->FetchAdd(1); }