template <class In, class Out> In copy (In begin, In end, Out target) { while (begin != end) { *target++ = *begin++; } return target }