From d79a7a3fa1b3206171bcb45876f9609bf56447e6 Mon Sep 17 00:00:00 2001 From: Manny Schneck Date: Sat, 10 Feb 2018 19:36:40 -0600 Subject: [PATCH] Use MAKE_ENUM_HASHABLE to hash SymbolKind --- src/indexer.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/indexer.h b/src/indexer.h index 70ad751c..da4aa3ce 100644 --- a/src/indexer.h +++ b/src/indexer.h @@ -36,17 +36,7 @@ struct IndexVar; // front of others. enum class SymbolKind : uint8_t { Invalid, File, Type, Func, Var }; MAKE_REFLECT_TYPE_PROXY(SymbolKind); - -// FIXME: Make old compiler happy. -namespace std { -template <> -struct hash<::SymbolKind> { - size_t operator()(const ::SymbolKind& instance) const { - using type = std::underlying_type<::SymbolKind>::type; - return std::hash()(static_cast(instance)); - } -}; -} // namespace std +MAKE_ENUM_HASHABLE(SymbolKind); using RawId = uint32_t;