
11 Feb
2009
11 Feb
'09
11:42 p.m.
Gokulakannan Somasundaram wrote:
virtual functions can never be used with templates, since all the instantiations have to be tracked to form the virtual function table. But we can ask the user to provide a typelist of classes, that would probably be used with the virtual template function. I think this would solve this issue for most of the cases.
If you know all types before hand, just use Boost.Variant.
b) I have a multi-method design pattern, where in i need more than one run-time resolution through the virtual functions.
Boost.Variant supports that.