diff --git a/src/entt/entity/mixin.hpp b/src/entt/entity/mixin.hpp index e18a67c9f..e4a9331a7 100644 --- a/src/entt/entity/mixin.hpp +++ b/src/entt/entity/mixin.hpp @@ -136,18 +136,16 @@ public: construction{allocator}, destruction{allocator}, update{allocator} { - using element_type = typename Type::element_type; - - if constexpr(internal::has_on_construct::value) { - entt::sink{construction}.template connect<&element_type::on_construct>(); + if constexpr(internal::has_on_construct::value) { + entt::sink{construction}.template connect<&underlying_type::element_type::on_construct>(); } - if constexpr(internal::has_on_update::value) { - entt::sink{update}.template connect<&element_type::on_update>(); + if constexpr(internal::has_on_update::value) { + entt::sink{update}.template connect<&underlying_type::element_type::on_update>(); } - if constexpr(internal::has_on_destroy::value) { - entt::sink{destruction}.template connect<&element_type::on_destroy>(); + if constexpr(internal::has_on_destroy::value) { + entt::sink{destruction}.template connect<&underlying_type::element_type::on_destroy>(); } }