aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-16 16:18:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-16 16:18:34 +0200
commit84fc7511250a06a9b2c6afb2948abc8efb6bd0dc (patch)
treef6e432f533a9d7b8da634f664186ed7233b9f2ae
parent21e2103b836dc51d491c0bde598a926613f91bff (diff)
Use explicit to-bool conversion in pointer comparison
Since we have explicit operator bool().
-rw-r--r--odb/lazy-ptr.ixx8
1 files changed, 4 insertions, 4 deletions
diff --git a/odb/lazy-ptr.ixx b/odb/lazy-ptr.ixx
index 9ffa945..0cc03f5 100644
--- a/odb/lazy-ptr.ixx
+++ b/odb/lazy-ptr.ixx
@@ -851,14 +851,14 @@ namespace odb
inline bool
operator!= (const lazy_unique_ptr<T, D>& a, std::nullptr_t)
{
- return a;
+ return bool (a); // Explicit to-bool conversion.
}
template <class T, class D>
inline bool
operator!= (std::nullptr_t, const lazy_unique_ptr<T, D>& b)
{
- return b;
+ return bool (b); // Explicit to-bool conversion.
}
#endif
@@ -1391,14 +1391,14 @@ namespace odb
inline bool
operator!= (const lazy_shared_ptr<T>& p, std::nullptr_t)
{
- return p;
+ return bool (p); // Explicit to-bool conversion.
}
template <class T>
inline bool
operator!= (std::nullptr_t, const lazy_shared_ptr<T>& p)
{
- return p;
+ return bool (p); // Explicit to-bool conversion.
}
#endif