X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b052a864e9d5270fd40f9ee6021133d2c3cd3173..333e57d578e9e0fb6555452b5a53698ffd85ee69:/include/wx/string.h diff --git a/include/wx/string.h b/include/wx/string.h index ac8c35b8bf..b6002fd5aa 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -59,7 +59,7 @@ #include "wx/stringops.h" #include "wx/unichar.h" -class WXDLLIMPEXP_BASE wxString; +class WXDLLIMPEXP_FWD_BASE wxString; // unless this symbol is predefined to disable the compatibility functions, do // use them @@ -276,7 +276,7 @@ private: size_t m_offset; bool m_owned; - friend class WXDLLIMPEXP_BASE wxString; + friend class WXDLLIMPEXP_FWD_BASE wxString; }; // ---------------------------------------------------------------------------- @@ -652,13 +652,13 @@ public: /* for internal wxString use only: */ \ underlying_iterator impl() const { return m_cur; } \ \ - friend class WXDLLIMPEXP_BASE wxString; \ - friend class WXDLLIMPEXP_BASE wxCStrData; \ + friend class wxString; \ + friend class wxCStrData; \ \ private: \ underlying_iterator m_cur - class WXDLLIMPEXP_BASE const_iterator; + class WXDLLIMPEXP_FWD_BASE const_iterator; #if wxUSE_UNICODE_UTF8 // NB: In UTF-8 build, (non-const) iterator needs to keep reference @@ -1202,17 +1202,20 @@ public: // implicit conversion to C string operator wxCStrData() const { return c_str(); } - // these operators conflict with operators for conversion to std::string, - // so they must be disabled in STL build: + // the first two operators conflict with operators for conversion to + // std::string and they must be disabled in STL build; the next one only + // makes sense if conversions to char* are also defined and not defining it + // in STL build also helps us to get more clear error messages for the code + // which relies on implicit conversion to char* in STL build #if !wxUSE_STL operator const char*() const { return c_str(); } operator const wchar_t*() const { return c_str(); } -#endif // implicit conversion to untyped pointer for compatibility with previous // wxWidgets versions: this is the same as conversion to const char * so it // may fail! operator const void*() const { return c_str(); } +#endif // wxUSE_STL // identical to c_str(), for MFC compatibility const wxCStrData GetData() const { return c_str(); } @@ -2627,11 +2630,11 @@ private: wxStringIteratorNodeHead m_iterators; - friend class WXDLLIMPEXP_BASE wxStringIteratorNode; - friend class WXDLLIMPEXP_BASE wxUniCharRef; + friend class WXDLLIMPEXP_FWD_BASE wxStringIteratorNode; + friend class WXDLLIMPEXP_FWD_BASE wxUniCharRef; #endif // wxUSE_UNICODE_UTF8 - friend class WXDLLIMPEXP_BASE wxCStrData; + friend class WXDLLIMPEXP_FWD_BASE wxCStrData; friend class wxImplStringBuffer; friend class wxImplStringBufferLength; };