- Added wxON_BLOCK_EXIT_SET() and wxON_BLOCK_EXIT_NULL() to wx/scopeguard.h.
- Added wxEvtHandler::QueueEvent() replacing AddPendingEvent() and
wxQueueEvent() replacing wxPostEvent().
+- wxString now uses std::[w]string internally by default, meaning that it is
+ now thread-safe if the standard library provided with your compiler is.
All (Unix):
@beginDefList
@itemdef{wxUSE_STL, Container classes and wxString are implemented using
standard classes and provide the same standard API.}
+@itemdef{wxUSE_STD_STRING, wxString is implemented using std::[w]string and can
+ be constructed from it (but provides wxWidgets-compatible API, in
+ particular is implicitly convertible to @c char* and not std::[w]string).}
@itemdef{wxUSE_STD_IOSTREAM, Standard C++ classes are used instead of or in
addition to wx stream classes.}
-@itemdef{wxUSE_STD_STRING, wxString can be constructed from std::string (but
- provides wxWidgets-compatible API).}
@itemdef{wxUSE_UNICODE, Compiled with Unicode support (default in wxWidgets
3.0, non-Unicode build will be deprecated in the future).}
@itemdef{wxUSE_UNICODE_WCHAR, wxString uses wchar_t buffer for internal storage
// deal with STL/non-STL/non-STL-but-wxUSE_STD_STRING
// ----------------------------------------------------------------------------
-#define wxUSE_STL_BASED_WXSTRING wxUSE_STL
+// using STL implies using std::string
+#if wxUSE_STL
+ #undef wxUSE_STD_STRING
+ #define wxUSE_STD_STRING 1
+#endif
+
+// we use STL-based string internally if we use std::string at all now, there
+// should be no reason to prefer our internal implement but if you really need
+// it you can predefine wxUSE_STL_BASED_WXSTRING as 0 when building the library
+#ifndef wxUSE_STL_BASED_WXSTRING
+ #define wxUSE_STL_BASED_WXSTRING wxUSE_STD_STRING
+#endif
// in both cases we need to define wxStdString
#if wxUSE_STL_BASED_WXSTRING || wxUSE_STD_STRING