summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/hash_fun.hxx.in
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/hash_fun.hxx.in')
-rw-r--r--Source/kwsys/hash_fun.hxx.in37
1 files changed, 36 insertions, 1 deletions
diff --git a/Source/kwsys/hash_fun.hxx.in b/Source/kwsys/hash_fun.hxx.in
index f21efc5..8c5eb6a 100644
--- a/Source/kwsys/hash_fun.hxx.in
+++ b/Source/kwsys/hash_fun.hxx.in
@@ -38,8 +38,9 @@
#define @KWSYS_NAMESPACE@_hash_fun_hxx
#include <@KWSYS_NAMESPACE@/Configure.hxx>
-
+#include <@KWSYS_NAMESPACE@/FundamentalType.h>
#include <@KWSYS_NAMESPACE@/cstddef> // size_t
+#include <@KWSYS_NAMESPACE@/stl/string> // string
namespace @KWSYS_NAMESPACE@
{
@@ -66,6 +67,18 @@ struct hash<const char*> {
};
@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
+ struct hash<@KWSYS_NAMESPACE@_stl::string> {
+ size_t operator()(const @KWSYS_NAMESPACE@_stl::string & __s) const { return _stl_hash_string(__s.c_str()); }
+};
+
+#if !defined(__BORLANDC__)
+@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
+ struct hash<const @KWSYS_NAMESPACE@_stl::string> {
+ size_t operator()(const @KWSYS_NAMESPACE@_stl::string & __s) const { return _stl_hash_string(__s.c_str()); }
+};
+#endif
+
+@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
struct hash<char> {
size_t operator()(char __x) const { return __x; }
};
@@ -110,6 +123,28 @@ struct hash<unsigned long> {
size_t operator()(unsigned long __x) const { return __x; }
};
+// use long long or __int64
+#if @KWSYS_NAMESPACE@_USE_LONG_LONG
+@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
+struct hash<long long> {
+ size_t operator()(long long __x) const { return __x; }
+};
+
+@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
+struct hash<unsigned long long> {
+ size_t operator()(unsigned long long __x) const { return __x; }
+};
+#elif @KWSYS_NAMESPACE@_USE___INT64
+@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
+struct hash<__int64> {
+ size_t operator()(__int64 __x) const { return __x; }
+};
+@KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION
+struct hash<unsigned __int64> {
+ size_t operator()(unsigned __int64 __x) const { return __x; }
+};
+#endif // use long long or __int64
+
} // namespace @KWSYS_NAMESPACE@
#endif