From d37960b35ab17fddd6b52862f33f07b82d83145c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 29 Jan 2025 18:19:18 -0800 Subject: [PATCH] QTypeInfo: work around MSVC 2022 bug "isRelocatable: undeclared identifier" Definitely a compiler bug because it passes for everything we threw at the compiler in the CI but fails for a user. At least the workaround is simple. Fixes: QTBUG-133032 Pick-to: 6.8 Change-Id: Ie84590c466cf1d6f01bbfffd3ca1d6c262d77200 Reviewed-by: Irfan Omair Reviewed-by: Marc Mutz (cherry picked from commit 0a5b37b706ee72c7d9042efcde244aa93a5ce9a5) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qtypeinfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index e9dfbc34a4f..bcf365bdf61 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -168,7 +168,7 @@ public: \ isIntegral [[deprecated("Use std::is_integral instead")]] = std::is_integral< TYPE >::value, \ isValueInitializationBitwiseZero = QtPrivate::qIsValueInitializationBitwiseZero, \ }; \ - static_assert(!isRelocatable || \ + static_assert(!QTypeInfo::isRelocatable || \ std::is_copy_constructible_v || \ std::is_move_constructible_v, \ #TYPE " is neither copy- nor move-constructible, so cannot be Q_RELOCATABLE_TYPE"); \