Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-11-13 13:43:40


From: <sgregory_at_[hidden]>
> Is is ok that AddTick takes a 'const double' ?

It's an MSVC 6 problem; you're right, it doesn't like the 'const'. MSVC 7 et
al compile the code.

--
Peter Dimov
Multi Media Ltd.
#include <boost/bind.hpp>
#include <algorithm>
#include <list>
class Axis
{
public:
 bool AddTick(const double);
};
int main()
{
 Axis a;
 std::list<double> l;
 std::for_each(l.begin(), l.end(), boost::bind( &Axis::AddTick, &a, _1 ) );
}

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk