+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;
+
+#if defined wxLongLong_t && !defined wxLongLongIsLong
+ size_t longlongHash( wxLongLong_t x ) const
+ {
+ return longHash( wx_truncate_cast(long, x) ) ^
+ longHash( wx_truncate_cast(long, x >> (sizeof(long) * 8)) );
+ }
+#endif
+
+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 ); }
+#if defined wxLongLong_t && !defined wxLongLongIsLong
+ size_t operator()( wxLongLong_t x ) const { return longlongHash(x); }
+ size_t operator()( wxULongLong_t x ) const { return longlongHash(x); }
+#endif
+
+ wxIntegerHash& operator=(const wxIntegerHash&) { return *this; }
+};
+
+#else // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP)
+
+// integer types
+class WXDLLIMPEXP_BASE wxIntegerHash