This commit is contained in:
7
deps/nostalgia/deps/ox/src/ox/std/vector.hpp
vendored
7
deps/nostalgia/deps/ox/src/ox/std/vector.hpp
vendored
@@ -57,7 +57,14 @@ struct VectorAllocator {
|
|||||||
if (cap <= m_data.size() && count <= m_data.size()) {
|
if (cap <= m_data.size() && count <= m_data.size()) {
|
||||||
for (auto i = 0u; i < count; ++i) {
|
for (auto i = 0u; i < count; ++i) {
|
||||||
auto const srcItem = std::launder(reinterpret_cast<T*>(&src->m_data[i]));
|
auto const srcItem = std::launder(reinterpret_cast<T*>(&src->m_data[i]));
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 12
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Werror=stringop-overflow="
|
||||||
|
#endif
|
||||||
new (&m_data[i]) T(std::move(*srcItem));
|
new (&m_data[i]) T(std::move(*srcItem));
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 12
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (count) {
|
if (count) {
|
||||||
*items = std::launder(reinterpret_cast<T*>(m_data.data()));
|
*items = std::launder(reinterpret_cast<T*>(m_data.data()));
|
||||||
|
Reference in New Issue
Block a user