/* ======================================== Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ #ifndef NEKIT_ARRAY_H #define NEKIT_ARRAY_H #include #include #include namespace Kernel { template class Array final { public: explicit Array() = default; ~Array() = default; Array& operator=(const Array&) = default; Array(const Array&) = default; T& operator[](const SizeT& at) { return fArray[at]; } const T& operator[](const SizeT& at) const { return fArray[at]; } Boolean Empty() { return this->Count() > 0; } SizeT Capacity() { return N; } SizeT Count() { return N; } const T* CData() { return fArray; } explicit operator bool() { return !this->Empty(); } private: T fArray[N]; }; template inline auto make_array(ValueType& val) -> auto { return Array{val}; } } // namespace Kernel #endif