#include <iostream>
#include <vector>
#include <algorithm>
int main() {
std::vector<int> source = {1, 2, 3, 4, 5};
// Create a move iterator for the beginning of the source vector
auto moveIteratorBegin = std::make_move_iterator(source.begin());
// Create a move iterator for the end of the source vector
auto moveIteratorEnd = std::make_move_iterator(source.end());
// Create a destination vector with the same size as the source
std::vector<int> destination(source.size());
// Use move iterators and std::move to transfer elements from source to destination
std::move(moveIteratorBegin, moveIteratorEnd, destination.begin());
// Display the contents of the destination vector
std::cout << "Destination vector after std::move:\n";
for (const auto& value : destination) {
std::cout << value << " ";
}
return 0;
}