From 031a5b46f3333f2b0aa0bb92acd2c92f99e6359b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 14 Aug 2015 11:27:36 +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/boost/smart-ptr/lazy-ptr.ixx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'odb/boost/smart-ptr/lazy-ptr.ixx') diff --git a/odb/boost/smart-ptr/lazy-ptr.ixx b/odb/boost/smart-ptr/lazy-ptr.ixx index 3a6eae4..e3c423f 100644 --- a/odb/boost/smart-ptr/lazy-ptr.ixx +++ b/odb/boost/smart-ptr/lazy-ptr.ixx @@ -538,6 +538,13 @@ namespace odb } template + inline lazy_shared_ptr lazy_weak_ptr:: + lock () const + { + return lazy_shared_ptr (p_.lock (), i_); + } + + template inline ::boost::shared_ptr lazy_weak_ptr:: load () const { -- cgit v1.1