Skip to content

Commit

Permalink
QtPrivate::ResultIteratorBase: remove incorrect noexcept
Browse files Browse the repository at this point in the history
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 ed71387.

Found in 6.8 API review.

Pick-to: 6.8
Change-Id: I9014052588a7864b729a7b8ac703f5145675f860
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Marc Mutz <[email protected]>
  • Loading branch information
isolovev committed Aug 28, 2024
1 parent 3cf7eff commit a942a37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/corelib/thread/qresultstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ class Q_CORE_EXPORT ResultIteratorBase

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<int, ResultItem>::const_iterator mapIterator;
int m_vectorIndex;
Expand Down

0 comments on commit a942a37

Please sign in to comment.