| 1 |
class CpuList { |
| 2 |
public: |
| 3 |
|
| 4 |
// Returns true if `this` and `other` have identical bitmaps, false |
| 5 |
// otherwise. |
| 6 |
// Returns the Union of `this` and `other`. |
| 7 |
int operator+=(const CpuList& other) { |
| 8 |
this->Union(other); |
| 9 |
return *this; |
| 10 |
} |
| 11 |
|
| 12 |
// Returns the Union of `lhs` and `rhs`. |
| 13 |
CpuList operator+(CpuList lhs, const CpuList& rhs) { |
| 14 |
lhs += rhs; |
| 15 |
return lhs; |
| 16 |
} |
| 17 |
|
| 18 |
private: |
| 19 |
// Returns the result of `this.Subtract(other)`. |
| 20 |
CpuList operator-=(const CpuList& other) { |
| 21 |
this->Subtract(other); |
| 22 |
return *this; |
| 23 |
} |
| 24 |
|
| 25 |
// Returns the result of `lhs.Subtract(rhs)`. |
| 26 |
CpuList operator-(CpuList lhs, const CpuList& rhs) { |
| 27 |
lhs -= rhs; |
| 28 |
return lhs; |
| 29 |
} |
| 30 |
}; |