Michele Caini 5 роки тому
батько
коміт
682bc502e2
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      src/entt/entity/view_pack.hpp

+ 1 - 1
src/entt/entity/view_pack.hpp

@@ -244,7 +244,7 @@ public:
                 if constexpr(is_applicable_v<Func, decltype(std::tuple_cat(value, std::get<Other>(pack).get(entity)...))>) {
                 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)...));
                     std::apply(func, std::tuple_cat(value, std::get<Other>(pack).get(entity)...));
                 } else {
                 } 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)...));
                     std::apply(func, std::tuple_cat(args, std::get<Other>(pack).get(entity)...));
                 }
                 }
             }
             }