
22 Jan
2005
22 Jan
'05
5:43 p.m.
John Maddock wrote:
I can't seem to get the result_of template to function, I've tried:
#include <boost/utility/result_of.hpp>
typedef boost::result_of<F>::type t;
with F=
int (double) int (*)(double) int (&)(double) std::unary_function<double,int>
and all give a long list of errors.
I believe that all of these should be OK? So am I doing something obvious wrong (I'm using VC7.1 BTW in case that makes a difference)?
Yes. int(double) means call an object of type int with one argument of type double. You need result_of<F(A)>, where F is as above, and A is the argument type.