From f3d931aa7cfaf96baef8383b59a8938779541ee7 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Thu, 15 Aug 2024 18:35:34 +0200 Subject: [IMP] Moved source code into dev/ folder. Signed-off-by: Amlal EL Mahrouss --- dev/Boot/BootKit/Vendor/Shared/base.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 dev/Boot/BootKit/Vendor/Shared/base.h (limited to 'dev/Boot/BootKit/Vendor/Shared/base.h') diff --git a/dev/Boot/BootKit/Vendor/Shared/base.h b/dev/Boot/BootKit/Vendor/Shared/base.h new file mode 100644 index 00000000..d1c028d7 --- /dev/null +++ b/dev/Boot/BootKit/Vendor/Shared/base.h @@ -0,0 +1,26 @@ +#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