
7 Mar
2011
7 Mar
'11
5:18 p.m.
Joel Falcou wrote:
x just have a operator= taking a interge_expression<X> type whcich contains the whole a+b abstract syntax tree. From there, there is countless techniques to iterate over the AST, transform it or evaluate it as code.
There surely are, but a large integer library doesn't seem like a trivial application. Even simple things like x = a*b + c; x += a*b*c; don't seem entirely straightforward when the goal is to eliminate all temporaries. So rewriting everything to use expression templates (properly) could be quite an amount of work.