summaryrefslogtreecommitdiffstats
path: root/core/templates/safe_refcount.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/templates/safe_refcount.h')
-rw-r--r--core/templates/safe_refcount.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/templates/safe_refcount.h b/core/templates/safe_refcount.h
index 8669bcaeeb..bfc9f6fc9a 100644
--- a/core/templates/safe_refcount.h
+++ b/core/templates/safe_refcount.h
@@ -50,11 +50,14 @@
// value and, as an important benefit, you can be sure the value is properly synchronized
// even with threads that are already running.
-// This is used in very specific areas of the engine where it's critical that these guarantees are held
+// These are used in very specific areas of the engine where it's critical that these guarantees are held
#define SAFE_NUMERIC_TYPE_PUN_GUARANTEES(m_type) \
static_assert(sizeof(SafeNumeric<m_type>) == sizeof(m_type)); \
static_assert(alignof(SafeNumeric<m_type>) == alignof(m_type)); \
static_assert(std::is_trivially_destructible<std::atomic<m_type>>::value);
+#define SAFE_FLAG_TYPE_PUN_GUARANTEES \
+ static_assert(sizeof(SafeFlag) == sizeof(bool)); \
+ static_assert(alignof(SafeFlag) == alignof(bool));
template <class T>
class SafeNumeric {