summaryrefslogtreecommitdiffhomepage
path: root/src/LibC++/utility.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/LibC++/utility.h')
-rw-r--r--src/LibC++/utility.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/LibC++/utility.h b/src/LibC++/utility.h
new file mode 100644
index 0000000..62096f5
--- /dev/null
+++ b/src/LibC++/utility.h
@@ -0,0 +1,30 @@
+/* ========================================
+
+ Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license.
+
+======================================== */
+
+#ifndef LIBCXX_UTILITY_H
+#define LIBCXX_UTILITY_H
+
+namespace std {
+/// @brief Forward object.
+/// @tparam Args the object type.
+/// @param arg the object.
+/// @return object's rvalue
+template <typename Args>
+inline auto forward(Args& arg) -> Args&& {
+ return static_cast<const Args&&>(arg);
+}
+
+/// @brief Move object.
+/// @tparam Args the object type.
+/// @param arg the object.
+/// @return object's rvalue
+template <typename Args>
+inline auto move(Args&& arg) -> Args&& {
+ return static_cast<Args&&>(arg);
+}
+} // namespace std
+
+#endif // LIBCXX_UTILITY_H