Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qglobalstatic.h File Reference

(a72077a88903fe532f6a749677eb4da4ea99f79f)

#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, ...)

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,
... )
Value:
Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, (__VA_ARGS__))
#define Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ARGS)
const char * TYPE

Definition at line 125 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

Definition at line 110 of file qglobalstatic.h.