File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -104,14 +104,17 @@ namespace SharedUtil
104
104
105
105
106
106
// Calculate a hash value for SString
107
- template <>
108
- struct std ::hash<SString>
107
+ namespace std
109
108
{
110
- size_t operator ()(const SString& str) const
109
+ template <>
110
+ struct hash <SString>
111
111
{
112
- return std::hash<std::string>()(str);
113
- }
114
- };
112
+ size_t operator ()(const SString& str) const
113
+ {
114
+ return std::hash<std::string>()(str);
115
+ }
116
+ };
117
+ }
115
118
116
119
#if defined(WIN32)
117
120
inline size_t hash_value ( const SString& strString ) // Required for sparsehash
@@ -120,7 +123,7 @@ inline size_t hash_value ( const SString& strString ) // Required for sparsehash
120
123
return hashFunction ( strString );
121
124
}
122
125
#elif defined(__GNUC__) && (__GNUC__ >= 3)
123
- namespace std
126
+ namespace __gnu_cxx
124
127
{
125
128
template <>
126
129
struct hash < SString >
You can’t perform that action at this time.
0 commit comments