Core/ObjectRef: Add comparison operators

Former-commit-id: 74028870996d72cb0fa707c27342c892168f8fe4 [formerly 0eb6bb74988e76213f9e534a376b1c0af14a7c92]
Former-commit-id: 006289f7a338a263f91832039850751e685b9ceb
This commit is contained in:
Lynix
2016-06-20 13:10:09 +02:00
parent fbc963402c
commit daf1dadda0
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>