The mysterious comment was just suggesting that they weren't
necessary. Turns out the comment is wrong: they are necessary for
non-strict iterator modes.
Task-number: QTBUG-25063
Change-Id: I20ada17035642ee656c431d6bf2152a5243cecdb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
inline iterator &operator+=(int j) { return *this = *this + j; }
inline iterator &operator-=(int j) { return *this = *this - j; }
- // ### Qt 5: not sure this is necessary anymore
-#ifdef QT_STRICT_ITERATORS
- private:
-#else
+#ifndef QT_STRICT_ITERATORS
public:
-#endif
inline bool operator==(const const_iterator &o) const
{ return i == o.i; }
inline bool operator!=(const const_iterator &o) const
{ return i != o.i; }
+#endif
};
friend class iterator;
inline iterator &operator+=(int j) { return *this = *this + j; }
inline iterator &operator-=(int j) { return *this = *this - j; }
-#ifdef QT_STRICT_ITERATORS
- private:
-#else
+#ifndef QT_STRICT_ITERATORS
public:
-#endif
inline bool operator==(const const_iterator &o) const
{ return i == o.i; }
inline bool operator!=(const const_iterator &o) const
{ return i != o.i; }
+#endif
friend class QMap<Key, T>;
};
friend class iterator;