diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-05-21 19:22:51 -0400 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-05-21 19:22:51 -0400 |
commit | 45571dd57a8f44b982956643944d317ef71c8902 (patch) | |
tree | 45aeb6c684df95c8a1dbb1f95ab1be1e06a18a3b /odb/boost/smart-ptr/lazy-ptr.ixx | |
parent | 1b2c7678a0978da1037e65a8e982f9d303e3a541 (diff) |
Add ability to get underlying eager pointer in weak pointers
Diffstat (limited to 'odb/boost/smart-ptr/lazy-ptr.ixx')
-rw-r--r-- | odb/boost/smart-ptr/lazy-ptr.ixx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/boost/smart-ptr/lazy-ptr.ixx b/odb/boost/smart-ptr/lazy-ptr.ixx index 0de602c..b695787 100644 --- a/odb/boost/smart-ptr/lazy-ptr.ixx +++ b/odb/boost/smart-ptr/lazy-ptr.ixx @@ -221,6 +221,13 @@ namespace odb } template <class T> + inline ::boost::shared_ptr<T> lazy_shared_ptr<T>:: + get_eager () const + { + return p_; + } + + template <class T> template <class DB, class ID> inline lazy_shared_ptr<T>:: lazy_shared_ptr (DB& db, const ID& id): i_ (db, id) {} @@ -555,6 +562,13 @@ namespace odb } template <class T> + inline ::boost::weak_ptr<T> lazy_weak_ptr<T>:: + get_eager () const + { + return p_; + } + + template <class T> template <class DB, class ID> inline lazy_weak_ptr<T>:: lazy_weak_ptr (DB& db, const ID& id): i_ (db, id) {} |