Before move semantics were added in C++11, swapping the content of two objects was a common way to transfer data without allocating and copying. The objects simply swaps the content with each other:
auto a = Object{}; auto b = Object{}; std::swap(a, b);
The following image illustrates the process: