HeapArray: Add missing field swap

This commit is contained in:
Stenzek 2024-05-04 23:38:18 +10:00 committed by Connor McLaughlin
parent 89f4ac9b9a
commit 90338ed065
1 changed files with 5 additions and 1 deletions

View File

@ -251,7 +251,11 @@ public:
void fill(const_reference value) { std::fill(begin(), end(), value); }
void swap(this_type& move) { std::swap(m_data, move.m_data); }
void swap(this_type& move)
{
std::swap(m_data, move.m_data);
std::swap(m_size, move.m_size);
}
void resize(size_t new_size) { internal_resize(new_size, m_data, m_size); }