Open MathieuDutSik opened 3 years ago
Hi,
Thank you for the report, it can be fixed. Currently the rehash_impl
creates a new sparse_hash
and move/copy the values from the old hash map to the new one and then swap the two maps but unfortunately lambdas, and thus Hash
and KeyEqual
, are not swappable so sparse_hash::swap
can't be called. It would be possible to just create a new m_sparse_buckets
array and swap it instead of creating a full sparse_hash
.
I will check to fix the problem when I can find some time to work on it.
Thibaut
The code
does not compile. This is not dramatic as the following does:
but could this be addressed? This would allow better compatibility with the
std::unordered_map
for whichtsl::sparse_map
is a replacement.