diff --git a/src/util/string.hpp b/src/util/string.hpp index 48020bba..548314f6 100644 --- a/src/util/string.hpp +++ b/src/util/string.hpp @@ -33,6 +33,17 @@ inline wxStdString const& toStdString(String const& s) { #endif } +#if wxVERSION_NUMBER < 3100 +// wxWidgets 3.1.0 added this specialization +namespace std { + template<> struct hash { + size_t operator()(String const& s) const { + return std::hash()(s.ToStdWstring()); + } + }; +} // +#endif + // ----------------------------------------------------------------------------- : Unicode /// u if UNICODE is defined, a otherwise