[fix](fixed_hashtable) The incorrect implementation of copy constructor (#18921)

This commit is contained in:
Jerry Hu
2023-04-24 08:36:52 +08:00
committed by GitHub
parent 4ba6c8b6ce
commit 0c95d760fe

View File

@ -200,8 +200,9 @@ public:
destroy_elements();
free();
const auto new_size = rhs.size();
std::swap(buf, rhs.buf);
this->set_size(rhs.size());
this->set_size(new_size);
Allocator::operator=(std::move(rhs));
Cell::State::operator=(std::move(rhs));