include/xot/ref.h in xot-0.1.27 vs include/xot/ref.h in xot-0.1.28
- old
+ new
@@ -183,10 +183,16 @@
bool operator == (const This& obj) const {return ptr == obj.ptr;}
bool operator != (const This& obj) const {return !operator==(obj);}
+ template <typename X>
+ bool operator == (const Ref<X>& obj) const {return ptr == obj.get();}
+
+ template <typename X>
+ bool operator != (const Ref<X>& obj) const {return !operator==(obj);}
+
bool operator < (const This& obj) const {return ptr < obj.ptr;}
operator bool () const {return ptr != NULL;}
bool operator ! () const {return !operator bool();}
@@ -269,9 +275,15 @@
bool operator != (ConstPointer ptr) const {return !operator==(ptr);}
bool operator == (const This& obj) const {return ptr == obj.ptr;}
bool operator != (const This& obj) const {return !operator==(obj);}
+
+ template <typename X>
+ bool operator == (const Ref<X>& obj) const {return ptr == obj.get();}
+
+ template <typename X>
+ bool operator != (const Ref<X>& obj) const {return !operator==(obj);}
bool operator < (const This& obj) const {return ptr < obj.ptr;}
operator bool () const {return ptr != NULL;}