From 0b5748a7afeb914efa80b7856d0d6c53e5b4f8ec Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 27 Nov 2018 19:20:15 +0100 Subject: Fix compile on GCC 5.5 or older --- common/log.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'common/log.h') diff --git a/common/log.h b/common/log.h index 77adbb2f..52158f18 100644 --- a/common/log.h +++ b/common/log.h @@ -84,4 +84,14 @@ static inline void log_assert_worker(bool cond, const char *expr, const char *fi NEXTPNR_NAMESPACE_END +namespace std { +template <> struct hash +{ + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX LogLevel &loglevel) const noexcept + { + return std::hash()((int)loglevel); + } +}; +} // namespace std + #endif -- cgit v1.2.3