Conceptually, this should work, but the standard forbids it and the common vtable implementation makes it impractical.
What is a good alternative that still has the same characteristics? It can't be simple function overloading because you would have to modify the base class for every new overload introduced in derived classes.
That won't work because even if the templated class inherited from a base class, you still couldn't perform a templated virtual function call from that base class.
Wow, what did I do to trigger such a reaction? I wasn't trying to be rude to you or anything, I was just explaining why your proposed solution doesn't have the same functionality.
I have figured it out, however - I can use a map to map types (std::type_index) to the correct function to call. It's a bit complex but it allows the same interface as if there actually were virtual templates.