I'm a C/Python programmer in C++ land working with the STL for the first time.
In Python, extending a list with another list uses the .extend method:
>>> v = [1, 2, 3]
>>> v_prime = [4, 5, 6]
>>> v.extend(v_prime)
>>> print(v)
[1, 2, 3, 4, 5, 6]
I currently use this algorithmic approach to extend vectors in C++:
v.resize(v.size() + v_prime.size());
copy(v_prime.begin(), v_prime.end(), v.rbegin());
Is this the canonical way of extending vectors, or if there is a simpler way that I'm missing?