aboutsummaryrefslogtreecommitdiff
path: root/odb
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-08-10 13:16:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-08-10 13:16:17 +0200
commit677d07f365c15ed62cbceb0990122c652e5751ec (patch)
treec7f604f7fffbf1bacb09341980ca35024dc2c9a4 /odb
parentec6b9f59d40b2c389496f8e6af6bce64944af998 (diff)
Add comparison operators for shared_ptr
Diffstat (limited to 'odb')
-rw-r--r--odb/shared-ptr.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/shared-ptr.hxx b/odb/shared-ptr.hxx
index ee56792..7290a00 100644
--- a/odb/shared-ptr.hxx
+++ b/odb/shared-ptr.hxx
@@ -140,6 +140,20 @@ namespace odb
X* x_;
};
+
+ template <typename X, typename Y>
+ inline bool
+ operator== (const shared_ptr<X>& x, const shared_ptr<Y>& y)
+ {
+ return x.get () == y.get ();
+ }
+
+ template <typename X, typename Y>
+ inline bool
+ operator!= (const shared_ptr<X>& x, const shared_ptr<Y>& y)
+ {
+ return x.get () != y.get ();
+ }
}
#endif // ODB_SHARED_PTR_HXX