25 May
2010
25 May
'10
12:05 a.m.
On Mon, May 24, 2010 at 2:51 PM, Matthias Schabel
and indeed for even very simple arithmetic user-defined classes (for example boost.units quantities) the lambda expression is poluted with many many ret<T> statements, for example
_1*_1/(_1+x)/(_1-x)
becomes
ret<anothertype>(ret<usertype>(_1*_1)/ ret<othertype>(ret<usertype>(_1+x)/ret<usertype>(_1-x)));
the question is, is there a way to help lambda library to help deducing the return type to avoid the repeated use of ret<T>.
You should take a look at
- Torsten Maehne contributed it to deal with interplay between lambda and units... Something similar might be worthwhile with interval as well.
Or Boost.Phoenix, it handles such things better.