|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-11-13 13:18:37
From: <sgregory_at_[hidden]>
> Hello again
>
> // pseudo-snippit
> class Axis {
> bool AddTick(const double); // bool added for MS so as not to
> return void
> };
>
> Axis a;
> std::list<double> l;
>
> std::for_each(l.begin(), l.end(),
> boost::bind( &Raxis::AddTick, &a ) );
>
> So... MS complains
> 'bind' : none of the 2 overloads can convert parameter 1 from
> type 'bool (__thiscall Raxis::*)(const double)'
>
> Huh? Help?
Oops. My bad. Should be
boost::bind( &Axis::AddTick, &a, _1 ) // or &Raxis::AddTick?
since &Axis::AddTick takes two arguments, 'Axis * this' and 'const double'.
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk