diff options
Diffstat (limited to 'ACE/ace/Refcounted_Auto_Ptr.h')
-rw-r--r-- | ACE/ace/Refcounted_Auto_Ptr.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ACE/ace/Refcounted_Auto_Ptr.h b/ACE/ace/Refcounted_Auto_Ptr.h index b52872806ab..1bb10b6585b 100644 --- a/ACE/ace/Refcounted_Auto_Ptr.h +++ b/ACE/ace/Refcounted_Auto_Ptr.h @@ -44,6 +44,10 @@ template <class X, class ACE_LOCK> class ACE_Refcounted_Auto_Ptr; template <class X, class ACE_LOCK> class ACE_Refcounted_Auto_Ptr { + /// Used to define a proper boolean conversion for "if (sp) ..." + static void unspecified_bool(ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>***){}; + typedef void (*unspecified_bool_type)(ACE_Refcounted_Auto_Ptr<X, ACE_LOCK>***); + public: /// Constructor that initializes an ACE_Refcounted_Auto_Ptr to /// the specified pointer value. @@ -86,7 +90,7 @@ public: bool operator !() const; /// Check rep easily. - operator bool () const; + operator unspecified_bool_type() const; /// Releases the reference to the underlying representation object. /// @retval The pointer value prior to releasing it. |