diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-11-27 19:20:15 +0100 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-11-27 19:20:15 +0100 |
commit | 0b5748a7afeb914efa80b7856d0d6c53e5b4f8ec (patch) | |
tree | 255206ae249daf6ec352a97e51fac7520bd01424 /common/log.h | |
parent | cdfd35e6aaadd2f07ee5c00f51a13a1c74301748 (diff) | |
download | nextpnr-0b5748a7afeb914efa80b7856d0d6c53e5b4f8ec.tar.gz nextpnr-0b5748a7afeb914efa80b7856d0d6c53e5b4f8ec.tar.bz2 nextpnr-0b5748a7afeb914efa80b7856d0d6c53e5b4f8ec.zip |
Fix compile on GCC 5.5 or older
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 |