Using friend function comparison and arithmetic operators, for parameter symmetry.

This commit is contained in:
Mat Sutcliffe
2019-02-27 22:27:34 +00:00
parent 1089adf18d
commit 798a0b8f06
5 changed files with 27 additions and 67 deletions

View File

@@ -265,10 +265,10 @@ namespace BlackMisc
void detach() { m_impl.detach(); }
//! Test for equality.
bool operator ==(const CCollection &other) const { return m_impl == other.m_impl; }
friend bool operator ==(const CCollection &a, const CCollection &b) { return a.m_impl == b.m_impl; }
//! Test for inequality.
bool operator !=(const CCollection &other) const { return m_impl != other.m_impl; }
friend bool operator !=(const CCollection &a, const CCollection &b) { return a.m_impl != b.m_impl; }
private:
QOrderedSet<T> m_impl;