Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-29136

[MSVC] QTCreator failed to build due to error C2664 with option /std:c++latest

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • Qt Creator 11.0.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • OS: Windows server 2022
      VS: VS2022 17.5.4
    • Windows

    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:

      1. Open x64 Native Tools Command Prompt for VS2022.
      2. git clone https://github.com/qt-creator/qt-creator F:\gitP\qt-creator\qt-creator
      3. git -C "F:\gitP\qt-creator\qt-creator" reset --hard f5aa99f
      4. git -C "F:\gitP\qt-creator\qt-creator" submodule sync
      5. git -C "F:\gitP\qt-creator\qt-creator" submodule update --init --recursive
      6. set CL= /std:c++latest
      7. mkdir F:\gitP\qt-creator\qt-creator\build_amd64 and cd F:\gitP\qt-creator\qt-creator\build_amd64
      8. 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" .. 
      9. set CL=/D_HAS_DEPRECATED_RESULT_OF=1 /D_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING %CL%
      10. set CL=%CL% /Zc:rewrittenExpressions-
      11. 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 &'

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            june_liu June Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes