Don't try to memcpy from nullptr Array source even with zero size
@@ -60,8 +60,10 @@ Array<T>::Array(const Array & rhs)
: _array(rhs._array.create(rhs.size() * sizeof(T))),
_sz(rhs.size())
{
+ if (_sz > 0) [[likely]] {
construct(array(0), rhs.array(0), _sz, std::is_trivially_copyable<T>());
}
+}
template <typename T>
Array<T> & Array<T>::operator =(const Array & rhs)
