
Hi, Daniel Walker wrote:
#include <boost/lambda/lambda.hpp> #include <boost/utility/result_of.hpp> using namespace boost;
template<class Functor, class Arg1, class Arg2> void f(Functor const&, Arg1 const&, Arg2 const&) { typedef typename result_of< Functor(Arg1, Arg2)
::type result_type; }
int main() { using namespace lambda; int x = 0, y = 0; f(ret<int>(_1 + _2), x, y); }
In fact, this code works without that patch using something like this: http://tinyurl.com/2xw4s2
2) Boost.Lambda instructs users to expose a template sig<tuple<ARG1, ..., ARGN>, and it also uses this convention internally.
How about introduce a converter function like this?: http://tinyurl.com/2f5hn6 Anyway I'm hoping your work will make lambda support result_of! Regards, -- Shunsuke Sogame