Skip to content

Commit 17951fa

Browse files
committed
Fix std::string hash.
1 parent 25c4064 commit 17951fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

third_party/xla_client/util.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ size_t Hash(const T& value) {
161161
return DataHash(&value, sizeof(value));
162162
}
163163

164+
static inline size_t Hash(const std::string& value) {
165+
return std::hash<std::string>()(value);
166+
}
167+
164168
// Forward declare to allow hashes of vectors of vectors to work.
165169
template <typename T>
166170
size_t ContainerHash(const T& values);

0 commit comments

Comments
 (0)