Add a new wxUSE_STD_CONTAINERS_COMPATIBLY option.
This option, which is on by default unless the use of STL is disabled, provides better interoperability with the standard library when it can be done without breaking backwards compatibility. The first example of its use is to allow passing std::vector<> of any string compatible type to wxItemContainer::Append(), Insert() and Set(), allowing to directly initialize various wxControls deriving from it such as wxChoice, wxComboBox, wxListBox from a std::vector<> of strings. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -331,6 +331,7 @@ dnl default)
|
||||
DEFAULT_wxUSE_ALL_FEATURES=yes
|
||||
|
||||
DEFAULT_wxUSE_STD_CONTAINERS=no
|
||||
DEFAULT_wxUSE_STD_CONTAINERS_COMPATIBLY=$DEFAULT_STD_FLAG
|
||||
DEFAULT_wxUSE_STD_IOSTREAM=$DEFAULT_STD_FLAG
|
||||
DEFAULT_wxUSE_STD_STRING=$DEFAULT_STD_FLAG
|
||||
|
||||
@@ -646,10 +647,12 @@ WX_ARG_DISABLE(shared, [ --disable-shared create static library inst
|
||||
WX_ARG_ENABLE(stl, [ --enable-stl use standard C++ classes for everything], wxUSE_STL)
|
||||
if test "$wxUSE_STL" = "yes"; then
|
||||
DEFAULT_wxUSE_STD_CONTAINERS=yes
|
||||
DEFAULT_wxUSE_STD_CONTAINERS_COMPATIBLY=yes
|
||||
DEFAULT_wxUSE_STD_IOSTREAM=yes
|
||||
DEFAULT_wxUSE_STD_STRING=yes
|
||||
fi
|
||||
WX_ARG_ENABLE(std_containers,[ --enable-std_containers use standard C++ container classes], wxUSE_STD_CONTAINERS)
|
||||
WX_ARG_ENABLE(std_containers_compat, [ --enable-std_containers_compat use standard C++ container classes when it can be done compatible], wxUSE_STD_CONTAINERS_COMPATIBLY)
|
||||
WX_ARG_ENABLE(std_iostreams, [ --enable-std_iostreams use standard C++ stream classes], wxUSE_STD_IOSTREAM)
|
||||
WX_ARG_ENABLE(std_string, [ --enable-std_string use standard C++ string classes], wxUSE_STD_STRING)
|
||||
WX_ARG_ENABLE(std_string_conv_in_wxstring, [ --enable-std_string_conv_in_wxstring provide implicit conversion to std::string in wxString], wxUSE_STD_STRING_CONV_IN_WXSTRING)
|
||||
@@ -5654,6 +5657,10 @@ if test "$wxUSE_STD_CONTAINERS" = "yes"; then
|
||||
AC_DEFINE(wxUSE_STD_CONTAINERS)
|
||||
fi
|
||||
|
||||
if test "$wxUSE_STD_CONTAINERS_COMPATIBLY" = "yes"; then
|
||||
AC_DEFINE(wxUSE_STD_CONTAINERS_COMPATIBLY)
|
||||
fi
|
||||
|
||||
if test "$wxUSE_STD_IOSTREAM" = "yes"; then
|
||||
AC_DEFINE(wxUSE_STD_IOSTREAM)
|
||||
fi
|
||||
|
Reference in New Issue
Block a user