
15 Jun
2012
15 Jun
'12
9:47 a.m.
I agree, the library should be able to decide whether expression templates should be an improvement or not.
A minor change in the library, defaulting the ExpressionTemplates parameter to a trait depending on the backend could help to that. The library could default to something reasonable, while the backend developer could always provide a specialization.
That would certainly be easy to do, but: * That wouldn't help for types like cpp_int where the best strategy may depend on the runtime size of the number. * How would this differ in practice from the use of the typedefs we already provide where we know that expression templates don't help (mp_intXXX_t etc)? Cheers, John.