Let’s say we want to write function to append one vector to another. It can be done like,
template<typename T> void append(Vector<T>& to, const Vector<T>& from) { to.insert(to.end(), from.begin(), from.end()); } One problem with this approach is that we can only use this function with Vector.