The book C++ Primer says
It is essential to realize that the call to move promises that we do not intend to use rr1 again except to assign to it or to destroy it.
This is after the line:
int &&rr3 = std::move(rr1);
How to understand this sentence? Is there any change to rr1 after the call std::move(rr1)
?
Somebody thought this problem has be solved in What is std::move(), and when should it be used? But I don't agree that.The book written "We can destroy a moved-from object and can assign a new value to it, but we cannot use the value of a moved-from object."I don't know what it means that "we cannot use the value of a moved-from object.".Is there any code can explain it?