summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2020-02-24 09:06:31 +0100
committerOlivier Goffart <ogoffart@woboq.com>2020-02-25 15:43:15 +0100
commit5e908ada6759b27cd50cf860b8028f8bd0d6c94c (patch)
tree2ad3bc074d4fc3ef4995a1aa8484340a4b622bcc /src/corelib/kernel/qmetatype.h
parent658b9697f9d85d4ed294810b4f60bafdbdd8e247 (diff)
Fix crashes with MSVC 2019
Apparently the compiler bug causing MSVC to mix lambdas is not fixed in MSVC 2019 Fixes: QTBUG-82405 Change-Id: Ifafde3497ff264cda931ebfba79fcef1d5130510 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qmetatype.h')
-rw-r--r--src/corelib/kernel/qmetatype.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index f9d7fe9f03..7e10be7def 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -2658,8 +2658,8 @@ public:
// Workaround for https://bugs.llvm.org/show_bug.cgi?id=44554 : Every lambda used for initializing
// static members need a different signature for explicit instentiation
#define QT_METATYPE_CONSTEXPRLAMDA(...) [](std::integral_constant<int, __COUNTER__> = {}) constexpr __VA_ARGS__ ()
-#elif defined(Q_CC_MSVC) && Q_CC_MSVC < 1920
-// Workaround a bug with 'if constexpr' not working in lambda that are not generic in MSVC 2017
+#elif defined(Q_CC_MSVC)
+// Workaround a bug with 'if constexpr' not working in lambda that are not generic in MSVC
#define QT_METATYPE_CONSTEXPRLAMDA(...) [](auto) constexpr __VA_ARGS__ (0)
#else
#define QT_METATYPE_CONSTEXPRLAMDA(...) []() constexpr __VA_ARGS__ ()