diff options
Diffstat (limited to 'src/core/dom')
-rw-r--r-- | src/core/dom/Managed.hpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/core/dom/Managed.hpp b/src/core/dom/Managed.hpp index aab18a5..deccb99 100644 --- a/src/core/dom/Managed.hpp +++ b/src/core/dom/Managed.hpp @@ -389,22 +389,23 @@ public: /** * Comparison operator between base Owned and base Owned. */ - bool operator==(const Handle &h) const { return ptr == h.ptr; } + template<class T2> + bool operator==(const Handle<T2> &h) const { return ptr == h.get(); } /** * Comparison operator between base Owned and pointer. */ - friend bool operator==(const Handle &h, const Managed *o) + friend bool operator==(const Handle<T> &h, const Managed *o) { - return h.ptr == o; + return h.get() == o; } /** * Comparison operator between base Owned and pointer. */ - friend bool operator==(const Managed *o, const Handle &h) + friend bool operator==(const Managed *o, const Handle<T> &h) { - return h.ptr == o; + return o == h.get(); } /** @@ -419,11 +420,6 @@ public: }; /** - * Null represents a null handle. - */ -static const Handle<Managed> Null{nullptr}; - -/** * A Rooted represents a directed, garbage collected pointer at a managed * object. The lifetime of the represented managed object is guaranteed to be at * least as long as the lifetime of the Rooted handle instance. |