Are pure virtual methods allowed within a template class?
A class template can indeed contain virtual or pure virtual functions. This was employed by Andrei Alexandresu in “Modern C++ Design” to implement the visitor pattern using templates and type lists. You can see the code here in his Loki library if you’re interested. With most standard C++ implementations, this is fine, because when the … Read more