We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6da1e96 commit 3095d19Copy full SHA for 3095d19
provides/include/mcs_v1/synopsis.hpp
@@ -20,6 +20,9 @@ struct holder : Private::holder_t {
20
holder &operator=(const holder &) = delete;
21
};
22
23
+// Holders are no larger than pointers.
24
+static_assert(sizeof(holder) <= sizeof(void *));
25
+
26
/// Type of lock objects.
27
struct lock : Private::lock_t {
28
/// Constructs a lock by zero initializing it.
@@ -50,4 +53,7 @@ struct lock : Private::lock_t {
50
53
holding(Action &&action, unsigned max_spin_count = default_max_spin_count);
51
54
52
55
56
+// Locks are no larger than pointers.
57
+static_assert(sizeof(lock) <= sizeof(void *));
58
59
} // namespace mcs_v1
0 commit comments