
Steven Watanabe wrote:
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
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost Yes. But I guess the original question was that why not a += (or +) operator implemented in accumulator_set to add samples instead of operator().
Using std::accumulate to accumulate samples (in an accumulation library) seems more natural to me than the functional implementation. And, using accumulate implies addition operators. Alan