view_pack: minor changes

This commit is contained in:
Michele Caini
2020-10-19 09:08:49 +02:00
parent cf018ff74c
commit 682bc502e2

View File

@@ -244,7 +244,7 @@ public:
if constexpr(is_applicable_v<Func, decltype(std::tuple_cat(value, std::get<Other>(pack).get(entity)...))>) {
std::apply(func, std::tuple_cat(value, std::get<Other>(pack).get(entity)...));
} else {
const auto args = std::apply([](const auto, auto &&... component) { return std::forward_as_tuple(component...); }, value);
const auto args = std::apply([](const auto, auto &&... component) { return std::forward_as_tuple(std::forward<decltype(component)>(component)...); }, value);
std::apply(func, std::tuple_cat(args, std::get<Other>(pack).get(entity)...));
}
}