book: typo fixes (#204)

This commit is contained in:
Killer_Quinn
2021-08-14 19:27:16 +08:00
committed by GitHub
parent 9ff1deb882
commit 7f46de1a6c
2 changed files with 2 additions and 2 deletions

View File

@@ -345,7 +345,7 @@ int main()
const std::string& lv2 = lv1 + lv1; // legal, const lvalue reference can extend temp variable's lifecycle
// lv2 += "Test"; // illegal, const ref can't be modified
std::cout << lv2 << std::endl; // string,string
std::cout << lv2 << std::endl; // string,string,
std::string&& rv2 = lv1 + lv2; // legal, rvalue ref extend lifecycle
rv2 += "string"; // legal, non-const reference can be modified