diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-10 13:16:17 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-10 13:16:17 +0200 |
commit | 677d07f365c15ed62cbceb0990122c652e5751ec (patch) | |
tree | c7f604f7fffbf1bacb09341980ca35024dc2c9a4 | |
parent | ec6b9f59d40b2c389496f8e6af6bce64944af998 (diff) |
Add comparison operators for shared_ptr
-rw-r--r-- | odb/shared-ptr.hxx | 14 |
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 |