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


AMDG

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 hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net