Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT
-
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) errorsThe 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.7Online, 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) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
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.