in C++, I have two list<T>
objects A
and B
and I want to add all the members of B
to the end of A
. I've searched a few different sources and haven't found a simple solution (e.i. A.append(B);
) and this surprises me a bit.
What is the best way to do this?
As it happens, I don't care about B after this (it gets deleted in the very next line) so if there is a way to leverage that for better perf I'm also interested in that.