diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-09-12 11:45:17 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-09-12 11:45:17 -0700 |
commit | c05a403dd10cdc847c81baff962068d9b401053a (patch) | |
tree | ba05f5a5940fa85fbdbab1d8533a795cf3515bba /kernel | |
parent | 4ea34aaacdf6f76e11a83d5eb2a53ba7e75f7c11 (diff) | |
download | yosys-c05a403dd10cdc847c81baff962068d9b401053a.tar.gz yosys-c05a403dd10cdc847c81baff962068d9b401053a.tar.bz2 yosys-c05a403dd10cdc847c81baff962068d9b401053a.zip |
static_assert to enforce this going forward
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sigtools.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sigtools.h b/kernel/sigtools.h index 4e97bb775..094d73941 100644 --- a/kernel/sigtools.h +++ b/kernel/sigtools.h @@ -138,6 +138,8 @@ struct SigPool template <typename T, class Compare = std::less<T>> struct SigSet { + static_assert(!std::is_pointer<T>::value || !std::is_same<Compare, std::less<T>>::value, "Explicit `Compare' class require for SigSet with pointer-type values!"); + struct bitDef_t : public std::pair<RTLIL::Wire*, int> { bitDef_t() : std::pair<RTLIL::Wire*, int>(NULL, 0) { } bitDef_t(const RTLIL::SigBit &bit) : std::pair<RTLIL::Wire*, int>(bit.wire, bit.offset) { } |