Fixed perfect forwarding for make_xxx helper functions

This commit is contained in:
John Wellbelove 2022-12-30 18:10:12 +00:00
parent ddf557a0b2
commit 58136cac7b
3 changed files with 3 additions and 3 deletions

View File

@ -1756,7 +1756,7 @@ namespace etl
//*************************************************************************
#if ETL_USING_CPP11 && ETL_HAS_INITIALIZER_LIST
template <typename... T>
constexpr auto make_forward_list(T... t) -> etl::forward_list<typename etl::common_type_t<T...>, sizeof...(T)>
constexpr auto make_forward_list(T&&... t) -> etl::forward_list<typename etl::common_type_t<T...>, sizeof...(T)>
{
return { { etl::forward<T>(t)... } };
}

View File

@ -1433,7 +1433,7 @@ namespace etl
//*************************************************************************
#if ETL_USING_CPP11 && ETL_HAS_INITIALIZER_LIST
template <typename... T>
constexpr auto make_indirect_vector(T... t) -> etl::indirect_vector<typename etl::common_type_t<T...>, sizeof...(T)>
constexpr auto make_indirect_vector(T&&... t) -> etl::indirect_vector<typename etl::common_type_t<T...>, sizeof...(T)>
{
return { { etl::forward<T>(t)... } };
}

View File

@ -1353,7 +1353,7 @@ namespace etl
//*************************************************************************
#if ETL_USING_CPP11 && ETL_HAS_INITIALIZER_LIST
template <typename... T>
constexpr auto make_vector(T... t) -> etl::vector<typename etl::common_type_t<T...>, sizeof...(T)>
constexpr auto make_vector(T&&... t) -> etl::vector<typename etl::common_type_t<T...>, sizeof...(T)>
{
return { { etl::forward<T>(t)... } };
}