diff options
Diffstat (limited to 'common/log.h')
-rw-r--r-- | common/log.h | 10 |
1 files changed, 10 insertions, 0 deletions
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<NEXTPNR_NAMESPACE_PREFIX LogLevel> +{ + std::size_t operator()(const NEXTPNR_NAMESPACE_PREFIX LogLevel &loglevel) const noexcept + { + return std::hash<int>()((int)loglevel); + } +}; +} // namespace std + #endif |