Merge sort in C++ using a temp vector