Core/ObjectRef: Add comparison operators

Former-commit-id: 87b6480dfad8fd49da249890c62e698afdcfca8e [formerly 3d82a1d9f1f0358975b23a25274ac4a8c75ef37f]
Former-commit-id: 9031aab557ae8c9b89025725fa65f0309b5b32ee
This commit is contained in:
Lynix
2016-06-20 13:10:09 +02:00
parent c7d4f7ca83
commit 499f9e0dff
2 changed files with 262 additions and 2 deletions

View File

@@ -44,8 +44,33 @@ namespace Nz
T* m_object;
};
template<typename T> struct PointedType<ObjectRef<T>> {typedef T type;};
template<typename T> struct PointedType<ObjectRef<T> const> {typedef T type;};
template<typename T> bool operator==(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs);
template<typename T> bool operator==(const T& lhs, const ObjectRef<T>& rhs);
template<typename T> bool operator==(const ObjectRef<T>& lhs, const T& rhs);
template<typename T> bool operator!=(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs);
template<typename T> bool operator!=(const T& lhs, const ObjectRef<T>& rhs);
template<typename T> bool operator!=(const ObjectRef<T>& lhs, const T& rhs);
template<typename T> bool operator<(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs);
template<typename T> bool operator<(const T& lhs, const ObjectRef<T>& rhs);
template<typename T> bool operator<(const ObjectRef<T>& lhs, const T& rhs);
template<typename T> bool operator<=(const ObjectRef<T>, const ObjectRef<T>& rhs);
template<typename T> bool operator<=(const T& lhs, const ObjectRef<T>& rhs);
template<typename T> bool operator<=(const ObjectRef<T>& lhs, const T& rhs);
template<typename T> bool operator>(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs);
template<typename T> bool operator>(const T& lhs, const ObjectRef<T>& rhs);
template<typename T> bool operator>(const ObjectRef<T>& lhs, const T& rhs);
template<typename T> bool operator>=(const ObjectRef<T>& lhs, const ObjectRef<T>& rhs);
template<typename T> bool operator>=(const T& lhs, const ObjectRef<T>& rhs);
template<typename T> bool operator>=(const ObjectRef<T>& lhs, const T& rhs);
template<typename T> struct PointedType<ObjectRef<T>> { typedef T type; };
template<typename T> struct PointedType<ObjectRef<T> const> { typedef T type; };
}
#include <Nazara/Core/ObjectRef.inl>