Why can't I "template" virtual member functions?
Setting the scene... This is something I have wanted to do a few times throughout my C++ journey, which started about a year ago. Only when I started to understand templates and virtual functions did it become clear why this is not currently possible. Although it will be nice if the standard introduced it. Suppose we have the following data structures struct name { std :: string first, middle, last; }; struct address { int door; std :: string street; }; //... and the following Io modules and worker class class worker { public: template < typename T > void work(T & data) { std :: cout << "work! : " << typeid (data).name() << std :: endl; } }; class Io { protected: std :: unique_ptr < worker > w; public: Io() : w( new worker){} template < typename T > void push(T & data) { std :: cout << "from Io" << std :: endl...