operator=() should preserve load_factor - issue #136

This commit is contained in:
greg
2022-04-01 14:01:39 -04:00
parent fd2a3f9b4a
commit 4368cd39f2
+1 -1
View File
@@ -1154,7 +1154,7 @@ public:
raw_hash_set(const raw_hash_set& that, const allocator_type& a)
: raw_hash_set(0, that.hash_ref(), that.eq_ref(), a) {
reserve(that.size());
reserve(that.capacity());
// Because the table is guaranteed to be empty, we can do something faster
// than a full `insert`.
for (const auto& v : that) {