Subject: Re: [boost] Request For a feature - Templated virtual functions
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-02-11 18:42:26
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk