Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-08-02 13:55:16


David Abrahams wrote:
> on Wed Aug 01 2007, Lewis Hyatt <lhyatt-AT-princeton.edu> wrote:
>
>> I think it's because std::iterator_traits didn't exist when the STL
>> was first designed. It's similar with accumulate(), you have to pass
>> in the starting value so it can grab the type.
>
> You pass the starting value to accumulate so it can grab the value,
> not the type.

Supplying a wider type to avoid overflow can be useful.


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