Equality comparison (set equality: same elements, order-independent)
| 152 | |
| 153 | /// Equality comparison (set equality: same elements, order-independent) |
| 154 | bool operator==(const unordered_set& other) const { |
| 155 | if (size() != other.size()) return false; |
| 156 | for (const auto& key : *this) { |
| 157 | if (!other.has(key)) return false; |
| 158 | } |
| 159 | return true; |
| 160 | } |
| 161 | |
| 162 | /// Inequality comparison |
| 163 | bool operator!=(const unordered_set& other) const { |