[ox/std] Enable unsafe buffer warnings

This commit is contained in:
2024-11-26 21:59:26 -06:00
parent e44fa288fd
commit 9b8a8c4e46
24 changed files with 119 additions and 202 deletions

View File

@@ -9,6 +9,7 @@
#pragma once
#include "bit.hpp"
#include "def.hpp"
#include "error.hpp"
#include "initializerlist.hpp"
#include "iterator.hpp"
@@ -17,6 +18,8 @@
#include "types.hpp"
#include "utility.hpp"
OX_CLANG_NOWARN_BEGIN(-Wunsafe-buffer-usage)
namespace ox {
template<typename T, std::size_t ArraySize>
@@ -35,6 +38,10 @@ class Array {
public:
constexpr Array() noexcept = default;
template<typename ...Args>
constexpr Array(Args ...list) noexcept: m_items{std::move(list)...} {
}
constexpr Array(std::initializer_list<T> list) noexcept;
constexpr Array(const Array &other);
@@ -200,3 +207,5 @@ constexpr bool Array<T, ArraySize>::contains(const T &v) const {
}
}
OX_CLANG_NOWARN_END