From 8bf318e2b4c267eeb2aca7d21a77493ca817d195 Mon Sep 17 00:00:00 2001 From: Jonathan Protzenko Date: Mon, 24 Aug 2015 16:12:18 -0700 Subject: [PATCH] By-adress comparison operators for ManagedType. --- inc/ManagedType.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/inc/ManagedType.h b/inc/ManagedType.h index b37c06d..e8d05a3 100644 --- a/inc/ManagedType.h +++ b/inc/ManagedType.h @@ -87,6 +87,14 @@ public: T* get() { return object; } + + bool operator!=(const ManagedType& x) { + return !(this == x); + } + + bool operator==(const ManagedType& x) { + return this->object == x.object; + } }; /**