X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/664e13143ee51a6b1aa1c30d1401ac04b11bdcca..46b8d15a67701e1a2594b0eca820f166645e1b31:/include/wx/scopedptr.h diff --git a/include/wx/scopedptr.h b/include/wx/scopedptr.h index a27b8dbd6b..515c7fc383 100644 --- a/include/wx/scopedptr.h +++ b/include/wx/scopedptr.h @@ -47,7 +47,13 @@ public: // test for pointer validity: defining conversion to unspecified_bool_type // and not more obvious bool to avoid implicit conversions to integer types +#ifdef __BORLANDC__ + // this compiler is too dumb to use unspecified_bool_type operator in tests + // of the form "if ( !ptr )" + typedef bool unspecified_bool_type; +#else typedef T *(wxScopedPtr::*unspecified_bool_type)() const; +#endif // __BORLANDC__ operator unspecified_bool_type() const { return m_ptr ? &wxScopedPtr::get : NULL;