14#ifndef IOX2_BB_DESIGN_STATIC_LIFETIME_GUARD_HPP
15#define IOX2_BB_DESIGN_STATIC_LIFETIME_GUARD_HPP
83 unsigned char data[
sizeof(
T)];
86 static constexpr uint32_t UNINITIALIZED { 0 };
87 static constexpr uint32_t INITALIZING { 1 };
88 static constexpr uint32_t INITALIZED { 2 };
92 static storage_t s_storage;
93 static concurrent::Atomic<uint64_t> s_count;
94 static concurrent::Atomic<uint32_t> s_instanceState;
98 static void destroy();
119#include "iox2/legacy/detail/static_lifetime_guard.inl"
Manages a static instance of type T in a way so that each existing StaticLifetimeGuard prevents the d...
static uint64_t setCount(uint64_t count)
Set the instance life time count.
static T & instance(Args &&... args) noexcept
Construct the instance to be guarded with constructor arguments.
StaticLifetimeGuard() noexcept
static uint64_t count()
Get the current count value.
constexpr bool always_false_v
Helper value to bind a static_assert to a type.