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;