
1 Aug
2007
1 Aug
'07
5:04 p.m.
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