Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-124830

error: no matching function for call to ‘holds_alternative<QList<QLspSpecification::TextDocumentEdit> >

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P0: Blocker
    • 6.8
    • 6.8.0 FF
    • Qt Language Server
    • None

    Description

      /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp
      In file included from /home/qt/work/install/include/QtTest/qtest.h:13,
                       from /home/qt/work/install/include/QtTest/QTest:1,
                       from /home/qt/work/install/include/QtQuickTestUtils/6.8.0/QtQuickTestUtils/private/qmlutils_p.h:23,
                       from /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp:5:
      /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp: In lambda function:
      /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp:223:76: error: no matching function for call to ‘holds_alternative<QList<QLspSpecification::TextDocumentEdit> >(QList<std::variant<QLspSpecification::TextDocumentEdit, QLspSpecification::CreateFile, QLspSpecification::RenameFile, QLspSpecification::DeleteFile> >&)’
        223 |                     QVERIFY(std::holds_alternative<QList<TextDocumentEdit>>(docChangeVariant));
            |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
      In file included from /home/qt/work/install/include/QtCore/qtypeinfo.h:11,
                       from /home/qt/work/install/include/QtCore/qglobal.h:47,
                       from /home/qt/work/install/include/QtJsonRpc/qtjsonrpcglobal.h:7,
                       from /home/qt/work/install/include/QtJsonRpc/6.8.0/QtJsonRpc/private/qjsonrpcprotocol_p.h:18,
                       from /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp:3:
      /usr/include/c++/11/variant:1109:5: note: candidate: ‘template<class _Tp, class ... _Types> constexpr bool std::holds_alternative(const std::variant<_Types ...>&)’
       1109 |     holds_alternative(const variant<_Types...>& __v) noexcept
            |     ^~~~~~~~~~~~~~~~~
      /usr/include/c++/11/variant:1109:5: note:   template argument deduction/substitution failed:
      In file included from /home/qt/work/install/include/QtTest/qtest.h:13,
                       from /home/qt/work/install/include/QtTest/QTest:1,
                       from /home/qt/work/install/include/QtQuickTestUtils/6.8.0/QtQuickTestUtils/private/qmlutils_p.h:23,
                       from /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp:5:
      /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp:223:76: note:   ‘QList<std::variant<QLspSpecification::TextDocumentEdit, QLspSpecification::CreateFile, QLspSpecification::RenameFile, QLspSpecification::DeleteFile> >’ is not derived from ‘const std::variant<_Types ...>’
        223 |                     QVERIFY(std::holds_alternative<QList<TextDocumentEdit>>(docChangeVariant));
            |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
      /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp:224:77: error: no matching function for call to ‘get<QList<QLspSpecification::TextDocumentEdit> >(QList<std::variant<QLspSpecification::TextDocumentEdit, QLspSpecification::CreateFile, QLspSpecification::RenameFile, QLspSpecification::DeleteFile> >&)’
        224 |                     auto documentChanges = std::get<QList<TextDocumentEdit>>(docChangeVariant);
            |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
      In file included from /home/qt/work/install/include/QtCore/qglobal.h:15,
                       from /home/qt/work/install/include/QtJsonRpc/qtjsonrpcglobal.h:7,
                       from /home/qt/work/install/include/QtJsonRpc/6.8.0/QtJsonRpc/private/qjsonrpcprotocol_p.h:18,
                       from /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp:3:
      /usr/include/c++/11/utility:223:5: note: candidate: ‘template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(std::pair<_Tp1, _Tp2>&)’
        223 |     get(pair<_Tp1, _Tp2>& __in) noexcept
            |     ^~~
      /usr/include/c++/11/utility:223:5: note:   template argument deduction/substitution failed:
      /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp:224:77: error: type/value mismatch at argument 1 in template parameter list for ‘template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(std::pair<_Tp1, _Tp2>&)’
        224 |                     auto documentChanges = std::get<QList<TextDocumentEdit>>(docChangeVariant);
            |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
      /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp:224:77: note:   expected a constant of type ‘long unsigned int’, got ‘QList<QLspSpecification::TextDocumentEdit>’
      In file included from /home/qt/work/install/include/QtCore/qglobal.h:15,
                       from /home/qt/work/install/include/QtJsonRpc/qtjsonrpcglobal.h:7,
                       from /home/qt/work/install/include/QtJsonRpc/6.8.0/QtJsonRpc/private/qjsonrpcprotocol_p.h:18,
                       from /home/qt/work/qt/qtdeclarative/tests/auto/qmlls/qmlls/tst_qmlls.cpp:3:
      /usr/include/c++/11/utility:228:5: note: candidate: ‘template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(std::pair<_Tp1, _Tp2>&&)’
        228 |     get(pair<_Tp1, _Tp2>&& __in) noexcept
            |     ^~~
      ...
      

      Build log: https://testresults.qt.io/logs/qt/qtdeclarative/37438ff5c482eff62fca0d8d21c25004f824f695/LinuxUbuntu_22_04x86_64LinuxUbuntu_22_04x86_64GCCqtci-linux-Ubuntu-22.04-x86_64-51-c8e992Sccache_UseConfigure/c2e4aed3a89e4614cc1afe5b856ce5dc31569f23/build_1714367465/log.txt.gz

      Details: https://testresults.qt.io/coin/integration/qt/qtdeclarative/tasks/1714367462

      Tested changes (refs/builds/qtci/dev/1714365614):
      https://codereview.qt-project.org/c/qt/qtdeclarative/+/556796/4 qmlls: adapt the qtlanguageserver changes in WorkspaceEdit
      https://codereview.qt-project.org/c/qt/qtdeclarative/+/558068/2 Update dependencies on 'dev' in qt/qtdeclarative

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            janihe Jani Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes