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
This commit is contained in:
@@ -18,6 +18,10 @@
|
||||
#include "wx/arrstr.h"
|
||||
#include "wx/control.h" // base class
|
||||
|
||||
#if wxUSE_STD_CONTAINERS_COMPATIBLY
|
||||
#include <vector>
|
||||
#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 <class T>
|
||||
int Append(const std::vector<T>& 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 <class T>
|
||||
int Insert(const std::vector<T>& 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 <class T>
|
||||
void Set(const std::vector<T>& items)
|
||||
{ Clear(); Append(items); }
|
||||
#endif // wxUSE_STD_CONTAINERS_COMPATIBLY
|
||||
|
||||
// deleting items
|
||||
// --------------
|
||||
|
Reference in New Issue
Block a user