From 976ed6d2e83cf3bcbc419997dea815d21db24c00 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Tue, 4 Aug 2020 10:55:43 -0700 Subject: [PATCH] Fix std::hash overload on g++ 6 Fixes a build error introduced in 6eab9275d0770. --- src/highlight.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/highlight.h b/src/highlight.h index 6a873f90c..5d904e75a 100644 --- a/src/highlight.h +++ b/src/highlight.h @@ -70,14 +70,16 @@ struct highlight_spec_t { } }; +namespace std { template <> -struct std::hash { +struct hash { std::size_t operator()(const highlight_spec_t &v) const { size_t vals[4] = {static_cast(v.foreground), static_cast(v.background), v.valid_path, v.force_underline}; return (vals[0] << 0) + (vals[1] << 6) + (vals[2] << 12) + (vals[3] << 18); } }; +} // namespace std class history_item_t; class operation_context_t;