From c04c544470d4f9c0a34bec7c2ce156bbe4af13e7 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 29 Dec 2022 02:05:40 +0200 Subject: [PATCH] Moved std stuff to std.h --- include/memory.hpp | 13 +------------ include/std.hpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 include/std.hpp diff --git a/include/memory.hpp b/include/memory.hpp index 30b8b0d6..9b117dd0 100644 --- a/include/memory.hpp +++ b/include/memory.hpp @@ -6,6 +6,7 @@ #include #include #include +#include #endif // __cplusplus #include @@ -658,18 +659,6 @@ namespace Memory }; } -/** - * @brief // stub namespace for std::align_val_t and new operator - * @note // Found on https://gcc.gnu.org/legacy-ml/gcc-patches/2016-09/msg00628.html for "_ZnwmSt11align_val_t" compiler error - */ -namespace std -{ - typedef __SIZE_TYPE__ size_t; - enum class align_val_t : std::size_t - { - }; -} - void InitializeMemoryManagement(BootInfo *Info); void *operator new(size_t Size); diff --git a/include/std.hpp b/include/std.hpp new file mode 100644 index 00000000..43c2750e --- /dev/null +++ b/include/std.hpp @@ -0,0 +1,18 @@ +#ifndef __FENNIX_KERNEL_STD_H__ +#define __FENNIX_KERNEL_STD_H__ + +#include + +/** + * @brief // stub namespace for std::align_val_t and new operator + * @note // Found on https://gcc.gnu.org/legacy-ml/gcc-patches/2016-09/msg00628.html for "_ZnwmSt11align_val_t" compiler error + */ +namespace std +{ + typedef __SIZE_TYPE__ size_t; + enum class align_val_t : std::size_t + { + }; +} + +#endif // !__FENNIX_KERNEL_STD_H__