topoden wrote:
Guys,
You were right, the extra "void" is incorrect in the code (sorry for the mistake), but you got the idea right. I basically want to "partially specialize the template class for the case when the second template argument is "void""
I did not want to do the specialization "manually" because the actual template class is quite long, and there is lot of stuff which depends on the second template argument but the only code which should be different is this virtual method declaration. So specializing it manually would double up the amount of code.
You could have a newly created base class template specializations to contain either of those virtual functions, unless I'm missing something. Just specialize that base class template partially for B = void case and make BaseListener<> inherit from ProcessBase< A, B > (or whatever you name it). HTH, Gevorg