summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qset.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qset.h')
-rw-r--r--src/corelib/tools/qset.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h
index f078e62999..bb817ccb3c 100644
--- a/src/corelib/tools/qset.h
+++ b/src/corelib/tools/qset.h
@@ -71,10 +71,12 @@ public:
inline void swap(QSet<T> &other) noexcept { q_hash.swap(other.q_hash); }
- inline bool operator==(const QSet<T> &other) const
- { return q_hash == other.q_hash; }
- inline bool operator!=(const QSet<T> &other) const
- { return q_hash != other.q_hash; }
+ template <typename U = T>
+ QTypeTraits::compare_eq_result<U> operator==(const QSet<T> &other) const
+ { return q_hash == other.q_hash; }
+ template <typename U = T>
+ QTypeTraits::compare_eq_result<U> operator!=(const QSet<T> &other) const
+ { return q_hash != other.q_hash; }
inline int size() const { return q_hash.size(); }