+
+ bool operator== (const DeviceSpec &other) const {
+ return type == other.type && index == other.index;
+ }
+
+ bool operator< (const DeviceSpec &other) const {
+ if (type != other.type)
+ return type < other.type;
+ return index < other.index;
+ }