From 2dcc9bd0aacba6a02ee596028e0b0d1aa0ad0cd1 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Tue, 10 Dec 2024 09:36:21 +0100 Subject: [PATCH] view: internal changes --- src/entt/entity/view.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); }