diff --git a/include/etl/platform.h b/include/etl/platform.h index cab27d25..0a0e09f1 100644 --- a/include/etl/platform.h +++ b/include/etl/platform.h @@ -94,4 +94,12 @@ SOFTWARE. #define ETL_DELETE #endif +#if ETL_CPP11_SUPPORTED + #define ETL_NO_EXCEPT noexcept + #define ETL_NO_EXCEPT_EXPR(expression) noexcept(expression) +#else + #define ETL_NO_EXCEPT + #define ETL_NO_EXCEPT_EXPR(expression) +#endif + #endif diff --git a/include/etl/stl/alternate/utility.h b/include/etl/stl/alternate/utility.h index 5bdce60b..1195778b 100644 --- a/include/etl/stl/alternate/utility.h +++ b/include/etl/stl/alternate/utility.h @@ -148,11 +148,25 @@ SOFTWARE. #endif #if ETL_CPP11_SUPPORTED + //****************************************************************************** template constexpr typename etl::remove_reference::type&& move(T&& t) noexcept { return static_cast::type&&>(t); } + + //****************************************************************************** + template + constexpr T&& forward(typename etl::remove_reference::type& t) noexcept + { + return static_cast(t); + } + + template + constexpr T&& forward(typename etl::remove_reference::type&& t) noexcept + { + return static_cast(t); + } #endif }