title: Antlr Cpp templated visitor class
body: <p>Is there any possibility of templated visitors in AntlrCpp similar to Java implementation?
  I've a <code>BaseExpression</code> class that I want to return from my visitors but for the sub-rules, I'd like to return <code>ScalarExpression/VectorExpression</code> that derive from <code>BaseExpression</code>. Now, I've to check the type of <code>Any</code> everytime I need to do something specific related to <code>scalar</code> or <code>vector</code> rules. Having a template would eliminate the need for <code>Any</code> and we can directly access the right type of object returned from each visitor method.</p>