diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-24 15:31:17 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-24 15:32:32 +0100 |
| commit | 97868f338a02ad5acd8049f0ba0474d330e11877 (patch) | |
| tree | 34d7642918ea47c899ea2a009384576f41dbb527 /include/CoreRuntimeKit/C++/utility | |
| parent | 41458b7253c524db10088657c930d300fc1b09ca (diff) | |
feat: More runtime improvements for Nectar and NeKernel C++ Runtime.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/CoreRuntimeKit/C++/utility')
| -rw-r--r-- | include/CoreRuntimeKit/C++/utility | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/CoreRuntimeKit/C++/utility b/include/CoreRuntimeKit/C++/utility new file mode 100644 index 0000000..0ee2735 --- /dev/null +++ b/include/CoreRuntimeKit/C++/utility @@ -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 |
