summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-12 10:02:56 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-12 10:02:56 +0100
commit8da4440aaf766ca9adc054517826a455a8cb8ded (patch)
tree5098b1e0d50ef9b305f60a75bbd90e95855f5b2f
parentba8ddb24e0ac6c7b1a617519a4bde9970610fbcc (diff)
Add documentation for NewKit's move and forward functions.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
-rw-r--r--Private/NewKit/Defines.hpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/Private/NewKit/Defines.hpp b/Private/NewKit/Defines.hpp
index 8f8d4154..4527df91 100644
--- a/Private/NewKit/Defines.hpp
+++ b/Private/NewKit/Defines.hpp
@@ -68,20 +68,28 @@ using Lba = SSizeT;
enum class Endian : UChar { kEndianLittle, kEndianBig, kEndianMixed, kCount };
+/// @brief Forward object.
+/// @tparam Args the object type.
+/// @param arg the object.
+/// @return object's rvalue
template <typename Args>
-Args &&forward(Args &arg) {
+inline Args &&forward(Args &arg) {
return static_cast<Args &&>(arg);
}
+/// @brief Move object.
+/// @tparam Args the object type.
+/// @param arg the object.
+/// @return object's rvalue
template <typename Args>
-Args &&move(Args &&arg) {
+inline Args &&move(Args &&arg) {
return static_cast<Args &&>(arg);
}
} // namespace HCore
#define DEDUCE_ENDIAN(address, value) \
(((reinterpret_cast<HCore::Char *>(address)[0]) == (value)) \
- ? (HCore::Endian::kEndianBig) \
+ ? (HCore::Endian::kEndianBig) \
: (HCore::Endian::kEndianLittle))
#define Yes (true)