24class [[deprecated(
"deprecated in favour of AStaticVector")]]
AFlatVector {
31 std::size_t size()
const noexcept {
35 T& operator[](std::size_t index)
noexcept {
40 const T& operator[](std::size_t index)
const noexcept {
46 T& at(std::size_t index) {
47 if (index >= size()) {
48 aui::impl::outOfBoundsException();
50 return operator[](index);
54 const T& at(std::size_t index)
const {
55 if (index >= size()) {
56 aui::impl::outOfBoundsException();
58 return operator[](index);
62 return reinterpret_cast<T*
>(&mStorage);
65 const T* data()
const noexcept {
66 return reinterpret_cast<const T*
>(&mStorage);
74 void push_back(T value) {
76 new (data() + mSize) T(std::move(value));
80 push_back(std::move(value));
87 std::size_t mSize = 0;
88 std::aligned_storage_t<
sizeof(T) * MAX_SIZE,
alignof(T)> mStorage;
91 for (
size_t i = 0; i < size(); ++i) {
#define AUI_ASSERTX(condition, what)
Asserts that the passed condition evaluates to true. Adds extra message string.
Definition Assert.h:74