[ox/std] Enable unsafe buffer warnings
This commit is contained in:
9
deps/ox/src/ox/std/array.hpp
vendored
9
deps/ox/src/ox/std/array.hpp
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user