From e8a5baf0611533fd3ee20d9625af29b26b1e831b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 11 Nov 2014 01:02:34 +0000 Subject: [PATCH] Do use wxUSE_STD_CONTAINERS_COMPATIBLY around code using std::vector. This was supposed to be done in r78066, but after introducing this new wxUSE_XXX symbol I forgot to actually use it in the place it was intended to be used. Fixes compilation with wxUSE_STD_DEFAULT==0 and closes #16673. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/ctrlsub.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/wx/ctrlsub.h b/include/wx/ctrlsub.h index 118a212c70..284847e355 100644 --- a/include/wx/ctrlsub.h +++ b/include/wx/ctrlsub.h @@ -18,6 +18,10 @@ #include "wx/arrstr.h" #include "wx/control.h" // base class +#if wxUSE_STD_CONTAINERS_COMPATIBLY +#include +#endif // wxUSE_STD_CONTAINERS_COMPATIBLY + // ---------------------------------------------------------------------------- // wxItemContainer defines an interface which is implemented by all controls // which have string subitems each of which may be selected. @@ -216,9 +220,11 @@ public: wxClientData **clientData) { return AppendItems(wxArrayStringsAdapter(n, items), clientData); } +#if wxUSE_STD_CONTAINERS_COMPATIBLY template int Append(const std::vector& items) { return AppendItems(items); } +#endif // wxUSE_STD_CONTAINERS_COMPATIBLY // only for RTTI needs (separate name) void AppendString(const wxString& item) @@ -259,9 +265,11 @@ public: wxClientData **clientData) { return InsertItems(wxArrayStringsAdapter(n, items), pos, clientData); } +#if wxUSE_STD_CONTAINERS_COMPATIBLY template int Insert(const std::vector& items, unsigned int pos) { return InsertItems(items, pos); } +#endif // wxUSE_STD_CONTAINERS_COMPATIBLY // replacing items // --------------- @@ -279,9 +287,11 @@ public: void Set(unsigned int n, const wxString *items, wxClientData **clientData) { Clear(); Append(n, items, clientData); } +#if wxUSE_STD_CONTAINERS_COMPATIBLY template void Set(const std::vector& items) { Clear(); Append(items); } +#endif // wxUSE_STD_CONTAINERS_COMPATIBLY // deleting items // --------------