tuple/value: map
should return return a forwarding tuple
This allows us to maintain references, rather than provoke copies.
This commit is contained in:
parent
a25a16e00e
commit
ebb99a6f4e
@ -144,7 +144,7 @@ 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 (
|
return std::forward_as_tuple (
|
||||||
std::invoke (func, std::get<Indices> (arg))...
|
std::invoke (func, std::get<Indices> (arg))...
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user