aboutsummaryrefslogtreecommitdiff
path: root/odb/boost/smart-ptr/lazy-ptr.ixx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/boost/smart-ptr/lazy-ptr.ixx')
-rw-r--r--odb/boost/smart-ptr/lazy-ptr.ixx6
1 files changed, 4 insertions, 2 deletions
diff --git a/odb/boost/smart-ptr/lazy-ptr.ixx b/odb/boost/smart-ptr/lazy-ptr.ixx
index 2522ab4..fced28d 100644
--- a/odb/boost/smart-ptr/lazy-ptr.ixx
+++ b/odb/boost/smart-ptr/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>