Просмотр исходного кода

group: move a static assert on storage types out from handlers

Michele Caini 1 год назад
Родитель
Сommit
38c7cddac0
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/entt/entity/group.hpp

+ 3 - 1
src/entt/entity/group.hpp

@@ -104,7 +104,6 @@ class group_handler;
 template<typename... Owned, typename... Get, typename... Exclude>
 class group_handler<owned_t<Owned...>, get_t<Get...>, exclude_t<Exclude...>> 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::bool_constant<component_traits<typename Owned::value_type>::in_place_delete>...>, "Groups do not support in-place delete");
     static_assert(!std::disjunction_v<std::is_const<Owned>..., std::is_const<Get>..., std::is_const<Exclude>...>, "Const storage type not allowed");
 
     using base_type = std::common_type_t<typename Owned::base_type..., typename Get::base_type..., typename Exclude::base_type...>;
@@ -689,6 +688,9 @@ private:
  */
 template<typename... Owned, typename... Get, typename... Exclude>
 class basic_group<owned_t<Owned...>, get_t<Get...>, exclude_t<Exclude...>> {
+    // nasty workaround for an issue with the toolset v141 that doesn't accept a fold expression here
+    static_assert(!std::disjunction_v<std::bool_constant<component_traits<typename Owned::value_type>::in_place_delete>...>, "Groups do not support in-place delete");
+
     using base_type = std::common_type_t<typename Owned::base_type..., typename Get::base_type..., typename Exclude::base_type...>;
     using underlying_type = typename base_type::entity_type;