Better fix for iussue #136

This commit is contained in:
greg
2022-04-01 14:20:10 -04:00
parent 4368cd39f2
commit 8c2d84b138
2 changed files with 7 additions and 2 deletions
+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.capacity());
rehash(that.capacity()); // operator=() should preserve load_factor
// Because the table is guaranteed to be empty, we can do something faster
// than a full `insert`.
for (const auto& v : that) {