From 46a4234643690001406444cc764f4e2e6951386a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 3 Sep 2014 14:23:38 +0000 Subject: [PATCH] Compilation fix for wxUSE_STD_STRING==0 build. Add missing check for wxUSE_STD_STRING to fix the build with it set to 0 after the changes of r77518. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/string.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/wx/string.h b/include/wx/string.h index 05fc91a8ca..d4c054e71d 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -3921,6 +3921,11 @@ wxDEFINE_ALL_COMPARISONS(const char *, const wxCStrData&, wxCMP_CHAR_CSTRDATA) #if __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(10) +// Don't do this if ToStdWstring() is not available. We could work around it +// but, presumably, if using std::wstring is undesirable, then so is using +// std::hash<> anyhow. +#if wxUSE_STD_STRING + #include namespace std @@ -3935,6 +3940,8 @@ namespace std }; } // namespace std +#endif // wxUSE_STD_STRING + #endif // C++11 // ---------------------------------------------------------------------------