|
Boost : |
From: Lewis Hyatt (lhyatt_at_[hidden])
Date: 2007-08-01 13:04:06
> On a slightly off-topic but perhaps more interesting note, what's the
> rationale for having a separate template parameter for the type of the
> initializing element? If it used the iterator's value_type (or a
> reference thereto) then this thread wouldn't be happening.
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.
-Lewis
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk