Clear and shrink the moved hash table in the move operator to be coherent with the move constructor

This commit is contained in:
Tessil
2022-05-21 19:39:49 +01:00
parent 4abcc978b9
commit f1e7457a71

View File

@@ -670,7 +670,7 @@ class robin_hash : private Hash, private KeyEqual, private GrowthPolicy {
robin_hash& operator=(robin_hash&& other) {
other.swap(*this);
other.clear();
other.clear_and_shrink();
return *this;
}