aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-07-14 20:21:01 +0000
committerFelix Morgner <felix.morgner@ost.ch>2025-07-14 20:21:01 +0000
commitbe0d5d9453edb871393cd8ee5c83ad15f6ef8c9d (patch)
treea2bf7d430177cd33269ef282d917248e1c3f67c8
parent67785bfc07072fce56331052c1cd8de023eb2f4c (diff)
downloadteachos-be0d5d9453edb871393cd8ee5c83ad15f6ef8c9d.tar.xz
teachos-be0d5d9453edb871393cd8ee5c83ad15f6ef8c9d.zip
libs: move stack to kstd
-rw-r--r--libs/kstd/include/kstd/stack.hpp (renamed from arch/x86_64/include/arch/stl/stack.hpp)17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86_64/include/arch/stl/stack.hpp b/libs/kstd/include/kstd/stack.hpp
index 48bcf10..8c702cf 100644
--- a/arch/x86_64/include/arch/stl/stack.hpp
+++ b/libs/kstd/include/kstd/stack.hpp
@@ -1,10 +1,11 @@
-#ifndef TEACHOS_ARCH_X86_64_STL_STACK_HPP
-#define TEACHOS_ARCH_X86_64_STL_STACK_HPP
+#ifndef KSTD_STACK_HPP
+#define KSTD_STACK_HPP
-#include "arch/exception_handling/panic.hpp"
-#include "arch/stl/vector.hpp"
+#include "kstd/vector.hpp"
-namespace teachos::arch::stl
+#include <utility>
+
+namespace kstd
{
/**
* @brief Custom stack implementation mirroring the std::stack to allow for the usage of STL functionality with our
@@ -14,7 +15,7 @@ namespace teachos::arch::stl
* @tparam Container Actual underlying container that should be wrapped to provide stack functionality. Requires
* access to pop_back(), push_back(), back(), size(), empty() and emplace_back()
*/
- template<typename T, typename Container = stl::vector<T>>
+ template<typename T, typename Container = kstd::vector<T>>
struct stack
{
using container_type = Container; ///< Type of the underlying container used to implement stack-like interface.
@@ -207,6 +208,6 @@ namespace teachos::arch::stl
container_type _container = {}; ///< Underlying container used by the stack to actually save the data.
};
-} // namespace teachos::arch::stl
+} // namespace kstd
-#endif // TEACHOS_ARCH_X86_64_STL_STACK_HPP
+#endif