32#ifndef FENNEC_CONTAINERS_ARRAY_H
33#define FENNEC_CONTAINERS_ARRAY_H
63template<
typename ValueT,
size_t ElemV>
91 [[nodiscard]]
constexpr size_t size()
const {
return ElemV; }
96 [[nodiscard]]
constexpr bool_t empty()
const {
return ElemV == 0; }
110 assertd(i < ElemV,
"Array Out of Bounds");
126 assertd(i < ElemV,
"Array Out of Bounds");
148 return data[ElemV - 1];
155 return data[ElemV - 1];
222 return ((lhs[i] == rhs[i]) && ...);
Data Structure that defines a compile-time allocated array.
Definition array.h:64
constexpr value_t & back()
Access the first element.
Definition array.h:147
value_t data[ElemV]
backing c-style array handle
Definition array.h:77
constexpr const value_t & front() const
Const Access the first element.
Definition array.h:140
constexpr value_t * begin()
C++ Iterator Specification begin()
Definition array.h:190
constexpr const value_t * begin() const
Const C++ Iterator Specification begin()
Definition array.h:206
friend constexpr bool_t operator==(const array &lhs, const array &rhs)
Checks if all elements in the arrays are equal.
Definition array.h:169
constexpr value_t & operator[](size_t i)
Definition array.h:109
constexpr size_t size() const
returns the number of elements in the array
Definition array.h:91
constexpr bool_t empty() const
returns true when the array is empty
Definition array.h:96
constexpr value_t & front()
Access the first element.
Definition array.h:133
friend constexpr bool_t operator!=(const array &lhs, const array &rhs)
Checks if any element in the arrays is not equal.
Definition array.h:175
constexpr const value_t & back() const
Const Access the first element.
Definition array.h:154
constexpr const value_t & operator[](size_t i) const
access specified element
Definition array.h:125
constexpr const value_t * end() const
Const C++ Iterator Specification end()
Definition array.h:213
ValueT value_t
Alias for ValueT
Definition array.h:68
constexpr value_t * end()
C++ Iterator Specification end()
Definition array.h:197
bool bool_t
A conditional type.
Definition types.h:214