diff options
Diffstat (limited to 'include/Support/HashExtras.h')
-rw-r--r-- | include/Support/HashExtras.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/Support/HashExtras.h b/include/Support/HashExtras.h index 871080c467..67f65b5f3a 100644 --- a/include/Support/HashExtras.h +++ b/include/Support/HashExtras.h @@ -31,7 +31,9 @@ template <> struct hash<std::string> { // Provide a hash function for arbitrary pointers... template <class T> struct hash<T *> { - inline size_t operator()(const T *Val) const { return (size_t)Val; } + inline size_t operator()(const T *Val) const { + return reinterpret_cast<size_t>(Val); + } }; } // End namespace std |