You can not handle this directly:
As you can see when the class is abstract you can not instanciate the object.
Even if the class where not abstract you would not be able to put derived objects into the list because of the slicing problem.
The solution is to use pointers.
So the first question is who owns the pointer (it is the responcability of the owner to delete it when its life time is over).
With a std::list<> the list took ownership by creating a copy of the object and taking ownership of the copy. But the destructor of a pointer does nothing. You need to manually call the delete on a pointer to get the destructor of the obejct to activate. So std::list<> is not a good option for holding pointers when it also needs to take ownership.
Solution 1:
// Objects are owned by the scope, the list just holds apointer.
ActorD1 a1; Actor D1 derived from Actor
ActorD2 a2;
ActorD2 a3;
std::list<Actor> actorList;
actorList.push_back(&a1);
actorList.push_back(&a2);
actorList.push_back(&a3);
This works fine as the list will go out of scope then the objects everything works fine. But this is not very useful for dynamically (run-time) created objects.
Solution 2:
Boost provides a set of containers that handle pointers. You give ownership of the pointer to the container and the object is destroyed by the containter when the container goes out ofd scope.
boost::ptr_list<Actor> actorList;
actorList.push_back(new ActorD1);
actorList.push_back(new ActorD2);
actorList.push_back(new ActorD2);