diff --git a/src/entt/entity/view.hpp b/src/entt/entity/view.hpp index c776c1163..c588b37a0 100644 --- a/src/entt/entity/view.hpp +++ b/src/entt/entity/view.hpp @@ -436,6 +436,9 @@ class basic_view, exclude_t, std::enable_if_t<(sizeof. : public basic_common_view, internal::tombstone_check_v, sizeof...(Get), sizeof...(Exclude)> { using base_type = basic_common_view, internal::tombstone_check_v, sizeof...(Get), sizeof...(Exclude)>; + template + using element_at = type_list_element_t>; + template static constexpr std::size_t index_of = type_list_index_v, type_list>; @@ -541,8 +544,7 @@ public: */ template [[nodiscard]] auto *storage() const noexcept { - using type = type_list_element_t>; - return static_cast(const_cast *>(base_type::storage(Index))); + return static_cast *>(const_cast> *>(base_type::storage(Index))); } /** @@ -563,7 +565,7 @@ public: */ template void storage(Type &elem) noexcept { - static_assert(std::is_convertible_v> &>, "Unexpected type"); + static_assert(std::is_convertible_v &>, "Unexpected type"); base_type::storage(Index, &elem); }