Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
6.1.0, 6.1.1
-
None
Description
Qt 6.1 and 6.1.1RC with MSVC 2019 16.10.31321.278 both fail on compilation of a cmake project set to c++ 20 standard with:
C:\Qt\6.1.1\msvc2019_64\include\QtCore/qproperty.h(53): fatal error C1083: Cannot open include file: 'experimental/source_location': No such file or directory
Changing L53 to
#include <source_location>
fixes this error.
Compilation now fails with:
C:\Qt\6.1.1\msvc2019_64\include\QtCore/qproperty.h(100): error C3083: 'experimental': the symbol to the left of a '::' must be a type
Changing L100 to
QPropertyBindingSourceLocation(const std::source_location &cppLocation)
will successfully build the application.
CMAKE Compiler output:
"The CXX compiler identification is MSVC 19.29.30037.0"
Relevant CMake setup:
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /arch:AVX2 /Qpar /EHsc /Gw /Gy /std:c++latest")
This may be sort of related to QTBUG-93270/QTBUG-93966.