Remove wxUSE_STL which is not really used any longer

wxString is always based on std::[w]string since 2c0c727f49 (Remove wx
own wxStringImpl implementation, 2022-11-16) and all containers use
standard containers by default too now -- and there is a separate
wxUSE_STD_CONTAINERS for this anyhow.

The only remaining use of wxUSE_STL was as the default value for
wxUSE_STD_STRING_CONV_IN_WXSTRING option, but it's not really needed
for this neither, and this option can just be set to 0 by default.

Also add wxUSE_CHAR_CONV_IN_WXSTRING which can now be set to 0 too to
disable all unwanted implicit conversions (even "safe" ones, to wide
strings, in addition to the unsafe ones to narrow strings that could be
already disabled with wxUSE_UNSAFE_WXSTRING_CONV) to allow people who
don't want to have any implicit conversions at all to do it.

Keep --enable-stl configure option for compatibility, but warn if it is
used to tell people that it is not needed any longer.
This commit is contained in:
Vadim Zeitlin 2023-04-15 15:42:10 +01:00
parent d65eed50fa
commit 35c35c235e
22 changed files with 315 additions and 248 deletions

View file

@ -92,6 +92,11 @@ Changes in behaviour which may result in build errors
the existing code. Alternatively, explicitly set wxUSE_STD_CONTAINERS=0 when
compiling the library to preserve full compatibility with the old versions.
- wxUSE_STL option doesn't exist any longer, standard library is always used.
However previously setting wxUSE_STL=1 enabled implicit conversion from
wxString to std::[w]string which are not enabled by default now, please set
wxUSE_STD_STRING_CONV_IN_WXSTRING=1 explicitly if you need them.
- wxMotif and wxGTK1 ports have been removed, please use wxWidgets 3.2 if you
still need them.

View file

@ -339,12 +339,11 @@ more details.
with old wxWidgets versions. Changing it is not recommended.}
@itemdef{wxUSE_UNSAFE_WXSTRING_CONV,
this option determines if unsafe implicit conversions of wxString to
@c char* or @c std::string (depending on whether @c wxUSE_STL is 0 or
1) are defined. It is set to 1 by default for compatibility reasons,
however it is recommended to set it to 0 for the new projects. See
also @c wxNO_UNSAFE_WXSTRING_CONV below for an alternative way of
disabling these unsafe conversions not requiring rebuilding the
library.}
@c char* or @c std::string (depending on whether
@c wxUSE_STD_STRING_CONV_IN_WXSTRING is 0 or 1) are defined.
It is set to 1 by default for compatibility reasons, but you may set
@c wxNO_UNSAFE_WXSTRING_CONV described below to disable these unsafe
unsafe conversions without rebuilding the library.}
@endDefList
@section page_cppconst_miscellaneous Miscellaneous