diff --git a/src/entt/entity/mixin.hpp b/src/entt/entity/mixin.hpp index 5ce068c76..c07345ab2 100644 --- a/src/entt/entity/mixin.hpp +++ b/src/entt/entity/mixin.hpp @@ -39,7 +39,7 @@ struct has_on_destroy auto *any_to_owner(any &value) noexcept { using base_type = basic_registry; - base_type *reg = any_cast(&value); + auto *reg = any_cast(&value); if constexpr(!std::is_same_v) { if(!reg) {