Skip to content

Commit f1e7457

Browse files
committed
Clear and shrink the moved hash table in the move operator to be coherent with the move constructor
1 parent 4abcc97 commit f1e7457

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/tsl/robin_hash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ class robin_hash : private Hash, private KeyEqual, private GrowthPolicy {
670670

671671
robin_hash& operator=(robin_hash&& other) {
672672
other.swap(*this);
673-
other.clear();
673+
other.clear_and_shrink();
674674

675675
return *this;
676676
}

0 commit comments

Comments
 (0)