aboutsummaryrefslogtreecommitdiff
path: root/odb/tr1/lazy-ptr.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-05-21 19:22:51 -0400
committerBoris Kolpackov <boris@codesynthesis.com>2013-05-21 19:22:51 -0400
commitfb2519f6f9d79c7626a0281ad24925b4976cd81d (patch)
tree0363e3f37d2466b9411485e44638c76141deeacf /odb/tr1/lazy-ptr.ixx
parent6c666b0dfa38cf1f6407817261a829645e86d855 (diff)
Add ability to get underlying eager pointer in weak pointers
Diffstat (limited to 'odb/tr1/lazy-ptr.ixx')
-rw-r--r--odb/tr1/lazy-ptr.ixx14
1 files changed, 14 insertions, 0 deletions
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 <class T>
+ inline std::tr1::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) {}
@@ -518,6 +525,13 @@ namespace odb
}
template <class T>
+ inline std::tr1::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) {}