mirror of
https://github.com/Tessil/robin-map.git
synced 2026-01-17 20:21:18 +01:00
Clear and shrink the moved hash table in the move operator to be coherent with the move constructor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user