
2 Sep
2008
2 Sep
'08
8:52 p.m.
On Tue, Sep 2, 2008 at 14:53, Kurt Kohler
struct X { double f(double x) { return x; }
typedef boost::function
ftype; double call(ftype func, double x);
};
int main(int argc, char *argv[]) { X x; x.call(&X::f, 1.0); // Error occurs here }
&X::f requires 2 arguments (the this pointer and the function
argument), so it's storable in a boost::function