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. Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT
Qt 6.11 is out! See what's new in the release blog

Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 146 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.
  • J Offline
    J Offline
    james b-s
    wrote last edited by james b-s
    #1

    We are in the process of upgrading to Qt6.8 from Qt5.15. gcc11

    Our entire code base compiles with Qt6.8 (after replacing a bunch of obsolete methods).

    I'm trying to build a library called QtNodes and I'm getting a lot of
    Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT(QUrlQuery) errors

    The author of QtNodes made a bunch of suggestions, none of which are possible for us at this time.
    • upgrade GCC to 12 or 13
    • or use clang >=14
    • or downgrade Qt to <6.7

    Online, I found an option which looks like it would fix the problem, but it doesn't seem to. I added
    -DQT_ENABLE_STRICT_MODE_UP_TO=0x060600
    to the command line, but it didn't make a difference.

    Anyone have any suggestions?

    Here is one example

    In file included from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qglobal.h:63,
                     from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qnamespace.h:12,
                     from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qobjectdefs.h:12,
                     from /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/QMetaObject:1,
                     from /fa/sw/qtnodes/v3-08-jbf2-02/build/QtNodes_autogen/MEDHIFJ22Y/../../../include/QtNodes/internal/Definitions.hpp:5,
                     from /fa/sw/qtnodes/v3-08-jbf2-02/build/QtNodes_autogen/MEDHIFJ22Y/../../../include/QtNodes/internal/ConnectionIdHash.hpp:5,
                     from /fa/sw/qtnodes/v3-08-jbf2-02/build/QtNodes_autogen/MEDHIFJ22Y/../../../include/QtNodes/internal/AbstractGraphModel.hpp:3,
                     from /fa/sw/qtnodes/v3-08-jbf2-02/build/QtNodes_autogen/MEDHIFJ22Y/moc_AbstractGraphModel.cpp:9,
                     from /fa/sw/qtnodes/v3-08-jbf2-02/build/QtNodes_autogen/mocs_compilation.cpp:2:
    /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qmetatype.h: In function ‘bool operator==(const QMetaType&, const QMetaType&)’:
    /fa/sw/qt/6.8-02/amd64_gcc11_pic/install/6.8.0/gcc_64/include/QtCore/qmetatype.h:536:5: error: static assertion failed: Use *_NON_NOEXCEPT version of the macro, or make the helper function noexcept
         Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT(QMetaType)
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    
    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote last edited by
      #2

      Use a recent Qt 6.8 version to see if it helps. If it still fails, provide a minimal compilable example to reproduce the problem.

      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

      • Login

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