- typedef std::pair<RTLIL::Wire*,int> bitDef_t;
- std::map<bitDef_t, std::set<T, Compare>> bits;
+ static_assert(!std::is_same<Compare,void>::value, "Default value for `Compare' class not found for SigSet<T>. Please specify.");
+
+ 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) { }
+ unsigned int hash() const { return first->name.hash() + second; }
+ };
+
+ dict<bitDef_t, std::set<T, Compare>> bits;