std::move is a utility function which is used to convert its argument to rvalue reference so that move semantics can be used.

For example:

std::unique_ptr<Person> p_ptr{new Person()};
 
std::unique_ptr<Person> n_ptr{std::move(p_ptr)};

Here, we have used std::move to convert p_ptr which is a lvalue to a rvalue reference so that the initialization happens using move constructor of std::unique_ptr. If we do not do above and do following:

std::unique_ptr<Person> p_ptr{new Person()};
 
std::unique_ptr<Person> n_ptr{p_ptr};

Then the copy constructor of std::unique_ptr smart pointer would be invoked and move constructor would not be invoked. By the way, the above program would fail because std::unique_ptr has copy constructor and copy assignment operator deleted.

References

  1. https://www.learncpp.com/cpp-tutorial/stdmove/