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
104104
105105
106106// Calculate a hash value for SString
107- template <>
108- struct std ::hash<SString>
107+ namespace std
109108{
110- size_t operator ()(const SString& str) const
109+ template <>
110+ struct hash <SString>
111111 {
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+ }
115118
116119#if defined(WIN32)
117120inline 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
120123 return hashFunction ( strString );
121124}
122125#elif defined(__GNUC__) && (__GNUC__ >= 3)
123- namespace std
126+ namespace __gnu_cxx
124127{
125128 template <>
126129 struct hash < SString >
You can’t perform that action at this time.
0 commit comments