diff --git a/include/memory.hpp b/include/memory.hpp index 30b8b0d..9b117dd 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 0000000..43c2750 --- /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__