Boost logo

Boost Users :

Subject: Re: [Boost-users] break and return statement in lambda expression
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2010-07-22 19:07:28


On Thu, Jul 22, 2010 at 5:06 PM, OvermindDL1 <overminddl1_at_[hidden]> wrote:
> std::for_each is basically implemented like:
>
> template<typename iter, typename functor
> void for_each(iter start, const iter &end, functor f)
> {
>  while(start!=end)
>  {
>    f(*start)
>  }
> }

Whoops, meant like this:
template<typename iter, typename functor
void for_each(iter start, const iter &end, functor f)
{
  while(start!=end)
  {
    f(*start)
    ++start;
  }
}


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