Partage
  • Partager sur Facebook
  • Partager sur Twitter

Erreurs de compilation

Sujet résolu
    4 novembre 2023 à 22:25:35

    Salut, j'ai des erreurs de compilations que je ne comprend pas :

    Dans cette classe :

    class ComponentMapping {
                    template <class>
                    friend class World;
                    friend class CloningSystem;
                    friend class MergingSystem;
                    friend class Grid;
                    std::vector<std::vector<EntityId>> childrenMapping;
                    std::vector<std::optional<EntityId>> parentMapping;
                    public :
                    void updateSize(EntityFactory& factory) {
                        childrenMapping.resize(factory.getNbEntities());
                        parentMapping.resize(factory.getNbEntities());
                    }
                    template <typename Factory>
                    void addChild(EntityId parentId, EntityId child, EntityFactory& factory) {
                        childrenMapping.resize(factory.getNbEntities());
                        parentMapping.resize(factory.getNbEntities());
                        childrenMapping[parentId].push_back(child);
                        parentMapping[child] = parentId;
                    }
                    EntityId getRoot(EntityId entityId) {
                        EntityId root = entityId;
                        while (parentMapping[root].has_value()) {
                            root = parentMapping[root].value();
                        }
                        return root;
                    }
                    std::vector<EntityId> getChildren(EntityId entity) {
                        return childrenMapping[entity];
                    }
                    EntityId getParent(EntityId entity) {
                        if(parentMapping[entity].has_value());
                           return parentMapping[entity].value();
                        return -1;
                    }
                    void setParent(EntityId entity, EntityId parent) {
                        parentMapping[entity] = parent;
                    }
                    bool remove(EntityId entity) {
                        for (unsigned int i = 0; i < childrenMapping[entity].size(); i++) {
                            remove(childrenMapping[entity][i]);
                        }
                        childrenMapping[entity].clear();
                    }
                    template <typename... Signature>
                    EntityId clone(EntityFactory& factory, EntityId toClone, EntityId parent = -1) {
                        EntityId clonedId = factory.createEntity(getComponent<EntityInfoComponent>(toClone)->groupName);
                        clone_impl(toClone, clonedId, factory);
                        if (parent != -1) {
                            childrenMapping.resize(factory.getNbEntities());
                            parentMapping.resize(factory.getNbEntities());
                            childrenMapping[parent] = clonedId;
                            parentMapping[clonedId] = parent;
                        }
                        for (unsigned int i = 0; i < childrenMapping[toClone].size(); i++) {
                            clone(factory, childrenMapping[toClone][i], clonedId);
                        }
                        return clonedId;
                    }
                    template <typename... Components, size_t I = 0, class = typename std::enable_if_t<(sizeof...(Components) != 0 && I < sizeof...(Components)-1)>>
                    void clone_impl(EntityId toCloneId, EntityId clonedId, EntityFactory& factory) {
                        //si l'entité possède le composant en question on le clône.
                        if (getComponent<std::tuple_element_t<I, std::tuple<Components...>>(toCloneId)) {
                            addComponent(clonedId, *getComponent<std::tuple_element_t<I, std::tuple<Components...>>(toCloneId), factory);
                        }
                        clone_impl<Components..., I+1>(toCloneId, clonedId, factory);
                    }
                    template <typename... Components, size_t I = 0, class... D, class = typename std::enable_if_t<(sizeof...(Components) != 0 && I == sizeof...(Components)-1)>>
                    void clone_impl(EntityId toCloneId, EntityId clonedId, EntityFactory& factory) {
                        if (getComponent<std::tuple_element_t<I, std::tuple<Components...>>(toCloneId)) {
                            addComponent(clonedId, *getComponent<std::tuple_element_t<I, std::tuple<Components...>>(toCloneId), factory);
                        }
                    }
                    template <typename... Components, size_t I = 0, class... D, class...E, class = typename std::enable_if_t<(sizeof...(Components) == 0)>>
                    void clone_impl(EntityId tocloneId, EntityId clonedId, EntityFactory& factory) {
                    }
                    template <typename... Signature>
                    EntityId merge(EntityFactory& factory, EntityId toMerge1, EntityId toMerge2, std::string groupName, EntityId parent=-1) {
                        EntityId merged = factory.createEntity(groupName);
                        EntityId merged1, merged2;
                        if (parent == -1) {
                            merged1 = factory.createEntity(getComponent<EntityInfoComponent>(toMerge1)->groupName);
                            merged2 = factory.createEntity(getComponent<EntityInfoComponent>(toMerge2)->groupName);
                            merge_node<Signature...>(merged, toMerge1, factory);
                            merge_node<Signature...>(merged, toMerge2, factory);
                            childrenMapping.resize(factory.getNbEntities());
                            parentMapping.resize(factory.getNbEntities());
                            childrenMapping[merged] = merged1;
                            parentMapping[merged1] = merged;
                            childrenMapping[merged] = merged2;
                            parentMapping[merged2] = merged;
                        }
                        if (parent != -1 && toMerge1 != -1) {
                            childrenMapping.resize(factory.getNbEntities());
                            parentMapping.resize(factory.getNbEntities());
                            childrenMapping[parent] = merged;
                            parentMapping[merged] = parent;
                            merge_node<Signature...>(merged, toMerge1, factory);
                        }
                        if (parent != -1 && toMerge2 != -1) {
                            childrenMapping.resize(factory.getNbEntities());
                            parentMapping.resize(factory.getNbEntities());
                            childrenMapping[parent] = merged;
                            parentMapping[merged] = parent;
                            merge_node<Signature...>(merged, toMerge2, factory);
                        }
                        for (unsigned int i = 0; i < childrenMapping[toMerge1].size(); i++) {
                            merge(factory, childrenMapping[toMerge1][i], -1, getComponent<EntityInfoComponent>(childrenMapping[toMerge1][i])->groupName, (parent == -1) ? merged1 : merged);
                        }
                        for (unsigned int i = 0; i < childrenMapping[toMerge2].size(); i++) {
                            merge(factory, -1, childrenMapping[toMerge2][i], getComponent<EntityInfoComponent>(childrenMapping[toMerge2][i])->groupName, (parent == -1) ? merged2 : merged);
                        }
                        return merged;
                    }
                    template <typename... Signature, size_t I = 0, class = typename std::enable_if_t<(sizeof...(Signature) != 0 && I < sizeof...(Signature))>::type
                    void merge_node(EntityId entityId, EntityId toMergeId, EntityFactory& factory) {
                        //si l'entité possède le composant en question on le clône.
                        if (getComponent<std::tuple_element_t<I, std::tuple<Signature...>>(toMergeId)) {
                            componentMapping.addComponent(entityId, *getComponent<std::tuple_element_t<I, std::tuple<Signature...>>(toMergeId), factory);
                        }
                        merge_node<T, I+1>(toCloneId, clonedId, factory);
                    }
                    template <typename... Signature, size_t I = 0, class... D, class = typename std::enable_if_t<(sizeof...(Signature) != 0 && I == sizeof...(Signature))>
                    void merge_node(EntityId entityId, EntityId toMergeId, EntityFactory& factory) {
                        if (getComponent<std::tuple_element_t<I, std::tuple<Signature...>>(toMergeId)) {
                            componentMapping.addComponent(entityId, *getComponent<std::tuple_element_t<I, std::tuple<Signature...>>(toMergeId), factory);
                        }
                    }
                    template <typename... Signature, size_t I = 0, class... D, class...E, class = typename std::enable_if_t<(sizeof...(Signature) == 0)>
                    void merge_node(EntityId tocloneId, EntityId clonedId, EntityFactory& factory) {
                    }
                    template <typename... Signature, typename System, typename... Params>
                    void apply(System& system, std::vector<EntityId>& entities, std::tuple<Params...>& params, bool reverse=false) {
                      if (reverse) {
                          for (unsigned int i = 0; i < entities.size(); i++) {
                            std::vector<EntityId> children = childrenMapping[entities[i]];
                            std::vector<EntityId> addedChildren;
                            while (children.size() > 0) {
                                for (unsigned int i = 0; i < children.size(); i++) {
                                    addedChildren.push_back(children[i]);
                                }
                                if (parentMapping[children[0]].has_value()) {
                                    EntityId parentId = parentMapping[children[0]];
                                    children = childrenMapping[parentId];
                                } else {
                                    children.clear();
                                }
                            }
                            for (unsigned i = 0; i < addedChildren.size(); i++) {
                                this->template apply_impl<Signature...>(addedChildren[i], system, params, std::index_sequence_for<Signature...>());
                            }
                            this->template apply_impl<Signature...>(entities[i], system, params, std::index_sequence_for<Signature...>());
                          }
                      } else {
                          for (unsigned int i = 0; i < entities.size(); i++) {
                            this->template apply_impl<Signature...>(entities[i], system, params, std::index_sequence_for<Signature...>());
                            std::vector<EntityId> children = childrenMapping[entities[i]];
                            std::vector<EntityId> addedChildren;
                            while (children.size() > 0) {
                                for (unsigned int i = 0; i < children.size(); i++) {
                                    addedChildren.push_back(children[i]);
                                }
                                if (parentMapping[children[0]].has_value()) {
                                    EntityId parentId = parentMapping[children[0]];
                                    children = childrenMapping[parentId];
                                } else {
                                    children.clear();
                                }
                            }
                            for (int i = addedChildren.size()-1; i >=0; i++) {
                                this->template apply_impl<Signature...>(addedChildren[i], system, params, std::index_sequence_for<Signature...>());
                            }
                          }
                        }
                    }
    
                    template <typename... Signature, typename System, size_t... I, typename... Params>
                    void apply_impl(EntityId entityId, System& system, std::tuple<Params...>& params, std::index_sequence<I...>) {
                        system.template operator()<Signature...>(entityId, params);
                    }
                    template <typename... Signature, typename System, typename... Params, class R>
                    void apply(System& system, std::vector<EntityId>& entities, std::tuple<Params...>& params, std::vector<R>& ret, bool reverse=false) {
                      if (reverse) {
                          for (unsigned int i = 0; i < entities.size(); i++) {
                            std::vector<EntityId> children = childrenMapping[entities[i]];
                            std::vector<EntityId> addedChildren;
                            while (children.size() > 0) {
                                for (unsigned int i = 0; i < children.size(); i++) {
                                    addedChildren.push_back(children[i]);
                                }
                                if (parentMapping[children[0]].has_value()) {
                                    EntityId parentId = parentMapping[children[0]];
                                    children = childrenMapping[parentId];
                                } else {
                                    children.clear();
                                }
                            }
                            for (unsigned i = 0; i < addedChildren.size(); i++) {
                                this->template apply_impl<Signature...>(addedChildren[i], system, params, std::index_sequence_for<Signature...>(), ret);
                            }
                            this->template apply_impl<Signature...>(entities[i], system, params, std::index_sequence_for<Signature...>(), ret);
                          }
                      } else {
                          for (unsigned int i = 0; i < entities.size(); i++) {
                            this->template apply_impl<Signature...>(entities[i], system, params, std::index_sequence_for<Signature...>(), ret);
                            std::vector<EntityId> children = childrenMapping[entities[i]];
                            std::vector<EntityId> addedChildren;
                            while (children.size() > 0) {
                                for (unsigned int i = 0; i < children.size(); i++) {
                                    addedChildren.push_back(children[i]);
                                }
                                if (parentMapping[children[0]].has_value()) {
                                    EntityId parentId = parentMapping[children[0]];
                                    children = childrenMapping[parentId];
                                } else {
                                    children.clear();
                                }
                            }
                            for (int i = addedChildren.size()-1; i >=0; i++) {
                                this->template apply_impl<Signature...>(addedChildren[i], system, params, std::index_sequence_for<Signature...>(), ret);
                            }
                          }
                      }
                    }
                    template <typename... Signature, typename DynamicTuple, typename System, size_t... I, typename... Params, typename R>
                    void apply_impl(EntityId entityId, DynamicTuple& tuple, System& system, std::tuple<Params...>& params, std::index_sequence<I...>, std::vector<R>& rets) {
    
                        rets.push_back(system.template operator()<Signature...>(entityId, params));
                    }
    
                };




    Voici les erreurs que je ne comprends pas, d'abord celle-ci :

    /home/laurent/gitODFAEG/ODFAEG/src/odfaeg/Graphics/ECS/../../../../include/odfaeg/Graphics/ECS/../../Core/ecs.hpp:169:95: error: two or more data types in declaration of ‘type name’
      169 |                 template <typename... Signature, size_t I = 0, class... D, class...E, class = typename std::enable_if_t<(sizeof...(Signature) == 0)>
    

    Pourtant je n'ai qu'un seul type pas deux ou plus.

    Et cette erreur-ci aussi :

    /home/laurent/gitODFAEG/ODFAEG/src/odfaeg/Graphics/ECS/../../../../include/odfaeg/Graphics/ECS/../../Core/ecs.hpp:103:25: error: parse error in template argument list
      103 |                     if (getComponent<std::tuple_element_t<I, std::tuple<Components...>>(toCloneId)) {
    
    

    Merci.


    • Partager sur Facebook
    • Partager sur Twitter
      5 novembre 2023 à 15:48:08

      Bonjour,

      On ne peut pas mettre plusieurs parameter-packs dans un template sauf si hormis le premier, on peut les résoudre à partir des paramètres de la fonction. Donc tous les class...D et encore moins les class...E ne sont pas valides car aucun paramètres des fonctions ne les caractérisent.

      class=typename std::enable_if_t<(sizeof...(Signature)!=0 && I<sizeof...(Signature))>::type, n'est jamais valide. Ou bien enable_if_t est invalide comme type, ou bien il est résolu en le type void et void::type n'est pas valide!

      Lignes 63, 70 et 129: les <> ne sont pas appairés.

      • Partager sur Facebook
      • Partager sur Twitter
        5 novembre 2023 à 17:56:52

        Salut j'avais oublié de fermer un chevron ce code compile :

        class ComponentMapping {
                        template <class>
                        friend class World;
                        friend class CloningSystem;
                        friend class MergingSystem;
                        friend class Grid;
                        std::vector<std::vector<EntityId>> childrenMapping;
                        std::vector<std::optional<EntityId>> parentMapping;
                        public :
                        void updateSize(EntityFactory& factory) {
                            childrenMapping.resize(factory.getNbEntities());
                            parentMapping.resize(factory.getNbEntities());
                        }
                        template <typename Factory>
                        void addChild(EntityId parentId, EntityId child, EntityFactory& factory) {
                            childrenMapping.resize(factory.getNbEntities());
                            parentMapping.resize(factory.getNbEntities());
                            childrenMapping[parentId].push_back(child);
                            parentMapping[child] = parentId;
                        }
                        EntityId getRoot(EntityId entityId) {
                            EntityId root = entityId;
                            while (parentMapping[root].has_value()) {
                                root = parentMapping[root].value();
                            }
                            return root;
                        }
                        std::vector<EntityId> getChildren(EntityId entity) {
                            return childrenMapping[entity];
                        }
                        EntityId getParent(EntityId entity) {
                            if(parentMapping[entity].has_value());
                               return parentMapping[entity].value();
                            return -1;
                        }
                        void setParent(EntityId entity, EntityId parent) {
                            parentMapping[entity] = parent;
                        }
                        bool remove(EntityId entity) {
                            for (unsigned int i = 0; i < childrenMapping[entity].size(); i++) {
                                remove(childrenMapping[entity][i]);
                            }
                            childrenMapping[entity].clear();
                        }
                        template <typename... Signature>
                        EntityId clone(EntityFactory& factory, EntityId toClone, EntityId parent = -1) {
                            EntityId clonedId = factory.createEntity(getComponent<EntityInfoComponent>(toClone)->groupName);
                            clone_impl(toClone, clonedId, factory);
                            if (parent != -1) {
                                childrenMapping.resize(factory.getNbEntities());
                                parentMapping.resize(factory.getNbEntities());
                                childrenMapping[parent] = clonedId;
                                parentMapping[clonedId] = parent;
                            }
                            for (unsigned int i = 0; i < childrenMapping[toClone].size(); i++) {
                                clone(factory, childrenMapping[toClone][i], clonedId);
                            }
                            return clonedId;
                        }
                        template <typename... Components, size_t I = 0, class = typename std::enable_if_t<(sizeof...(Components) != 0 && I < sizeof...(Components)-1)>>
                        void clone_impl(EntityId toCloneId, EntityId clonedId, EntityFactory& factory) {
                            //si l'entité possède le composant en question on le clône.
                            if (getComponent<std::tuple_element_t<I, std::tuple<Components...>>>(toCloneId)) {
                                addComponent(clonedId, *getComponent<std::tuple_element_t<I, std::tuple<Components...>>>(toCloneId), factory);
                            }
                            clone_impl<Components..., I+1>(toCloneId, clonedId, factory);
                        }
                        template <typename... Components, size_t I = 0, class... D, class = typename std::enable_if_t<(sizeof...(Components) != 0 && I == sizeof...(Components)-1)>>
                        void clone_impl(EntityId toCloneId, EntityId clonedId, EntityFactory& factory) {
                            if (getComponent<std::tuple_element_t<I, std::tuple<Components...>>>(toCloneId)) {
                                addComponent(clonedId, *getComponent<std::tuple_element_t<I, std::tuple<Components...>>>(toCloneId), factory);
                            }
                        }
                        template <typename... Components, size_t I = 0, class... D, class...E, class = typename std::enable_if_t<(sizeof...(Components) == 0)>>
                        void clone_impl(EntityId tocloneId, EntityId clonedId, EntityFactory& factory) {
                        }
                        template <typename... Signature>
                        EntityId merge(EntityFactory& factory, EntityId toMerge1, EntityId toMerge2, std::string groupName, EntityId parent=-1) {
                            EntityId merged = factory.createEntity(groupName);
                            EntityId merged1, merged2;
                            if (parent == -1) {
                                merged1 = factory.createEntity(getComponent<EntityInfoComponent>(toMerge1)->groupName);
                                merged2 = factory.createEntity(getComponent<EntityInfoComponent>(toMerge2)->groupName);
                                merge_node<Signature...>(merged, toMerge1, factory);
                                merge_node<Signature...>(merged, toMerge2, factory);
                                childrenMapping.resize(factory.getNbEntities());
                                parentMapping.resize(factory.getNbEntities());
                                childrenMapping[merged] = merged1;
                                parentMapping[merged1] = merged;
                                childrenMapping[merged] = merged2;
                                parentMapping[merged2] = merged;
                            }
                            if (parent != -1 && toMerge1 != -1) {
                                childrenMapping.resize(factory.getNbEntities());
                                parentMapping.resize(factory.getNbEntities());
                                childrenMapping[parent] = merged;
                                parentMapping[merged] = parent;
                                merge_node<Signature...>(merged, toMerge1, factory);
                            }
                            if (parent != -1 && toMerge2 != -1) {
                                childrenMapping.resize(factory.getNbEntities());
                                parentMapping.resize(factory.getNbEntities());
                                childrenMapping[parent] = merged;
                                parentMapping[merged] = parent;
                                merge_node<Signature...>(merged, toMerge2, factory);
                            }
                            for (unsigned int i = 0; i < childrenMapping[toMerge1].size(); i++) {
                                merge(factory, childrenMapping[toMerge1][i], -1, getComponent<EntityInfoComponent>(childrenMapping[toMerge1][i])->groupName, (parent == -1) ? merged1 : merged);
                            }
                            for (unsigned int i = 0; i < childrenMapping[toMerge2].size(); i++) {
                                merge(factory, -1, childrenMapping[toMerge2][i], getComponent<EntityInfoComponent>(childrenMapping[toMerge2][i])->groupName, (parent == -1) ? merged2 : merged);
                            }
                            return merged;
                        }
                        template <typename... Signature, size_t I = 0, class = typename std::enable_if_t<(sizeof...(Signature) != 0 && I < sizeof...(Signature)-1)>>
                        void merge_node(EntityId entityId, EntityId toMergeId, EntityFactory& factory) {
                            //si l'entité possède le composant en question on le clône.
                            if (getComponent<std::tuple_element_t<I, std::tuple<Signature...>>>(toMergeId)) {
                                addComponent(entityId, *getComponent<std::tuple_element_t<I, std::tuple<Signature...>>>(toMergeId), factory);
                            }
                            merge_node<Signature..., I+1>(entityId, toMergeId, factory);
                        }
                        template <typename... Signature, size_t I = 0, class... D, class = typename std::enable_if_t<(sizeof...(Signature) != 0 && I == sizeof...(Signature)-1)>>
                        void merge_node(EntityId entityId, EntityId toMergeId, EntityFactory& factory) {
                            if (getComponent<std::tuple_element_t<I, std::tuple<Signature...>>>(toMergeId)) {
                                addComponent(entityId, *getComponent<std::tuple_element_t<I, std::tuple<Signature...>>>(toMergeId), factory);
                            }
                        }
                        template <typename... Signature, size_t I = 0, class... D, class...E, class = typename std::enable_if_t<(sizeof...(Signature) == 0)>>
                        void merge_node(EntityId tocloneId, EntityId clonedId, EntityFactory& factory) {
                        }
                        template <typename... Signature, typename System, typename... Params>
                        void apply(System& system, std::vector<EntityId>& entities, std::tuple<Params...>& params, bool reverse=false) {
                          if (reverse) {
                              for (unsigned int i = 0; i < entities.size(); i++) {
                                std::vector<EntityId> children = childrenMapping[entities[i]];
                                std::vector<EntityId> addedChildren;
                                while (children.size() > 0) {
                                    for (unsigned int i = 0; i < children.size(); i++) {
                                        addedChildren.push_back(children[i]);
                                    }
                                    if (parentMapping[children[0]].has_value()) {
                                        EntityId parentId = parentMapping[children[0]];
                                        children = childrenMapping[parentId];
                                    } else {
                                        children.clear();
                                    }
                                }
                                for (unsigned i = 0; i < addedChildren.size(); i++) {
                                    this->template apply_impl<Signature...>(addedChildren[i], system, params, std::index_sequence_for<Signature...>());
                                }
                                this->template apply_impl<Signature...>(entities[i], system, params, std::index_sequence_for<Signature...>());
                              }
                          } else {
                              for (unsigned int i = 0; i < entities.size(); i++) {
                                this->template apply_impl<Signature...>(entities[i], system, params, std::index_sequence_for<Signature...>());
                                std::vector<EntityId> children = childrenMapping[entities[i]];
                                std::vector<EntityId> addedChildren;
                                while (children.size() > 0) {
                                    for (unsigned int i = 0; i < children.size(); i++) {
                                        addedChildren.push_back(children[i]);
                                    }
                                    if (parentMapping[children[0]].has_value()) {
                                        EntityId parentId = parentMapping[children[0]];
                                        children = childrenMapping[parentId];
                                    } else {
                                        children.clear();
                                    }
                                }
                                for (int i = addedChildren.size()-1; i >=0; i++) {
                                    this->template apply_impl<Signature...>(addedChildren[i], system, params, std::index_sequence_for<Signature...>());
                                }
                              }
                            }
                        }
        
                        template <typename... Signature, typename System, size_t... I, typename... Params>
                        void apply_impl(EntityId entityId, System& system, std::tuple<Params...>& params, std::index_sequence<I...>) {
                            system.template operator()<Signature...>(entityId, params);
                        }
                        template <typename... Signature, typename System, typename... Params, class R>
                        void apply(System& system, std::vector<EntityId>& entities, std::tuple<Params...>& params, std::vector<R>& ret, bool reverse=false) {
                          if (reverse) {
                              for (unsigned int i = 0; i < entities.size(); i++) {
                                std::vector<EntityId> children = childrenMapping[entities[i]];
                                std::vector<EntityId> addedChildren;
                                while (children.size() > 0) {
                                    for (unsigned int i = 0; i < children.size(); i++) {
                                        addedChildren.push_back(children[i]);
                                    }
                                    if (parentMapping[children[0]].has_value()) {
                                        EntityId parentId = parentMapping[children[0]];
                                        children = childrenMapping[parentId];
                                    } else {
                                        children.clear();
                                    }
                                }
                                for (unsigned i = 0; i < addedChildren.size(); i++) {
                                    this->template apply_impl<Signature...>(addedChildren[i], system, params, std::index_sequence_for<Signature...>(), ret);
                                }
                                this->template apply_impl<Signature...>(entities[i], system, params, std::index_sequence_for<Signature...>(), ret);
                              }
                          } else {
                              for (unsigned int i = 0; i < entities.size(); i++) {
                                this->template apply_impl<Signature...>(entities[i], system, params, std::index_sequence_for<Signature...>(), ret);
                                std::vector<EntityId> children = childrenMapping[entities[i]];
                                std::vector<EntityId> addedChildren;
                                while (children.size() > 0) {
                                    for (unsigned int i = 0; i < children.size(); i++) {
                                        addedChildren.push_back(children[i]);
                                    }
                                    if (parentMapping[children[0]].has_value()) {
                                        EntityId parentId = parentMapping[children[0]];
                                        children = childrenMapping[parentId];
                                    } else {
                                        children.clear();
                                    }
                                }
                                for (int i = addedChildren.size()-1; i >=0; i++) {
                                    this->template apply_impl<Signature...>(addedChildren[i], system, params, std::index_sequence_for<Signature...>(), ret);
                                }
                              }
                          }
                        }
                        template <typename... Signature, typename DynamicTuple, typename System, size_t... I, typename... Params, typename R>
                        void apply_impl(EntityId entityId, DynamicTuple& tuple, System& system, std::tuple<Params...>& params, std::index_sequence<I...>, std::vector<R>& rets) {
        
                            rets.push_back(system.template operator()<Signature...>(entityId, params));
                        }
        
                    };

        Et je suis obligé de mettre plusieurs parameter packs sinon, erreur la fonction est définie plusieurs fois.
        merci!!!

        -
        Edité par OmbreNoire 5 novembre 2023 à 17:57:11

        • Partager sur Facebook
        • Partager sur Twitter

        Erreurs de compilation

        × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
        × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
        • Editeur
        • Markdown