@@ -394,7 +394,10 @@ HashMap<TKey, TValue, Hash, KeyEqual>& HashMap<TKey, TValue, Hash, KeyEqual>::op
{
const u32 index = other._index[i].index;
if (index != hash_map_internal::FREE && !hash_map_internal::is_deleted(index))
- new (&_data[i]) Entry(other._data[i]);
+ {
+ new (&_data[i]) PAIR(TKey, TValue)(*_allocator);
+ _data[i] = other._data[i];
+ }
}
return *this;
@@ -369,7 +369,10 @@ HashSet<TKey, Hash, KeyEqual>& HashSet<TKey, Hash, KeyEqual>::operator=(const Ha
if (index != hash_set_internal::FREE && !hash_set_internal::is_deleted(index))
- new (&_data[i]) TKey(other._data[i]);
+ construct<TKey>(_data + i, *_allocator, IS_ALLOCATOR_AWARE_TYPE(TKey)());
@@ -315,7 +315,10 @@ inline const Vector<T>& Vector<T>::operator=(const Vector<T>& other)
vector::resize(*this, size);
for (u32 i = 0; i < size; ++i)
- new (&_data[i]) T(other._data[i]);
+ construct<T>(_data + i, *_allocator, IS_ALLOCATOR_AWARE_TYPE(T)());