diff options
Diffstat (limited to 'src/kernel/NeKit/InitializerList.h')
| -rw-r--r-- | src/kernel/NeKit/InitializerList.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kernel/NeKit/InitializerList.h b/src/kernel/NeKit/InitializerList.h index 46639d4d..e21bd6bd 100644 --- a/src/kernel/NeKit/InitializerList.h +++ b/src/kernel/NeKit/InitializerList.h @@ -11,12 +11,12 @@ #include <NeKit/ErrorOr.h> namespace Kernel { - // \brief Initalizer List object for containers. +// \brief Initalizer List object for containers. template <class Type, SizeT N> class InitializerList final { public: InitializerList() = delete; - + explicit InitializerList(const Type* list) { if constexpr (N > 0) { for (auto i = 0UL; i < N; ++i) { @@ -30,9 +30,9 @@ class InitializerList final { InitializerList& operator=(const InitializerList&) = delete; InitializerList(const InitializerList&) = delete; - Type* begin() { return fList; } - Type* end() { return fList + N; } - + Type* begin() { return fList; } + Type* end() { return fList + N; } + constexpr SizeT size() const { return N; } Type* operator->() { return this->begin(); } |
