Improving Output Iterators
Let’s say we had a range, represented by a pair of pointers, that we wanted to copy into another pointer. We might write that like so: template <typename T, typename U> void copy(T* first, T* last, U* out) { for (; first != last; ++first) { *out++ = *first; } } For trivia...