
Consider these functions: template <typename F> unique_future<typename boost::result_of< F() >::type> foo (F&& f) { ⋯ template <typename F, typename A1> unique_future<typename boost::result_of< F(A1) >::type> foo (F&& f, A1&& a1) { return foo (std::tr1::bind(f,a1)); } I can call foo(&bar,5) to mean the same thing as foo(bind(&bar,5)), OK. But I cannot call foo(&C::mf, pc) to mean the same as foo(bind(&C::mf,pc)) when the binding in question is pc->mf(). That is, bind treats a member function automatically as a function whose first argument is 'this', but boost::result_of does not have the same trick. How can I express the result type of the second form of foo shown above? —John