diff --git a/src/ox/std/vector.hpp b/src/ox/std/vector.hpp index b55e58582..9ee34066d 100644 --- a/src/ox/std/vector.hpp +++ b/src/ox/std/vector.hpp @@ -42,11 +42,13 @@ struct VectorAllocator { } constexpr void moveConstructItemsFrom(T **items, VectorAllocator &src, const std::size_t count, const std::size_t cap) noexcept { - if (cap <= Size) { + // this totally idiotic redundant check (&& count <= Size) is required to address a bug in devkitARM, + // try removing it later + if (cap <= Size && count <= Size) { const auto dstItems = reinterpret_cast(m_data); const auto srcItems = reinterpret_cast(src.m_data); for (auto i = 0u; i < count; ++i) { - new (&dstItems[i]) T(std::move(srcItems[i])); + std::construct_at(&dstItems[i], std::move(srcItems[i])); } *items = reinterpret_cast(m_data); }