Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. noexcept build errors after updating to 6.9.0

noexcept build errors after updating to 6.9.0

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 108 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GregB
    wrote last edited by
    #1

    I am building a Qt console application in Linux and am getting build errors after updating Qt. I am building on RockyLinux 8.10. The program built fine with 6.6.3, but now I get the following errors after updating to 6.9.0

    This error repeats over and over. The first and last lines of this snippet show the error.

    ../../../Qt/6.9.0/gcc_64/include/QtCore/qcomparehelpers.h:160:34: error: static assertion failed: Use *_NON_NOEXCEPT version of the macro, or make the helper function noexcept
         static_assert(!noexcept(f()) || noexcept(Func(lhs, rhs)), \
                       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../../Qt/6.9.0/gcc_64/include/QtCore/qoverload.h:72:32: note: in definition of macro ‘QT_VA_ARGS_EXPAND’
     #define QT_VA_ARGS_EXPAND(...) __VA_ARGS__ // Needed for MSVC
                                    ^~~~~~~~~~~
    ../../../Qt/6.9.0/gcc_64/include/QtCore/qcomparehelpers.h:300:9: note: in expansion of macro ‘QT_COMPARISON_NOEXCEPT_CHECK’
             QT_COMPARISON_NOEXCEPT_CHECK(Noexcept, comparesEqual); \
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../../Qt/6.9.0/gcc_64/include/QtCore/qcomparehelpers.h:470:5: note: in expansion of macro ‘QT_DECLARE_EQUALITY_OPERATORS_HELPER’
         QT_DECLARE_EQUALITY_OPERATORS_HELPER(LeftType, RightType, /* non-constexpr */, \
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../../Qt/6.9.0/gcc_64/include/QtCore/qoverload.h:74:49: note: in expansion of macro ‘QT_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT_2’
     #define QT_OVERLOADED_MACRO_EXPAND(MACRO, ARGC) MACRO##_##ARGC
                                                     ^~~~~
    ../../../Qt/6.9.0/gcc_64/include/QtCore/qoverload.h:75:46: note: in expansion of macro ‘QT_OVERLOADED_MACRO_EXPAND’
     #define QT_OVERLOADED_MACRO_IMP(MACRO, ARGC) QT_OVERLOADED_MACRO_EXPAND(MACRO, ARGC)
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../../Qt/6.9.0/gcc_64/include/QtCore/qoverload.h:76:59: note: in expansion of macro ‘QT_OVERLOADED_MACRO_IMP’
     #define QT_OVERLOADED_MACRO(MACRO, ...) QT_VA_ARGS_EXPAND(QT_OVERLOADED_MACRO_IMP(MACRO, QT_VA_ARGS_COUNT(__VA_ARGS__))(__VA_ARGS__))
                                                               ^~~~~~~~~~~~~~~~~~~~~~~
    ../../../Qt/6.9.0/gcc_64/include/QtCore/qcomparehelpers.h:495:5: note: in expansion of macro ‘QT_OVERLOADED_MACRO’
         QT_OVERLOADED_MACRO(QT_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT, __VA_ARGS__)
         ^~~~~~~~~~~~~~~~~~~
    ../../../Qt/6.9.0/gcc_64/include/QtCore/qjsonobject.h:326:5: note: in expansion of macro ‘Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT’
         Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT(QJsonObject, QJsonValue)
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../../Qt/6.9.0/gcc_64/include/QtCore/qjsonobject.h: In function ‘bool operator==(const QJsonObject&, const QJsonValueConstRef&)’:
    ../../../Qt/6.9.0/gcc_64/include/QtCore/qcomparehelpers.h:160:34: error: static assertion failed: Use *_NON_NOEXCEPT version of the macro, or make the helper function noexcept
         static_assert(!noexcept(f()) || noexcept(Func(lhs, rhs)), \
                       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote last edited by Christian Ehrlicher
      #2

      What gcc version do you use? When does the error occour? By simply including a Qt header in a simple main.cpp or what else?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GregB
        wrote last edited by
        #3

        @Christian-Ehrlicher I'm using gcc 8.5.0
        I honestly can't tell where in the code the error is occuring because the output is so long. I've been building this applciation for years using various versions of Qt, but I haven't seen these errors before. It builds without error under Qt 6.6.3.

        I can try a simple program to see if I also get the errors there.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved