book: typo fixes (#240)

This commit is contained in:
Lukas Prokop
2022-07-17 12:38:57 +02:00
committed by GitHub
parent 66d33aa2f4
commit 97b6cc75f7

View File

@@ -339,7 +339,7 @@ void reference(std::string&& str) {
int main()
{
std::string lv1 = "string,"; // lv1 is a lvalue
// std::string&& r1 = s1; // illegal, rvalue can't ref to lvalue
// std::string&& r1 = lv1; // illegal, rvalue can't ref to lvalue
std::string&& rv1 = std::move(lv1); // legal, std::move can convert lvalue to rvalue
std::cout << rv1 << std::endl; // string,