summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2016-04-10 13:32:49 +0200
committerMurray Cumming <murrayc@murrayc.com>2016-04-10 13:34:31 +0200
commitaee3a6fa6a37e1178b43437966b4225a34f9c6e2 (patch)
tree76b7425fc2293a66c7846655b3d4ffb63220cd8d
parent69fad0acec4ee0cbefeb5b4d4ccb362415e848cf (diff)
downloadglibmm-aee3a6fa6a37e1178b43437966b4225a34f9c6e2.tar.gz
RefPtr: Make operator bool() explicit.
As in shared_ptr<>, for instance. See https://bugzilla.gnome.org/show_bug.cgi?id=626858#c4
-rw-r--r--glib/glibmm/refptr.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/glib/glibmm/refptr.h b/glib/glibmm/refptr.h
index 4d8a9c63..892b6a67 100644
--- a/glib/glibmm/refptr.h
+++ b/glib/glibmm/refptr.h
@@ -165,7 +165,7 @@ public:
* do_something();
* @endcode
*/
- inline operator bool() const noexcept;
+ inline explicit operator bool() const noexcept;
#ifndef GLIBMM_DISABLE_DEPRECATED
/// @deprecated Use reset() instead because this leads to confusion with clear() methods on the
@@ -221,10 +221,6 @@ public:
template <class T_CastFrom>
static inline RefPtr cast_const(const RefPtr<T_CastFrom>& src) noexcept;
- // TODO: Maybe remove these if we replace operator bool() with operator const void* after
- // an API/ABI break, as suggested by Daniel Elstner? murrayc.
- // See bug https://bugzilla.gnome.org/show_bug.cgi?id=626858
-
/** Compare based on the underlying instance address.
*
* This is needed in code that requires an ordering on