Rvalue Reference is Treated as an Lvalue?
Is bar an rvalue or an lvalue? The question answers itself. Whatever has a name is an lvalue(1). So bar is an lvalue. Its type is “rvalue reference to string“, but it’s an lvalue of that type. If you want to treat it as an rvalue, you need to apply std::move() to it. If you … Read more