Boost logo

Boost Users :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-01-28 23:42:17


AMDG

Ovanes Markarian wrote:
> array_type::value_type sum_carr_accumulate(array_type const& a)
> {
> return std::accumulate(a.begin(), a.end(), 0);
> }
>
> array_type::value_type sum_arr_copy_accumulate(array_type const& a)
> {
> return std::accumulate(a.begin(), a.end(), 0);
> }
>

> Please take a look, that accumulate produced wrong result.

Of course. The results are being collected in an int...

In Christ,
Steven Watanabe


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