
20 Feb
2010
20 Feb
'10
1:33 p.m.
strasser@uni-bremen.de wrote:
real virtual function templates are obviously not possible without a JIT-compiler
Wrong, you would just need to do link-time template instantiation, which is actually required by the C++ standard (but few implement it, and none had the idea to use it to implement virtual template functions as an extension).
but if all derived types are known to the base type,
Then you might as well use Boost.Variant.
the runtime overhead besides the virtual call is one switch().
It should be possible to be just a switch and no virtual call.