C++11 move(x) actually means static_cast<X&&>(x)?

Viewed 2164

Just reading Stroustrup's C++ Programming Language 4th Ed and in chapter 7 he says:

move(x) means static_cast<X&&>(x) where X is the type of x

and

Since move(x) does not move x (it simply produces an rvalue reference to x) it would have been better if move() had been called rval()

My question is, if move() just turns the variable in to an rval, what is the actual mechanism which achieves the "moving" of the reference to the variable (by updating the pointer)??

I thought move() is just like a move constructor except the client can use move() to force the compiler??

8 Answers
Related