-_DECLARE_BASEARRAY(void *, wxBaseArrayPtrVoid)
-_DECLARE_BASEARRAY(short, wxBaseArrayShort)
-_DECLARE_BASEARRAY(int, wxBaseArrayInt)
-_DECLARE_BASEARRAY(long, wxBaseArrayLong)
-_DECLARE_BASEARRAY(double, wxBaseArrayDouble)
+#endif
+
+#define _WX_DEFINE_BASEARRAY(T, name) \
+ _WX_DEFINE_BASEARRAY_COMMON(T, name) \
+ _WX_DEFINE_BASEARRAY_NOCOMMON(T, name)
+
+#ifdef __INTELC__
+ #pragma warning(push)
+ #pragma warning(disable: 1684)
+ #pragma warning(disable: 1572)
+#endif
+
+_WX_DEFINE_BASEARRAY(const void *, wxBaseArrayPtrVoid)
+_WX_DEFINE_BASEARRAY(short, wxBaseArrayShort)
+_WX_DEFINE_BASEARRAY(int, wxBaseArrayInt)
+_WX_DEFINE_BASEARRAY(long, wxBaseArrayLong)
+_WX_DEFINE_BASEARRAY(size_t, wxBaseArraySizeT)
+_WX_DEFINE_BASEARRAY(double, wxBaseArrayDouble)
+
+#ifdef __INTELC__
+ #pragma warning(pop)
+#endif
+
+#if wxUSE_STL
+#include "wx/arrstr.h"
+
+#include "wx/beforestd.h"
+#include <functional>
+#include "wx/afterstd.h"
+
+_WX_DEFINE_BASEARRAY(wxString, wxBaseArrayStringBase)
+
+// some compilers (Sun CC being the only known example) distinguish between
+// extern "C" functions and the functions with C++ linkage and ptr_fun and
+// wxStringCompareLess can't take wxStrcmp/wxStricmp directly as arguments in
+// this case, we need the wrappers below to make this work
+inline int wxStrcmpCppWrapper(const wxChar *p, const wxChar *q)
+{
+ return wxStrcmp(p, q);
+}
+
+inline int wxStricmpCppWrapper(const wxChar *p, const wxChar *q)
+{
+ return wxStricmp(p, q);
+}
+
+int wxArrayString::Index(const wxChar* sz, bool bCase, bool WXUNUSED(bFromEnd)) const
+{
+ wxArrayString::const_iterator it;
+
+ if (bCase)
+ {
+ it = std::find_if(begin(), end(),
+ std::not1(
+ std::bind2nd(
+ std::ptr_fun(wxStrcmpCppWrapper), sz)));
+ }
+ else // !bCase
+ {
+ it = std::find_if(begin(), end(),
+ std::not1(
+ std::bind2nd(
+ std::ptr_fun(wxStricmpCppWrapper), sz)));
+ }