Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7f46de1

Browse filesBrowse files
authored
book: typo fixes (#204)
1 parent 9ff1deb commit 7f46de1
Copy full SHA for 7f46de1

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed

‎book/en-us/03-runtime.md

Copy file name to clipboardExpand all lines: book/en-us/03-runtime.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ int main()
345345

346346
const std::string& lv2 = lv1 + lv1; // legal, const lvalue reference can extend temp variable's lifecycle
347347
// lv2 += "Test"; // illegal, const ref can't be modified
348-
std::cout << lv2 << std::endl; // string,string
348+
std::cout << lv2 << std::endl; // string,string,
349349

350350
std::string&& rv2 = lv1 + lv2; // legal, rvalue ref extend lifecycle
351351
rv2 += "string"; // legal, non-const reference can be modified

‎book/zh-cn/03-runtime.md

Copy file name to clipboardExpand all lines: book/zh-cn/03-runtime.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ int main()
293293

294294
const std::string& lv2 = lv1 + lv1; // 合法, 常量左值引用能够延长临时变量的生命周期
295295
// lv2 += "Test"; // 非法, 常量引用无法被修改
296-
std::cout << lv2 << std::endl; // string,string
296+
std::cout << lv2 << std::endl; // string,string,
297297

298298
std::string&& rv2 = lv1 + lv2; // 合法, 右值引用延长临时对象生命周期
299299
rv2 += "Test"; // 合法, 非常量引用能够修改临时变量

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.