Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
None
-
Qt Creator 11.0.0-beta1
-
None
-
OS: Windows server 2022
VS: VS2022 17.5.4
Description
QTCreator failed to build due to error C2664 with msvc under option /std:c++latest. Could you please help look this issue? Thanks.
Repro steps:
- Open x64 Native Tools Command Prompt for VS2022.
- git clone https://github.com/qt-creator/qt-creator F:\gitP\qt-creator\qt-creator
- git -C "F:\gitP\qt-creator\qt-creator" reset --hard f5aa99f
- git -C "F:\gitP\qt-creator\qt-creator" submodule sync
- git -C "F:\gitP\qt-creator\qt-creator" submodule update --init --recursive
- set CL= /std:c++latest
- mkdir F:\gitP\qt-creator\qt-creator\build_amd64 and cd F:\gitP\qt-creator\qt-creator\build_amd64
- cmake -DCMAKE_BUILD_TYPE=Release -G Ninja "-DCMAKE_PREFIX_PATH=F:\tools\qt6\qt\6.3.2\msvc2019_64;F:\tools\libclang-release_130-based-windows-vs2019_64\libclang" ..
- set CL=/D_HAS_DEPRECATED_RESULT_OF=1 /D_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING %CL%
- set CL=%CL% /Zc:rewrittenExpressions-
- cmake --build . --config Release --verbose
Error info:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\include\numeric(32): error C2664: 'QByteArray CMakeProjectManager::CMakeConfigurationKitAspect::computeDefaultConfigHash::<lambda_1>::operator ()(QByteArray &,const CMakeProjectManager::CMakeConfigItem &) const': cannot convert argument 1 from 'QByteArray' to 'QByteArray &'