CornedBee, not to start a debate, poor Elysia's thread will be destroyed, just one thing:
Useful generalization:
Code:
template <typename A>
void sort(A *array, int n) {}
Useless generalization:
Code:
template <typename A>
A incrementByTwo(A v) { return A+2; }
Now for the for_each, it is generalized, and will process every element, what if i wanted only every third element, or what if at element i, i need an element i - n ?
for ( ; ; ) loops wins here, but that did not stop the developers from creating for_each, you also like it, for whatever reasons, that is my point, generalizations are there, but some specific utility stuff is always welcome!
So do not force some one for g-e-n-e-r-a-l-i-z-a-t-i-o-n-s, who wants to add a simple convenient function to the class, that is a long word, and long work!