From 3a2995a67b53d41c81ed0a282527a161493d6a3f Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 19 Jul 2022 21:10:50 -0500 Subject: [PATCH] [ox/std] Fix Vector move to not do small vector opt in consteval --- deps/ox/src/ox/std/vector.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/ox/src/ox/std/vector.hpp b/deps/ox/src/ox/std/vector.hpp index e539846c..47082cf1 100644 --- a/deps/ox/src/ox/std/vector.hpp +++ b/deps/ox/src/ox/std/vector.hpp @@ -44,7 +44,7 @@ struct VectorAllocator { constexpr void moveConstructItemsFrom(T **items, VectorAllocator &src, const std::size_t count, const std::size_t cap) noexcept { // this totally idiotic redundant check (&& count <= Size) is required to address a bug in devkitARM, // try removing it later - if (cap <= Size && count <= Size) { + if (!std::is_constant_evaluated() && 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) { @@ -57,7 +57,7 @@ struct VectorAllocator { constexpr void moveItemsFrom(T **items, VectorAllocator &src, const std::size_t count, const std::size_t cap) noexcept { // this totally idiotic redundant check (&& count <= Size) is required to address a bug in devkitARM, // try removing it later - if (cap <= Size && count <= Size) { + if (!std::is_constant_evaluated() && cap <= Size && count <= Size) { const auto dstItems = reinterpret_cast(m_data); const auto srcItems = reinterpret_cast(src.m_data); for (std::size_t i = 0; i < count; ++i) {