diff --git a/libs/util/include/psemek/util/ecs.hpp b/libs/util/include/psemek/util/ecs.hpp index d652b1f4..dc0dff52 100644 --- a/libs/util/include/psemek/util/ecs.hpp +++ b/libs/util/include/psemek/util/ecs.hpp @@ -53,7 +53,7 @@ namespace psemek::util template void apply(Behavior & behavior) { - apply_impl(behavior, typename Behavior::component_types{}); + apply_impl(behavior, static_cast(nullptr), std::make_index_sequence>{}); } virtual ~species_base() {} @@ -65,12 +65,12 @@ namespace psemek::util private: - template - void apply_impl(Behavior & behavior, std::tuple) + template + void apply_impl(Behavior & behavior, std::tuple *, std::index_sequence) { std::tuple cptrs; - ((std::get(cptrs) = get_entity_component()), ...); + ((std::get(cptrs) = get_entity_component()), ...); auto all_nonzero = [](auto * ... ptrs) {