Use of deleted function std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(const std::unique_ptr<_Tp, _Dp>&)
I am currently trying to set up a very basic Entity Component System. For this, I have defined the following classes: class Component { public: virtual ~Component() {}; // Ensure polymorphic behavior with a virtual destructor }; class TransformComponent : public Component { glm::vec2 position = {0.0f, 0.0f}; float rotation = 0.0f; float scale = 1.0f; }; using identifier = uuids::uuid; class Entity { private: identifier id; bool isActive = true; std::string name = "new entity"; std::vector<std::unique_ptr<Component>> components; public: Entity() : isActive(true), id( UUID::get()), name("NEW") {
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.