From: Andy Glew (glew_at_[hidden])
Date: 1999-08-29 21:26:37
> For this usage pattern, templates with (partial) specialization would
> probably be a more appropriate mechanism. It would also allow inlining
> and the optimizations inlining enables, as well as metaprogramming
> techniques. If 20% overhead is a problem, surely a 2x-5x speedup
> is attractive?
That's exactly what I am doing. The mixins are often themselves templates.
Overiding via inheritance is used mainly because it is just too damned
painful to anticipate, a priori, what things should be created as template
parameters, and what not.
Although advice as to how to make compile times with templates acceptable
would be appreciated. One of my files takes 8 hours to compile, when
optimization is enabled, although less than a minute at -O0 (G++/EGCS).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk