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 // ---------------------------------------------------------------------------