David Abrahams wrote:
on Tue Dec 04 2007, Joel de Guzman
wrote: John Torjo wrote:
* What is your evaluation of the design?
simple and effective. I'd like to see more tweakable parameters for specific uses. I frequently deal with different number expansions in a case to case basis. For example, is it possible to have arity 3 for function X and arity-5 for function Y? A single number seems wasteful if I'm sure that a certain use needs only a few. Is that possible?
It generates one template definition. You could generate a bunch of different templates for different uses but I don't see much advantage; it would probably slow down compilation overall.
Hmmm... because you'll have different templates instead of one? But isn't the time of N instantiations of a single class template equivalent to the the time of instantiation of N different templates? (assuming same complexity). I really doubt this, without any numbers. And, even if it was true, I'd think that the exponential nature of expansion of the arities have a larger effect both with PP and in overload resolution. Those too should be a significant factor apart from template instantiations. Pondering... It would be interesting to see real numbers. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net