CodeLite/wxStringHash.h
raw| 1 | #ifndef WXSTRING_HASH |
| 2 | #define WXSTRING_HASH |
| 3 | |
| 4 | #include <unordered_set> |
| 5 | #include <unordered_map> |
| 6 | #include <wx/version.h> |
| 7 | |
| 8 | #if wxVERSION_NUMBER < 3100 |
| 9 | #include <wx/string.h> |
| 10 | #include <functional> |
| 11 | |
| 12 | namespace std |
| 13 | { |
| 14 | template <> |
| 15 | struct hash<wxString> |
| 16 | { |
| 17 | std::size_t operator()(const wxString& s) const { return hash<std::wstring>{}(s.ToStdWstring()); } |
| 18 | }; |
| 19 | } |
| 20 | #endif |
| 21 | #endif // WXSTRING_HASH |