aboutsummaryrefslogtreecommitdiff
path: root/odb/tr1/lazy-ptr.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-04-18 11:15:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-04-18 11:15:37 +0200
commitb2b8dba6c149407d6657398a874c75629871d21a (patch)
tree587f30ada0847768fef5835589b9568f01285638 /odb/tr1/lazy-ptr.ixx
parentabd2a4b899f16e2565c7db534ec558fec27173ff (diff)
Fix loaded() function in lazy_ptr to conform to documentation
Diffstat (limited to 'odb/tr1/lazy-ptr.ixx')
-rw-r--r--odb/tr1/lazy-ptr.ixx6
1 files changed, 4 insertions, 2 deletions
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<T>::
loaded () const
{
- return p_ || !i_;
+ bool i (i_);
+ return !p_ != i; // !p_ XOR i_
}
template <class T>
@@ -524,7 +525,8 @@ namespace odb
inline bool lazy_weak_ptr<T>::
loaded () const
{
- return !expired () || !i_;
+ bool i (i_);
+ return expired () != i; // expired () XOR i_
}
template <class T>