From fb2519f6f9d79c7626a0281ad24925b4976cd81d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 21 May 2013 19:22:51 -0400 Subject: Add ability to get underlying eager pointer in weak pointers --- odb/tr1/lazy-ptr.ixx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'odb/tr1/lazy-ptr.ixx') diff --git a/odb/tr1/lazy-ptr.ixx b/odb/tr1/lazy-ptr.ixx index b33a12d..59d72c0 100644 --- a/odb/tr1/lazy-ptr.ixx +++ b/odb/tr1/lazy-ptr.ixx @@ -207,6 +207,13 @@ namespace odb } template + inline std::tr1::shared_ptr lazy_shared_ptr:: + get_eager () const + { + return p_; + } + + template template inline lazy_shared_ptr:: lazy_shared_ptr (DB& db, const ID& id): i_ (db, id) {} @@ -518,6 +525,13 @@ namespace odb } template + inline std::tr1::weak_ptr lazy_weak_ptr:: + get_eager () const + { + return p_; + } + + template template inline lazy_weak_ptr:: lazy_weak_ptr (DB& db, const ID& id): i_ (db, id) {} -- cgit v1.1