We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66d33aa commit 97b6cc7Copy full SHA for 97b6cc7
book/en-us/03-runtime.md
@@ -339,7 +339,7 @@ void reference(std::string&& str) {
339
int main()
340
{
341
std::string lv1 = "string,"; // lv1 is a lvalue
342
- // std::string&& r1 = s1; // illegal, rvalue can't ref to lvalue
+ // std::string&& r1 = lv1; // illegal, rvalue can't ref to lvalue
343
std::string&& rv1 = std::move(lv1); // legal, std::move can convert lvalue to rvalue
344
std::cout << rv1 << std::endl; // string,
345
0 commit comments