Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2006-05-09 19:10:49

David Abrahams wrote:
> One happy day, we'll have auto and decltype...
> Until then, we have no reasonable way to declare the type of bind
> expressions. So I got to thinking, maybe something like this could be
> made to work:
> result_of<bind_(std::minus<int>, int, _1_)>::type
> f = bind(std::minus<int>(), 3, _1);
> For lambda, I guess we could do something like this:
> result_of<minus_(int, _1_)>::type f = 3 - _1;
> Does this direction make sense?

Looks doable to me. But for more complex expressions, the result_of
will be rather knotty because the prefix syntax will require some
thinking to extract from the infix syntax of the actual lambda


Joel de Guzman

Boost list run by bdawes at, gregod at, cpdaniel at, john at