From b2b8dba6c149407d6657398a874c75629871d21a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 Apr 2011 11:15:37 +0200 Subject: Fix loaded() function in lazy_ptr to conform to documentation --- odb/tr1/lazy-ptr.ixx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'odb/tr1/lazy-ptr.ixx') diff --git a/odb/tr1/lazy-ptr.ixx b/odb/tr1/lazy-ptr.ixx index 5e99e98..3460e99 100644 --- a/odb/tr1/lazy-ptr.ixx +++ b/odb/tr1/lazy-ptr.ixx @@ -192,7 +192,8 @@ namespace odb inline bool lazy_shared_ptr:: loaded () const { - return p_ || !i_; + bool i (i_); + return !p_ != i; // !p_ XOR i_ } template @@ -524,7 +525,8 @@ namespace odb inline bool lazy_weak_ptr:: loaded () const { - return !expired () || !i_; + bool i (i_); + return expired () != i; // expired () XOR i_ } template -- cgit v1.1