tuple/value: forward the arguments from map to the helper function
This commit is contained in:
parent
1f1f6ddbaf
commit
34ab275578
@ -46,7 +46,9 @@ namespace cruft::tuple::value {
|
|||||||
auto
|
auto
|
||||||
map (std::index_sequence<Indices...>, FuncT &&func, ArgT &&arg)
|
map (std::index_sequence<Indices...>, FuncT &&func, ArgT &&arg)
|
||||||
{
|
{
|
||||||
return std::tuple (std::invoke (func, std::get<Indices> (arg))...);
|
return std::tuple (
|
||||||
|
std::invoke (func, std::get<Indices> (arg))...
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -62,7 +64,11 @@ namespace cruft::tuple::value {
|
|||||||
>
|
>
|
||||||
auto map (FuncT &&func, ArgT &&arg)
|
auto map (FuncT &&func, ArgT &&arg)
|
||||||
{
|
{
|
||||||
return detail::map (IndicesV{}, func, arg);
|
return detail::map (
|
||||||
|
IndicesV{},
|
||||||
|
std::forward<FuncT> (func),
|
||||||
|
std::forward<ArgT> (arg)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user