9 #ifndef CPPCOMMON_UTILITY_STATIC_CONSTRUCTOR_H
10 #define CPPCOMMON_UTILITY_STATIC_CONSTRUCTOR_H
15 #pragma GCC diagnostic push
16 #pragma GCC diagnostic ignored "-Waddress"
17 #elif defined(_MSC_VER)
19 #pragma warning(disable: 4127)
47 template <
void (*construct)(),
void (*destruct)() =
nullptr>
61 if (construct !=
nullptr)
67 if (destruct !=
nullptr)
76 #pragma GCC diagnostic pop
77 #elif defined(_MSC_VER)
Static constructor pattern.
static constructor instance
Static constructor instance.
C++ Common project definitions.
Static constructor pattern inline implementation.