diff --git a/src/entt/entity/storage.hpp b/src/entt/entity/storage.hpp index c5eb3ed29..0492b1e81 100644 --- a/src/entt/entity/storage.hpp +++ b/src/entt/entity/storage.hpp @@ -234,6 +234,7 @@ class basic_storage: public basic_sparse_set>; using underlying_type = basic_sparse_set>; using underlying_iterator = typename underlying_type::basic_iterator; + using traits_type = component_traits; [[nodiscard]] auto &element_at(const std::size_t pos) const { return payload[pos / traits_type::page_size][fast_mod(pos, traits_type::page_size)]; @@ -396,8 +397,6 @@ public: using element_type = Type; /*! @brief Type of the objects assigned to entities. */ using value_type = element_type; - /*! @brief Component traits. */ - using traits_type = component_traits; /*! @brief Underlying entity identifier. */ using entity_type = Entity; /*! @brief Unsigned integer type. */ @@ -777,6 +776,7 @@ class basic_storage::template rebind_alloc> { using alloc_traits = std::allocator_traits; static_assert(std::is_same_v, "Invalid value type"); + using traits_type = component_traits; public: /*! @brief Base type. */