diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-02 19:38:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-02 19:38:46 +0200 |
| commit | 997be16e5ac9a68d54882ab69529815860d62955 (patch) | |
| tree | 19d6129c2d776bb1edc5d4a7325e39ca176c3403 /dev/boot/BootKit/Shared/base.h | |
| parent | 618104e74c195d7508a18450524f8ed7f9af8cc6 (diff) | |
| parent | b3b4b1ebdcd6adeac914869017c86d892b7a8ced (diff) | |
Merge pull request #28 from nekernel-org/dev
0.0.2
Diffstat (limited to 'dev/boot/BootKit/Shared/base.h')
| -rw-r--r-- | dev/boot/BootKit/Shared/base.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/dev/boot/BootKit/Shared/base.h b/dev/boot/BootKit/Shared/base.h index 88459ec3..c95db0cc 100644 --- a/dev/boot/BootKit/Shared/base.h +++ b/dev/boot/BootKit/Shared/base.h @@ -1,26 +1,24 @@ #ifndef UTL_BASE_H #define UTL_BASE_H -#include <stdint.h> -#include <stddef.h> #include <math.h> +#include <stddef.h> +#include <stdint.h> -namespace utl -{ +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 <class T, size_t N> - constexpr size_t countof(T (&)[N]) - { - return N; - } +/** + * @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 <class T, size_t N> +constexpr size_t countof(T (&)[N]) { + return N; +} -} // namespace utl +} // namespace utl #endif
\ No newline at end of file |
