From 677d07f365c15ed62cbceb0990122c652e5751ec Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 10 Aug 2010 13:16:17 +0200 Subject: Add comparison operators for shared_ptr --- odb/shared-ptr.hxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'odb') 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 + inline bool + operator== (const shared_ptr& x, const shared_ptr& y) + { + return x.get () == y.get (); + } + + template + inline bool + operator!= (const shared_ptr& x, const shared_ptr& y) + { + return x.get () != y.get (); + } } #endif // ODB_SHARED_PTR_HXX -- cgit v1.1