refs #345 Private::Attribute: friend function operators for symmetry/consistency.

This commit is contained in:
Mathew Sutcliffe
2014-10-30 20:50:09 +00:00
parent 8f7c10f306
commit ff9612115b

View File

@@ -128,12 +128,12 @@ namespace BlackMisc
T &m_obj;
QString m_jsonName;
bool operator ==(const Attribute &other) const { return m_obj == other.m_obj; }
bool operator !=(const Attribute &other) const { return m_obj != other.m_obj; }
bool operator <(const Attribute &other) const { return m_obj < other.m_obj; }
bool operator <=(const Attribute &other) const { return m_obj <= other.m_obj; }
bool operator >(const Attribute &other) const { return m_obj > other.m_obj; }
bool operator >=(const Attribute &other) const { return m_obj >= other.m_obj; }
friend bool operator ==(const Attribute &a, const Attribute &b) { return a.m_obj == b.m_obj; }
friend bool operator !=(const Attribute &a, const Attribute &b) { return a.m_obj != b.m_obj; }
friend bool operator <(const Attribute &a, const Attribute &b) { return a.m_obj < b.m_obj; }
friend bool operator <=(const Attribute &a, const Attribute &b) { return a.m_obj <= b.m_obj; }
friend bool operator >(const Attribute &a, const Attribute &b) { return a.m_obj > b.m_obj; }
friend bool operator >=(const Attribute &a, const Attribute &b) { return a.m_obj >= b.m_obj; }
};
// Helpers used in tie(), tieMeta(), and elsewhere, which arrange for the correct types to be passed to std::make_tuple.