https://stackoverflow.com/a/18300974/462608
If you pass an rvalue reference to another function, you are passing a named object, so, the object isn't received like a temporal object.
void some_function(A&& a)
{
other_function(a);
}
The object a would be copied to the actual parameter of other_function. If you want the object a continues being treated as a temporary object, you should use the std::move function:
other_function(std::move(a));
What would be the type of argument of other_function
?
It can't be other_function( A&& xyz )
because if that had been the case then std::move
wouldn't be required?