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

tst_qpromise fails to compile with C++20 standard enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.1.1, 6.2.0 Alpha
    • 6.2
    • Core: Threads
    • None
    • Linux/X11
    • 7cdf77f5e781edb891bcef1c3cf041e2b5519e2b (qt/qtbase/dev) ac55ee919abf0e8248945fc5b9147922baa0c576 (qt/qtbase/6.1)

    Description

      Integration https://testresults.qt.io/coin/integration/qt/qt5/tasks/web_qt_qt5_1618908361021

      Log https://testresults.qt.io/coin/logview/qt/qtbase/4bdd400a54a7c2dc6c6b83bc68c9c4f83dd75068/LinuxUbuntu_20_04x86_64LinuxUbuntu_20_04x86_64GCCqtci-linux-Ubuntu-20.04-x86_64-50-4c6f13Documentation_Sccache/f3a59fb451a3233c43f3f4f1234fbef863eef9c8/build_1618910418

      Change https://codereview.qt-project.org/c/qt/qt5/+/343461

      Tested compiler gcc 9.3.0. It's possible that the gcc is too old for this?

      Failure

      FAILED: tests/auto/corelib/thread/qpromise/CMakeFiles/tst_qpromise.dir/tst_qpromise.cpp.o 
      
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp: In member function ‘void tst_QPromise::addInThread()’:
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:344:75: error: no matching function for call to ‘CopyOnlyType::CopyOnlyType()’
         344 |     RUN_TEST_FUNC(testAddResult, QPromise(), CopyOnlyType{99});
             |                                                                           ^
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:103:10: note: in definition of macro ‘RUN_TEST_FUNC’
         103 |     test(__VA_ARGS__); \
             |          ^~~~~~~~~~~
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:82:5: note: candidate: ‘constexpr CopyOnlyType::CopyOnlyType(const CopyOnlyType&)’
          82 |     CopyOnlyType(const CopyOnlyType &) = default;
             |     ^~~~~~~~~~~~
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:82:18: note:   no known conversion for argument 1 from ‘int’ to ‘const CopyOnlyType&’
          82 |     CopyOnlyType(const CopyOnlyType &) = default;
             |                  ^~~~~~~~~~~~~~~~~~~~
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:81:5: note: candidate: ‘constexpr CopyOnlyType::CopyOnlyType()’
          81 |     CopyOnlyType() = default;
             |     ^~~~~~~~~~~~
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:81:5: note:   candidate expects 0 arguments, 1 provided
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp: In lambda function:
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:358:37: error: no matching function for call to ‘MoveOnlyType::MoveOnlyType()’
         358 |         p.addResult(MoveOnlyType{-11});
             |                                     ^
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:91:5: note: candidate: ‘constexpr MoveOnlyType::MoveOnlyType(MoveOnlyType&&)’
          91 |     MoveOnlyType(MoveOnlyType &&) = default;
             |     ^~~~~~~~~~~~
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:91:18: note:   no known conversion for argument 1 from ‘int’ to ‘MoveOnlyType&&’
          91 |     MoveOnlyType(MoveOnlyType &&) = default;
             |                  ^~~~~~~~~~~~~~~
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:90:5: note: candidate: ‘constexpr MoveOnlyType::MoveOnlyType()’
          90 |     MoveOnlyType() = default;
             |     ^~~~~~~~~~~~
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:90:5: note:   candidate expects 0 arguments, 1 provided
       In file included from /home/qt/work/install/include/QtTest/qtest.h:45,
                        from /home/qt/work/install/include/QtTest/QTest:1,
                        from /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:33:
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp: In member function ‘void tst_QPromise::addInThreadMoveOnlyObject()’:
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:363:42: error: no matching function for call to ‘MoveOnlyType::MoveOnlyType()’
         363 |         QCOMPARE(result, MoveOnlyType{-11});
             |                                          ^
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:91:5: note: candidate: ‘constexpr MoveOnlyType::MoveOnlyType(MoveOnlyType&&)’
          91 |     MoveOnlyType(MoveOnlyType &&) = default;
             |     ^~~~~~~~~~~~
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:91:18: note:   no known conversion for argument 1 from ‘int’ to ‘MoveOnlyType&&’
          91 |     MoveOnlyType(MoveOnlyType &&) = default;
             |                  ^~~~~~~~~~~~~~~
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:90:5: note: candidate: ‘constexpr MoveOnlyType::MoveOnlyType()’
          90 |     MoveOnlyType() = default;
             |     ^~~~~~~~~~~~
       /home/qt/work/qt/qtbase/tests/auto/corelib/thread/qpromise/tst_qpromise.cpp:90:5: note:   candidate expects 0 arguments, 1 provided
      

      Attachments

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

        Activity

          People

            peppe Giuseppe D'Angelo
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes