diff --git a/src/entt/entity/group.hpp b/src/entt/entity/group.hpp index ec54701a9..4f87467da 100644 --- a/src/entt/entity/group.hpp +++ b/src/entt/entity/group.hpp @@ -98,16 +98,12 @@ struct group_descriptor { } }; -template +template class group_handler; -template -class group_handler, get_t, exclude_t> final: public group_descriptor { - // nasty workaround for an issue with the toolset v141 that doesn't accept a fold expression here - static_assert(!std::disjunction_v..., std::is_const..., std::is_const...>, "Const storage type not allowed"); - - using base_type = std::common_type_t; - using entity_type = typename base_type::entity_type; +template +class group_handler, get_t, exclude_t> final: public group_descriptor { + using entity_type = typename Type::entity_type; template void swap_elements(const std::size_t pos, const entity_type entt, std::index_sequence) { @@ -135,8 +131,8 @@ class group_handler, get_t, exclude_t> fin } public: - using common_type = base_type; - using size_type = typename base_type::size_type; + using common_type = Type; + using size_type = typename Type::size_type; group_handler(Owned &...opool, Get &...gpool, Exclude &...epool) : pools{&opool..., &gpool...}, @@ -181,13 +177,9 @@ private: std::size_t len; }; -template -class group_handler, get_t, exclude_t> final: public group_descriptor { - // nasty workaround for an issue with the toolset v141 that doesn't accept a fold expression here - static_assert(!std::disjunction_v..., std::is_const...>, "Const storage type not allowed"); - - using base_type = std::common_type_t; - using entity_type = typename base_type::entity_type; +template +class group_handler, get_t, exclude_t> final: public group_descriptor { + using entity_type = typename Type::entity_type; void push_on_construct(const entity_type entt) { if(!elem.contains(entt) @@ -210,7 +202,7 @@ class group_handler, get_t, exclude_t> final: publ } public: - using common_type = base_type; + using common_type = Type; template group_handler(const Alloc &alloc, Get &...gpool, Exclude &...epool) @@ -245,7 +237,7 @@ public: private: std::array pools; std::array filter; - base_type elem; + common_type elem; }; } // namespace internal @@ -310,7 +302,7 @@ public: /*! @brief Iterable group type. */ using iterable = iterable_adaptor, get_t>>; /*! @brief Group handler type. */ - using handler = internal::group_handler, get_t...>, exclude_t...>>; + using handler = internal::group_handler, get_t...>, exclude_t...>>; /*! @brief Default constructor to use to create empty, invalid groups. */ basic_group() noexcept @@ -717,7 +709,7 @@ public: /*! @brief Iterable group type. */ using iterable = iterable_adaptor, get_t>>; /*! @brief Group handler type. */ - using handler = internal::group_handler...>, get_t...>, exclude_t...>>; + using handler = internal::group_handler...>, get_t...>, exclude_t...>>; /*! @brief Default constructor to use to create empty, invalid groups. */ basic_group() noexcept