diff --git a/parallel_hashmap/phmap.h b/parallel_hashmap/phmap.h index 3b7f602..48573b9 100644 --- a/parallel_hashmap/phmap.h +++ b/parallel_hashmap/phmap.h @@ -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) {