From dd437f9c6b74a2c2fb72b8e61550760267daeb0c Mon Sep 17 00:00:00 2001 From: Tigran Khachatryan <39616689+tigran2008@users.noreply.github.com> Date: Sun, 7 Jul 2024 14:08:19 +0400 Subject: [PATCH] Add forward functions --- include/etl/utility.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/etl/utility.h b/include/etl/utility.h index 52cf0d37c..4c5ecd9b2 100644 --- a/include/etl/utility.h +++ b/include/etl/utility.h @@ -672,6 +672,23 @@ namespace etl } }; #endif + +#if ETL_USING_CPP11 + //***************************************************************************** + // forward + //***************************************************************************** + template + ETL_CONSTEXPR14 T&& forward(typename etl::remove_reference::type& t) noexcept + { + return static_cast(t); + } + + template + ETL_CONSTEXPR14 T&& forward(typename etl::remove_reference::type&& t) noexcept + { + return static_cast(t); + } +#endif } #endif