because it is always defined.
Do not unconditionally #define HAVE_STD_STRING_COMPARE if
it is not defined, because this nullifies the configure test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33473
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// ----------------------------------------------------------------------------
// in both cases we need to define wxStdString
// ----------------------------------------------------------------------------
// in both cases we need to define wxStdString
-#if wxUSE_STL || defined(wxUSE_STD_STRING)
+#if wxUSE_STL || wxUSE_STD_STRING
#include "wx/beforestd.h"
#include <string>
#include "wx/beforestd.h"
#include <string>
typedef wxStdString wxStringBase;
#else // if !wxUSE_STL
typedef wxStdString wxStringBase;
#else // if !wxUSE_STL
-#ifndef HAVE_STD_STRING_COMPARE
+#if !defined(HAVE_STD_STRING_COMPARE) && \
+ (!defined(__WX_SETUP_H__) || wxUSE_STL == 0)
#define HAVE_STD_STRING_COMPARE
#endif
#define HAVE_STD_STRING_COMPARE
#endif
// unconditionally add this ctor as it would make wx lib dependent on
// libstdc++ on some Linux versions which is bad, so instead we ask the
// client code to define this wxUSE_STD_STRING symbol if they need it
// unconditionally add this ctor as it would make wx lib dependent on
// libstdc++ on some Linux versions which is bad, so instead we ask the
// client code to define this wxUSE_STD_STRING symbol if they need it
wxString(const wxStdString& s)
: wxStringBase(s.c_str()) { }
#endif // wxUSE_STD_STRING
wxString(const wxStdString& s)
: wxStringBase(s.c_str()) { }
#endif // wxUSE_STD_STRING
{ return (wxString&)wxStringBase::assign(first, last); }
// string comparison
{ return (wxString&)wxStringBase::assign(first, last); }
// string comparison
-#ifndef HAVE_STD_STRING_COMPARE
+#if !defined(HAVE_STD_STRING_COMPARE)
int compare(const wxStringBase& str) const;
// comparison with a substring
int compare(size_t nStart, size_t nLen, const wxStringBase& str) const;
int compare(const wxStringBase& str) const;
// comparison with a substring
int compare(size_t nStart, size_t nLen, const wxStringBase& str) const;