summaryrefslogtreecommitdiff
path: root/include/my_atomic_wrapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_atomic_wrapper.h')
-rw-r--r--include/my_atomic_wrapper.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/my_atomic_wrapper.h b/include/my_atomic_wrapper.h
index c0e18ea7c91..b256ba1069a 100644
--- a/include/my_atomic_wrapper.h
+++ b/include/my_atomic_wrapper.h
@@ -41,7 +41,9 @@ public:
Atomic_relaxed(Type val) : m(val) {}
Atomic_relaxed() {}
- operator Type() const { return m.load(std::memory_order_relaxed); }
+ Type load(std::memory_order o= std::memory_order_relaxed) const
+ { return m.load(o); }
+ operator Type() const { return load(); }
Type operator=(const Type val)
{ m.store(val, std::memory_order_relaxed); return val; }
Type operator=(const Atomic_relaxed<Type> &rhs) { return *this= Type{rhs}; }