diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-27 01:43:44 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-27 01:43:44 +0100 |
| commit | 2174548c1cd0695399275dc59f1e4e3f726b4a6f (patch) | |
| tree | f4f3ae198e311686be8d13ba7c9e6d28c49177f5 /include/CoreRuntime/cplusplus/utility.hpp | |
| parent | 81c082643568ef4507c92c6f8c4d7f2778274aa6 (diff) | |
[FEAT] Refactor CoreRuntimeKit to CoreRuntime and its design.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/CoreRuntime/cplusplus/utility.hpp')
| -rw-r--r-- | include/CoreRuntime/cplusplus/utility.hpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/CoreRuntime/cplusplus/utility.hpp b/include/CoreRuntime/cplusplus/utility.hpp new file mode 100644 index 0000000..a427c44 --- /dev/null +++ b/include/CoreRuntime/cplusplus/utility.hpp @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/ne-foss-org/nectar + +#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 |
