Le 28/10/2011 19:18, Dominic Jones a écrit :
Hello,
I want to compute, for example
d = a + b + c
where a..d are of some derived type, without incurring the cost of temporaries
for each overloaded operation.
In a similar post a while ago, Walter Bright proposed using function literals
instead of template expressions to do this. After looking at function literals,
I can't work out what he had in mind with this suggestion. May someone present
a succinct
complete example to demonstrate how solve this?
Many thanks,
Dominic Jones
I was thinking about porting http://eigen.tuxfamily.org/index.php in D.
I'm currently on SFML2 but it goes quite fast (thanks to Trass3r for
porting SFML to D2 so a big part of the job is done).
You may want to do so ? Anyway, I'm not surefunction literal can do the
trick. I would be interested on knowing more on the topic. If it is more
suitable, maybe I should reconside my project to port eigen.
Deadalnix