From 83d870e58457a1d335a1d9b9966a6a1887cc297b Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 24 Nov 2025 03:02:43 +0100 Subject: feat! breaking changes on kernel sources. Signed-off-by: Amlal El Mahrouss --- src/boot/BootKit/Shared/base.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/boot/BootKit/Shared/base.h (limited to 'src/boot/BootKit/Shared/base.h') diff --git a/src/boot/BootKit/Shared/base.h b/src/boot/BootKit/Shared/base.h new file mode 100644 index 00000000..c95db0cc --- /dev/null +++ b/src/boot/BootKit/Shared/base.h @@ -0,0 +1,24 @@ +#ifndef UTL_BASE_H +#define UTL_BASE_H + +#include +#include +#include + +namespace utl { + +/** + * @brief Helper to get number of elements in array. + * + * @tparam T Auto-deduced element type + * @tparam N Auto-deduced number of elements + * @return Array size + */ +template +constexpr size_t countof(T (&)[N]) { + return N; +} + +} // namespace utl + +#endif \ No newline at end of file -- cgit v1.2.3