Ad hoc polymorphism and heterogeneous containers with value semantics
Different alternatives It is possible. There are several alternative approaches to your problem. Each one has different advantages and drawbacks (I will explain each one): Create an interface and have a template class which implements this interface for different types. It should support cloning. Use boost::variant and visitation. Blending static and dynamic polymorphism For the … Read more