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

error C2678: binary '==': no operator found which takes a left-hand operand of type 'const _Ty'

    XMLWordPrintable

Details

    • Windows
    • c2e4f9f2a2e095a2bf83a50be27c8c090b9f5f38 (qt-creator/tqtc-qt-creator/4.15)

    Description

      Hi All,

      QTCreator latest code (master 872660f) failed to build with /std:c++latest on MSVC. Can you help look at this issue? Thanks!

      BTW, We also used several options to disable some c++20 behaviors to unblock the build, do you have plan to fix them? I can provide build logs.

      Build steps:

      1. git clone git://code.qt.io/qt-creator/qt-creator qt-creator
      2. cd qt-creator
      3. set CL=/D_HAS_AUTO_PTR_ETC=1 /D_HAS_DEPRECATED_RESULT_OF=1 /D_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING /D_HAS_DEPRECATED_UNCAUGHT_EXCEPTION=1 /D_SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING /std:c++latest /permissive /Zc:rewrittenExpressions-
      4. set PATH=F:\gitP\qt-creator\qt-creator\..\qt\msvc2017_64\bin;%PATH%
      5. set PATH=F:\gitP\qt-creator\qt-creator\..\jom_1_1_2;%PATH%
      6. qmake -r qtcreator.pro
      7. jom /U

      Error info:
      *

      kitmanager.cpp
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\include\xmemory(1966): error C2678: binary '==': no operator found which takes a left-hand operand of type 'const _Ty' (or there is no acceptable conversion)
       with
       [
       _Ty=ProjectExplorer::KitManager::restoreKits::<lambda_1>
       ]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\include\variant(1738): note: could be 'bool std::operator ==(std::monostate,std::monostate) noexcept' [found using argument-dependent lookup]
      F:\gitP\qt-creator\qt-creator\src\plugins\projectexplorer\task.h(136): note: or 'bool ProjectExplorer::operator ==(const ProjectExplorer::Task &,const ProjectExplorer::Task &)' [found using argument-dependent lookup]
      F:\gitP\qt-creator\qt-creator\src\plugins\projectexplorer\deployablefile.h(66): note: or 'bool ProjectExplorer::operator ==(const ProjectExplorer::DeployableFile &,const ProjectExplorer::DeployableFile &)' [found using argument-dependent lookup]
      F:\gitP\qt-creator\qt-creator\src\plugins\projectexplorer\projectmacro.h(95): note: or 'bool ProjectExplorer::operator ==(const ProjectExplorer::Macro &,const ProjectExplorer::Macro &)' [found using argument-dependent lookup]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\include\variant(1738): note: or 'bool std::operator ==(std::monostate,std::monostate) noexcept' [synthesized expression 'y == x']
      F:\gitP\qt-creator\qt-creator\src\plugins\projectexplorer\task.h(136): note: or 'bool ProjectExplorer::operator ==(const ProjectExplorer::Task &,const ProjectExplorer::Task &)' [synthesized expression 'y == x']
      F:\gitP\qt-creator\qt-creator\src\plugins\projectexplorer\deployablefile.h(66): note: or 'bool ProjectExplorer::operator ==(const ProjectExplorer::DeployableFile &,const ProjectExplorer::DeployableFile &)' [synthesized expression 'y == x']
      F:\gitP\qt-creator\qt-creator\src\plugins\projectexplorer\projectmacro.h(95): note: or 'bool ProjectExplorer::operator ==(const ProjectExplorer::Macro &,const ProjectExplorer::Macro &)' [synthesized expression 'y == x']
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\include\xmemory(1966): note: while trying to match the argument list '(std::unique_ptr<ProjectExplorer::Kit,std::default_delete<ProjectExplorer::Kit>>, const _Ty)'
       with
       [
       _Ty=ProjectExplorer::KitManager::restoreKits::<lambda_1>
       ]
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.28.29910\include\xmemory(2006): note: see reference to function template instantiation '_FwdIt std::remove<std::unique_ptr<ProjectExplorer::Kit,std::default_delete<ProjectExplorer::Kit>>*,_Uty>(_FwdIt,const _FwdIt,const _Ty &)' being compiled
       with
       [
       _FwdIt=std::unique_ptr<ProjectExplorer::Kit,std::default_delete<ProjectExplorer::Kit>> *,
       _Uty=ProjectExplorer::KitManager::restoreKits::<lambda_1>,
       _Ty=ProjectExplorer::KitManager::restoreKits::<lambda_1>
       ]
      

      *

      Attachments

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

        Activity

          People

            con Eike Ziller
            quellazhang Quella Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes