diff --git a/deps/ox/src/ox/std/array.hpp b/deps/ox/src/ox/std/array.hpp index f4b4ec31..de549ffa 100644 --- a/deps/ox/src/ox/std/array.hpp +++ b/deps/ox/src/ox/std/array.hpp @@ -138,8 +138,6 @@ class Array { public: constexpr Array() noexcept = default; - explicit constexpr Array(std::size_t size) noexcept; - constexpr Array(std::initializer_list list) noexcept; constexpr Array(const Array &other); @@ -216,13 +214,6 @@ constexpr ArrayIt operator+(std::size_t n, const return a + n; } -template -constexpr Array::Array(std::size_t size) noexcept { - for (std::size_t i = 0; i < size; ++i) { - m_items[i] = {}; - } -} - template constexpr Array::Array(std::initializer_list list) noexcept { for (auto i = 0ul; auto &item : list) { @@ -234,7 +225,7 @@ constexpr Array::Array(std::initializer_list list) noexcept { template constexpr Array::Array(const Array &other) { for (std::size_t i = 0; i < ArraySize; ++i) { - new (&m_items[i]) T(other.m_items[i]); + m_items[i] = T(other.m_items[i]); } } @@ -242,7 +233,7 @@ template constexpr Array::Array(Array &&other) noexcept { if (this != &other) { for (std::size_t i = 0; i < ArraySize; ++i) { - new (&m_items[i]) T(std::move(other.m_items[i])); + m_items[i] = T(std::move(other.m_items[i])); } } }