Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qglobalstatic.h File Reference

(143bcbb96f512d8e4014f0abba99f8e7a8729499)

#include <QtCore/qassert.h>
#include <QtCore/qatomic.h>
#include <QtCore/qtclasshelpermacros.h>
#include <atomic>
#include <type_traits>
+ Include dependency graph for qglobalstatic.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  QtGlobalStatic::Holder< QGS >
 
struct  QGlobalStatic< Holder >
 

Namespaces

namespace  QtGlobalStatic
 

Macros

#define Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ARGS)
 
#define Q_GLOBAL_STATIC(TYPE, NAME, ...)    Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, (__VA_ARGS__))
 

Enumerations

enum  QtGlobalStatic::GuardValues { QtGlobalStatic::Destroyed = -2 , QtGlobalStatic::Initialized = -1 , QtGlobalStatic::Uninitialized = 0 , QtGlobalStatic::Initializing = 1 }
 

Macro Definition Documentation

◆ Q_GLOBAL_STATIC

#define Q_GLOBAL_STATIC ( TYPE,
NAME,
... )    Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, (__VA_ARGS__))

Definition at line 124 of file qglobalstatic.h.

◆ Q_GLOBAL_STATIC_WITH_ARGS

#define Q_GLOBAL_STATIC_WITH_ARGS ( TYPE,
NAME,
ARGS )
Value:
QT_WARNING_PUSH \
QT_WARNING_DISABLE_CLANG("-Wunevaluated-expression") \
namespace { struct Q_QGS_ ## NAME { \
typedef TYPE QGS_Type; \
static void innerFunction(void *pointer) \
noexcept(noexcept(std::remove_cv_t<QGS_Type> ARGS)) \
{ \
new (pointer) QGS_Type ARGS; \
} \
}; } \
Q_CONSTINIT static QGlobalStatic<QtGlobalStatic::Holder<Q_QGS_ ## NAME>> NAME; \
#define QT_WARNING_POP
GLsizei const void * pointer
Definition qopenglext.h:384
const char * TYPE

Definition at line 109 of file qglobalstatic.h.