// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) // Official repository: https://github.com/ne-foss-org/nekernel #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