From 67ce24cf30c4b09f98d67e1750d047858f79004f Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Tue, 27 Aug 2024 12:38:29 +0200 Subject: [PATCH] QtPrivate::ResultIteratorBase: remove incorrect noexcept The (in)equality operators cannot be noexcept, because the QMap::const_iterator comparison is not noexcept. QMap::const_iterator basically uses std::map::const_iterator comparison operators, and I could not find any proof that it is noexcept. Amends ed71387d1cc06afff42ac844a3887778685ce793. Found in 6.8 API review. Change-Id: I9014052588a7864b729a7b8ac703f5145675f860 Reviewed-by: Thiago Macieira Reviewed-by: Marc Mutz (cherry picked from commit a942a373051ddab40742f213e36fa5851c97b384) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/thread/qresultstore.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/thread/qresultstore.h b/src/corelib/thread/qresultstore.h index f21068206f3..9744646e381 100644 --- a/src/corelib/thread/qresultstore.h +++ b/src/corelib/thread/qresultstore.h @@ -56,11 +56,11 @@ public: private: friend bool comparesEqual(const ResultIteratorBase &lhs, - const ResultIteratorBase &rhs) noexcept + const ResultIteratorBase &rhs) { return (lhs.mapIterator == rhs.mapIterator && lhs.m_vectorIndex == rhs.m_vectorIndex); } - Q_DECLARE_EQUALITY_COMPARABLE(ResultIteratorBase) + Q_DECLARE_EQUALITY_COMPARABLE_NON_NOEXCEPT(ResultIteratorBase) protected: QMap::const_iterator mapIterator; int m_vectorIndex;