What does std::move actually do to its argument?
Correct answer D. It casts it to an rvalue reference so move operations can be selected
std::move is essentially static_cast. It performs no data transfer itself; it only marks the expression as an rvalue so overload resolution can choose a move constructor or move assignment operator. The actual moving, and the state left behind in the source object, depends on those functions. If a type has no move operations, the copy operations are used instead.
Answer checked How we write and check questions
Discussion