Boost logo

Boost Users :

From: Igor R (boost.lists_at_[hidden])
Date: 2008-07-17 10:09:03


> typedef boost::function<void(void)> functor;
> std::vector<functor> functors;
> ...
> using namespace boost::lambda;
> std::for_each(
> functors.begin(), functors.end(),
> bind(&functor::operator(),_1));

Oh, I see... So the explicit bind is unavoidable :(. Is there any
reason for this? After all, lambda allows compact expressions like _1
= 1 , so why wouldn't it allow _1() ?


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