diff options
Diffstat (limited to 'src/corelib/thread/qfuture.h')
-rw-r--r-- | src/corelib/thread/qfuture.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/thread/qfuture.h b/src/corelib/thread/qfuture.h index 5939a93780..3945df066a 100644 --- a/src/corelib/thread/qfuture.h +++ b/src/corelib/thread/qfuture.h @@ -183,8 +183,6 @@ QT_WARNING_POP { future = o.future; index = o.index; return *this; } inline const T &operator*() const { return future->d.resultReference(index); } inline const T *operator->() const { return future->d.resultPointer(index); } - inline bool operator!=(const const_iterator &other) const { return index != other.index; } - inline bool operator==(const const_iterator &o) const { return !operator!=(o); } inline const_iterator &operator++() { index = advanceIndex(index, 1); return *this; } inline const_iterator &operator--() @@ -213,6 +211,12 @@ QT_WARNING_POP { return const_iterator(k.future, k.advanceIndex(k.index, j)); } private: + friend bool comparesEqual(const const_iterator &lhs, const const_iterator &rhs) noexcept + { + return lhs.index == rhs.index; + } + Q_DECLARE_EQUALITY_COMPARABLE(const_iterator) + /*! \internal Advances the iterator index \a idx \a n steps, waits for the |