From 8ceee297981402eb5331f357b27ebfac11706ec4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 14 Aug 2015 11:27:35 +0200 Subject: Reimplement lazy_weak_ptr lock() to preserve database type Now we initialize the returned lazy_shared_ptr with the same loader function as the one set for weak_ptr. --- odb/tr1/lazy-ptr.ixx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'odb/tr1/lazy-ptr.ixx') diff --git a/odb/tr1/lazy-ptr.ixx b/odb/tr1/lazy-ptr.ixx index 45386bd..283118c 100644 --- a/odb/tr1/lazy-ptr.ixx +++ b/odb/tr1/lazy-ptr.ixx @@ -501,6 +501,13 @@ namespace odb } template + inline lazy_shared_ptr lazy_weak_ptr:: + lock () const + { + return lazy_shared_ptr (p_.lock (), i_); + } + + template inline std::tr1::shared_ptr lazy_weak_ptr:: load () const { -- cgit v1.1