diff options
author | David Shah <davey1576@gmail.com> | 2018-11-27 18:32:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 18:32:24 +0000 |
commit | e99e2f15701a761049a600e37b9e30482de44534 (patch) | |
tree | 255206ae249daf6ec352a97e51fac7520bd01424 /common | |
parent | cdfd35e6aaadd2f07ee5c00f51a13a1c74301748 (diff) | |
parent | 0b5748a7afeb914efa80b7856d0d6c53e5b4f8ec (diff) | |
download | nextpnr-e99e2f15701a761049a600e37b9e30482de44534.tar.gz nextpnr-e99e2f15701a761049a600e37b9e30482de44534.tar.bz2 nextpnr-e99e2f15701a761049a600e37b9e30482de44534.zip |
Merge pull request #152 from YosysHQ/compile_fix
Fix compile on GCC 5.5 or older
Diffstat (limited to 'common')
-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 |