$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-01-22 12:43:36
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.