I have 2 data structures which hold a set of unique_ptr like so
std::vector<std::unique_ptr<Entity>> tmpEnts;
std::set<std::unique_ptr<Entity>> tmpSet;
I am trying to perform an insert as shown below but i get errors when i compile. I am new to smart pointers.
tmpSet.insert(tmpEnts.begin(), tmpEnts.end());
tmpEnts is actually a simplification, it actually resides in a std::map<uint, std::vector<std::unique_ptr<Entity>>> entities
Aucun commentaire:
Enregistrer un commentaire