Boost logo

Boost Users :

Subject: Re: [Boost-users] bind for_each and a range of functors
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-10-16 17:48:50


Michael Marcin wrote:
> void call_each( std::list<functor>& l )
> {
> std::for_each( l.begin(), l.end(), boost::bind(_1,5,20) );
> }

Boost.Lambda supports this. Boost.Bind doesn't.

std::for_each( l.begin(), l.end(), boost::bind(&functor::operator(),
_1,5,20) );

In Christ,
Steven Watanabe

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at