Boost logo

Boost :

Subject: Re: [boost] howto: boost.lambda + stl on VS 2010 (SP1) ?
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-05-04 20:27:44

Raffi Enficiaud wrote:

> To this point, I thought that using accumulate would be cleaner:
> std::accumulate(m.begin(), m.end(), double(0), & _1->*&aa::second);

std::accumulate takes a binary function. It doesn't do s += f(*i) as you
seem to think, it does s = f(s, *i). So you should probably pass _1 +
&_2->*&aa::second to it.

Boost list run by bdawes at, gregod at, cpdaniel at, john at