Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.13
-
None
-
QT5 dev branch + VS2017 latest version + windows server 2016
-
-
b337d2a88e5dba8b1e4c01ebe60a7cddc76d05d3 (qt/qtbase/wip/qt6)
Description
A paper(see attachment p1008r1.pdf) voted into the C++20 working draft changes the definition of aggregate such that classes with any user-declared ctors are no longer aggregates.
The MSVC team builds QT5 regularly to detect regressions, and found this failure under our build configuration with the -std:c++latest switch. We are using the following backwards-compatible patch(see attachment qt5_latest_c2127.patch) going forward, which you are free to upstream it if C+20 compatibility is on the library's radar.
You can reproduce this issue on the next released MSVC.
Failures:
D:\QT5\src\qtbase\src\dbus\qdbuserror.cpp(56): error C2127: 'errorMessages': illegal initialization of 'constexpr' entity with a non-constant expression D:\QT5\src\qtbase\include\QtCore\5.13.0\QtCore\private\../../../../../src/corelib/tools/qoffsetstringarray_p.h(187): note: failure was because type 'QOffsetStringArray<unsigned short,1055,29>' is not a literal type D:\QT5\src\qtbase\include\QtCore\5.13.0\QtCore\private\../../../../../src/corelib/tools/qoffsetstringarray_p.h(169): note: type 'QOffsetStringArray<unsigned short,1055,29>' is not a literal type because its data member 'm_string' is of non-literal type 'QtPrivate::StaticString<1055>' D:\QT5\src\qtbase\include\QtCore\5.13.0\QtCore\private\../../../../../src/corelib/tools/qoffsetstringarray_p.h(145): note: type 'QtPrivate::StaticString<1055>' is not a literal type because it is not an aggregate type, a closure type, or does not have a constexpr constructor that is not a copy or move constructor