Boost logo

Boost :

Subject: Re: [boost] [accumulators] why not operator+=?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-02-02 11:11:27


AMDG

Alan Patterson wrote:
> Doesn't a += interface make an accumulate interface like:
>
> std::accumulate(data.begin(), data.end(), acc);
>
> more appealing than :
>
> std::for_each(data.begin(), data.end(), acc);

std::accumulate uses
  result = result + *iter;
not
  result += *iter;

In Christ,
Steven Watanabe


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