
On Thu, Apr 29, 2004 at 10:05:19PM +0300, Justinas V.D. wrote:
The problem is that lambda expressions do not have result_type defined although technically they are functors too (like STL functors). It would be trivial to write little metafunction wrapper though. After all, boost::lambda::is_lambda_functor metafunction exists but I haven't found lambda_result_type traits or something like that. Documentation conveniently skips through that part of implementation and code is a bit obscure at times.
Is there a way to implement such a metafunction
boost::lambda::functor_result<T>::type that it would return result type of lambda expression if T is lambda expression or T::result_type if T is ordinary STL functor, or just null_type if neither of them?
that its implementation would not turn out to be a pain in the... emm... neck? Or perhaps this could be a part of Boost.Lambda library?
I think what you want is result_of. http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1454.html Last I heard, a complete implementation had not yet made it into Boost. Douglas? I think maybe Boost.Lambda already has the implementation support for it, we just need the main result_of interface. To Douglas: I am starting to have a little free time again, so if you want help implementing it or making some tests, I will help here. -- -Brian McNamara (lorgon@cc.gatech.edu)