$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Douglas Gregor (gregod_at_[hidden])
Date: 2003-10-11 12:07:23
On Saturday 11 October 2003 10:23 am, Edward Diener wrote:
> In the documentation, this last would be:
>
> boost::function<Point3D<T>* (Point3D<T>* self, const T& x)> f =
> &Point3D<T>::SetX;
>
> where the first parameter is a 'this' pointer rather than a '*this'
> reference.
>
> Is boost::function<Point3D<T>* (Point3D<T>& self, const T& x)> f =
> &Point3D<T>::SetX;
>
> also allowable with:
>
> int i(0);
> Point3D<int> apoint;
>
> f(apoint,i);
>
> being valid ?
Yup. You can even do this, if you want:
boost::function<Point3D<T>* (boost::shared_ptr<Point3D<T> > self, const T& x)>
f = &Point3D<T>::SetX;
Thank you mem_fn.
Doug