From c7c6a8ed3977473df1442221ad23642297e9e3b9 Mon Sep 17 00:00:00 2001 From: Christian Pehle Date: Fri, 17 Nov 2017 15:26:25 +0100 Subject: [PATCH] Fix build on macOS #20 --- src/query.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/query.h b/src/query.h index 4d32793a..bcb60db4 100644 --- a/src/query.h +++ b/src/query.h @@ -51,9 +51,18 @@ struct QueryLocation { MAKE_REFLECT_STRUCT(QueryLocation, path, range); MAKE_HASHABLE(QueryLocation, t.path, t.range); -enum class SymbolKind { Invalid, File, Type, Func, Var }; +enum class SymbolKind : int { Invalid, File, Type, Func, Var }; MAKE_REFLECT_TYPE_PROXY(SymbolKind, int); +namespace std { +template <> struct hash<::SymbolKind> { + size_t operator()(const ::SymbolKind &instance) const { + return std::hash()(static_cast(instance)); + } +}; +} + + struct SymbolIdx { SymbolKind kind; size_t idx;