From a2d03e4c51b2142e17162cf5a7f9e877b652ca95 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 25 Apr 2009 14:07:15 +0000 Subject: [PATCH] workaround for Borland compilation: don't use unspecified_bool_type for it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/scopedptr.h | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 2.45.2