summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobalstatic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qglobalstatic.h')
-rw-r--r--src/corelib/global/qglobalstatic.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/global/qglobalstatic.h b/src/corelib/global/qglobalstatic.h
index e56fe1dbcb..d1e1107f95 100644
--- a/src/corelib/global/qglobalstatic.h
+++ b/src/corelib/global/qglobalstatic.h
@@ -44,6 +44,8 @@
#include <QtCore/qatomic.h>
+#include <type_traits>
+
QT_BEGIN_NAMESPACE
namespace QtGlobalStatic {
@@ -86,7 +88,7 @@ enum GuardValues {
static struct Holder : public HolderBase { \
Type value; \
Holder() \
- noexcept(noexcept(Type ARGS)) \
+ noexcept(noexcept(typename std::remove_cv<Type>::type ARGS)) \
: value ARGS \
{ guard.storeRelaxed(QtGlobalStatic::Initialized); } \
} holder; \