diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index b3aa1d172..90790c120 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -254,27 +254,27 @@ class basic_registry { template struct group_handler, get_t, exclude_t> { // nasty workaround for an issue with the toolset v141 that doesn't accept a fold expression here - static_assert(!std::disjunction_v::traits_type::in_place_delete>, std::bool_constant::traits_type::in_place_delete>...>, "Groups do not support in-place delete"); + static_assert(!std::disjunction_v, std::bool_constant...>, "Groups do not support in-place delete"); std::size_t current{}; template static void maybe_valid_if(group_handler &handler, basic_registry &owner, const Entity entt) { - if(auto &cpool = owner.storage(); (std::is_same_v || cpool.contains(entt)) && !(cpool.index(entt) < handler.current)) { - const auto other = std::forward_as_tuple(owner.storage()...); + if(auto &cpool = owner.storage(); (std::is_same_v || cpool.contains(entt)) && !(cpool.index(entt) < handler.current)) { + const auto other = std::forward_as_tuple(owner.storage()...); - if(((std::is_same_v || std::get &>(other).contains(entt)) && ...) && ((std::is_same_v || owner.storage().contains(entt)) && ...) && ((std::is_same_v || !owner.storage().contains(entt)) && ...)) { + if(((std::is_same_v || std::get(other).contains(entt)) && ...) && ((std::is_same_v || owner.storage().contains(entt)) && ...) && ((std::is_same_v || !owner.storage().contains(entt)) && ...)) { const auto pos = handler.current++; - (std::get &>(other).swap_elements(std::get &>(other).data()[pos], entt), ...); + (std::get(other).swap_elements(std::get(other).data()[pos], entt), ...); cpool.swap_elements(cpool.data()[pos], entt); } } } static void discard_if(group_handler &handler, basic_registry &owner, const Entity entt) { - if(auto &cpool = owner.storage(); cpool.contains(entt) && (cpool.index(entt) < handler.current)) { + if(auto &cpool = owner.storage(); cpool.contains(entt) && (cpool.index(entt) < handler.current)) { const auto pos = --handler.current; - const auto other = std::forward_as_tuple(owner.storage()...); - (std::get &>(other).swap_elements(std::get &>(other).data()[pos], entt), ...); + const auto other = std::forward_as_tuple(owner.storage()...); + (std::get(other).swap_elements(std::get(other).data()[pos], entt), ...); cpool.swap_elements(cpool.data()[pos], entt); } } @@ -287,7 +287,7 @@ class basic_registry { template static void maybe_valid_if(group_handler &set, basic_registry &owner, const Entity entt) { if(!set.contains(entt)) { - if(((std::is_same_v || owner.storage().contains(entt)) && ...) && ((std::is_same_v || !owner.storage().contains(entt)) && ...)) { + if(((std::is_same_v || owner.storage().contains(entt)) && ...) && ((std::is_same_v || !owner.storage().contains(entt)) && ...)) { set.push(entt); } } @@ -1259,7 +1259,7 @@ public: template [[nodiscard]] basic_group, storage_for_type...>, get_t...>, exclude_t...>> group(get_t = {}, exclude_t = {}) { - using handler_type = group_handler, std::remove_const_t...>, get_t...>, exclude_t...>>; + using handler_type = group_handler>, storage_for_type>...>, get_t>...>, exclude_t>...>>; const auto cpools = std::forward_as_tuple(assure>(), assure>()..., assure>()...); constexpr auto size = 1u + sizeof...(Other) + sizeof...(Get) + sizeof...(Exclude); @@ -1342,7 +1342,7 @@ public: template [[nodiscard]] basic_group, get_t, storage_for_type...>, exclude_t...>> group(get_t, exclude_t = {}) { - using handler_type = group_handler, get_t, std::remove_const_t...>, exclude_t...>>; + using handler_type = group_handler, get_t>, storage_for_type>...>, exclude_t>...>>; const auto cpools = std::forward_as_tuple(assure>(), assure>()...); constexpr auto size = 1u + sizeof...(Other) + sizeof...(Exclude); @@ -1403,7 +1403,7 @@ public: if(it == groups.cend()) { return {}; } else { - using handler_type = group_handler...>, get_t...>, exclude_t...>>; + using handler_type = group_handler>...>, get_t>...>, exclude_t>...>>; if constexpr(sizeof...(Owned) == 0u) { return {*static_cast(it->handler.get()), assure>()..., assure>()..., assure>()...};