Skip to content

Commit 2b43f1e

Browse files
authored
Linux compile fixes #4
1 parent 63b4dc7 commit 2b43f1e

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Shared/sdk/SharedUtil.HashMap.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff 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)
117120
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
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 >

0 commit comments

Comments
 (0)