Skip to content

Commit

Permalink
Fixed perfect forwarding for make_xxx helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jwellbelove committed Dec 30, 2022
1 parent ddf557a commit 58136ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/etl/forward_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)... } };
}
Expand Down
2 changes: 1 addition & 1 deletion include/etl/indirect_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)... } };
}
Expand Down
2 changes: 1 addition & 1 deletion include/etl/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)... } };
}
Expand Down

0 comments on commit 58136ca

Please sign in to comment.