From 1cb53f9850ed593d75b6e3af0454616b30048643 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 10 Aug 2010 13:15:33 +0200 Subject: Add comparison operators for shared_ptr --- cutl/shared-ptr.hxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cutl/shared-ptr.hxx b/cutl/shared-ptr.hxx index de85447..702af29 100644 --- a/cutl/shared-ptr.hxx +++ b/cutl/shared-ptr.hxx @@ -140,6 +140,20 @@ namespace cutl 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 // CUTL_SHARED_PTR_HXX -- cgit v1.1