+#ifndef wxNEEDS_WX_HASH_MAP
+
+// integer types
+class WXDLLIMPEXP_BASE wxIntegerHash
+{
+ WX_HASH_MAP_NAMESPACE::hash<long> longHash;
+ WX_HASH_MAP_NAMESPACE::hash<unsigned long> ulongHash;
+ WX_HASH_MAP_NAMESPACE::hash<int> intHash;
+ WX_HASH_MAP_NAMESPACE::hash<unsigned int> uintHash;
+ WX_HASH_MAP_NAMESPACE::hash<short> shortHash;
+ WX_HASH_MAP_NAMESPACE::hash<unsigned short> ushortHash;
+
+#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
+ // hash<wxLongLong_t> ought to work but doesn't on some compilers
+ #if (!defined SIZEOF_LONG_LONG && SIZEOF_LONG == 4) \
+ || (defined SIZEOF_LONG_LONG && SIZEOF_LONG_LONG == SIZEOF_LONG * 2)
+ size_t longlongHash( wxLongLong_t x ) const
+ {
+ return longHash( wx_truncate_cast(long, x) ) ^
+ longHash( wx_truncate_cast(long, x >> (sizeof(long) * 8)) );
+ }
+ #elif defined SIZEOF_LONG_LONG && SIZEOF_LONG_LONG == SIZEOF_LONG
+ WX_HASH_MAP_NAMESPACE::hash<long> longlongHash;
+ #else
+ WX_HASH_MAP_NAMESPACE::hash<wxLongLong_t> longlongHash;
+ #endif
+#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
+
+public:
+ wxIntegerHash() { }
+ size_t operator()( long x ) const { return longHash( x ); }
+ size_t operator()( unsigned long x ) const { return ulongHash( x ); }
+ size_t operator()( int x ) const { return intHash( x ); }
+ size_t operator()( unsigned int x ) const { return uintHash( x ); }
+ size_t operator()( short x ) const { return shortHash( x ); }
+ size_t operator()( unsigned short x ) const { return ushortHash( x ); }
+#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
+ size_t operator()( wxLongLong_t x ) const { return longlongHash(x); }
+ size_t operator()( wxULongLong_t x ) const { return longlongHash(x); }
+#endif // wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
+
+ wxIntegerHash& operator=(const wxIntegerHash&) { return *this; }
+};
+
+#else // wxNEEDS_WX_HASH_MAP
+