Skip to content

Commit 407148c

Browse files
committed
update: prepare C++20
1 parent 7204a23 commit 407148c

28 files changed

+66
-67
lines changed

โ€ŽCONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## ๆไบค Issue
66

7-
ใ€ŽC++ 11/14/17ใ€็š„ issue ็”จไบŽ่ฟฝ่ธชไนฆไธญๅญ˜ๅœจ็š„ๅŽŸๅˆ™ๆ€ง็š„ๆ่ฟฐ้”™่ฏฏใ€ๅญ˜ๅœจ็š„ `typo` ้”™่ฏฏ๏ผŒไปฅๅŠๅ‘ๆœฌไนฆไฝœ่€…ๆ้—ฎ็ญ‰ใ€‚
7+
ใ€ŽC++ 11/14/17/20ใ€็š„ issue ็”จไบŽ่ฟฝ่ธชไนฆไธญๅญ˜ๅœจ็š„ๅŽŸๅˆ™ๆ€ง็š„ๆ่ฟฐ้”™่ฏฏใ€ๅญ˜ๅœจ็š„ `typo` ้”™่ฏฏ๏ผŒไปฅๅŠๅ‘ๆœฌไนฆไฝœ่€…ๆ้—ฎ็ญ‰ใ€‚
88

99
- ้€šๅธธๆƒ…ๅ†ตไธ‹๏ผŒไฝ ๅฏ่ƒฝไผšๅ‘็ŽฐไนฆไธญๆŸไธชๆฎต่ฝๅญ˜ๅœจ้”™ๅˆซๅญ—ใ€่ฏญไน‰้”™่ฏฏใ€ๆ–‡ๆณ•้”™่ฏฏ็ญ‰ใ€‚
1010
่ฟ™้ƒฝๆ˜ฏ `typo` ้”™่ฏฏใ€‚ๅฆ‚ๆžœ่ฏฅ้”™่ฏฏๅทฒ็ปๅฏนไฝ ็š„้˜…่ฏป้€ ๆˆไบ†ไธ€ๅฎš้šœ็ข๏ผŒ
@@ -24,7 +24,7 @@
2424

2525
## ๆไบค Pull request
2626

27-
ใ€ŽC++ 11/14/17ใ€ๆ˜ฏไธ€ๆœฌๅผ€ๆบไนฆ็ฑ๏ผŒไปปไฝ•ไบบ้ƒฝๅฏไปฅๅ‚ไธŽ่ดก็Œฎ่‡ชๅทฑ PRใ€‚ไฝ†ๅœจๆไบค PR ไน‹ๅ‰่ฏทไป”็ป†้˜…่ฏปไธ‹้ข็š„่ฏดๆ˜Ž๏ผš
27+
ใ€ŽC++ 11/14/17/20ใ€ๆ˜ฏไธ€ๆœฌๅผ€ๆบไนฆ็ฑ๏ผŒไปปไฝ•ไบบ้ƒฝๅฏไปฅๅ‚ไธŽ่ดก็Œฎ่‡ชๅทฑ PRใ€‚ไฝ†ๅœจๆไบค PR ไน‹ๅ‰่ฏทไป”็ป†้˜…่ฏปไธ‹้ข็š„่ฏดๆ˜Ž๏ผš
2828

2929
- ๅฝ“ไฝ ่ฎคไธบ้œ€่ฆๆไบคไธ€ไธช PR ๆ—ถ๏ผŒ่ฏท็กฎไฟ [issue ๅˆ—่กจ](https://github.com/changkun/modern-cpp-tutorial/issues)ไธญ๏ผŒๅทฒ็ปๅŒ…ๅซไบ†ไฝ ๆƒณ่ฆ่งฃๅ†ณ็š„้—ฎ้ข˜ใ€‚
3030
ๅฆ‚ๆžœๆฒกๆœ‰๏ผŒ่ฏทๅ‚่€ƒ**ๆไบค Issue** ไธ€่Š‚ไธญ็š„ๆ่ฟฐ๏ผŒๆไบคไฝ ็š„ issue๏ผŒๅ†ๆไบคไฝ ็š„ PRใ€‚

โ€ŽLICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 - Present Changkun Ou <hi@changkun.us>
3+
Copyright (c) 2016 - 2019 Changkun Ou <hi@changkun.us>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

โ€ŽREADME-en-us.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
<img src="assets/cover-2nd-en.png" alt="logo" height="600" align="right" />
22

3-
# C++11/14/17 On the Fly
3+
# C++11/14/17/20 On the Fly
44

55
![](https://img.shields.io/badge/version-v2-green.svg) [![](https://img.shields.io/badge/language-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-red.svg)](./README.md) [![](https://img.shields.io/badge/language-English-blue.svg)](./README-en-us.md) [![](https://img.shields.io/badge/$-donate-ff69b4.svg)](./assets/donate.md) [![](https://img.shields.io/badge/chat-community-667ed5.svg)](./assets/community.md)
66

7-
8-
> This book is adapting to C++17 and translating to English.
9-
107
## Purpose
118

129
The book claims "On the Fly". Its intent is to provide a comprehensive introduction to the relevant features regarding modern C++ (before 2020s).
@@ -15,7 +12,7 @@ Readers should aware that all of these features are not required. It should be l
1512

1613
At the same time, instead of grammar-only, the book introduces the historical background as simple as possible of its technical requirements, which provides great help in understanding why these features comes out.
1714

18-
In addition, The author would like to encourage that readers should be able to use C++17 directly in their new projects and migrate their old projects to C++17 gradually after read the book.
15+
In addition, The author would like to encourage that readers should be able to use modern C++ directly in their new projects and migrate their old projects to modern C++ gradually after read the book.
1916

2017
## Targets
2118

@@ -51,4 +48,4 @@ The author has limited time and language skills. If readers find any mistakes of
5148

5249
## Licenses
5350

54-
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work is written by [Ou Changkun](https://changkun.de) and licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>. The code of this repository is open sourced under the [MIT license](./LICENSE).
51+
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work was written by [Ou Changkun](https://changkun.de) and licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>. The code of this repository is open sourced under the [MIT license](./LICENSE).

โ€ŽREADME.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<img src="assets/cover-2nd.png" alt="logo" height="600" align="right" />
1+
<img src="assets/cover-2nd.png" alt="logo" height="550" align="right" />
22

3-
# ใ€Š้ซ˜้€ŸไธŠๆ‰‹ C++11/14/17ใ€‹
3+
# ใ€Š้ซ˜้€ŸไธŠๆ‰‹ C++11/14/17/20ใ€‹
44

55
[![](https://img.shields.io/badge/language-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-red.svg)](./README.md) [![](https://img.shields.io/badge/language-English-blue.svg)](./README-en-us.md)
66
[![](https://img.shields.io/badge/%C2%A5-%E8%B5%9E%E5%8A%A9-ff69b4.svg)](./assets/donate.md)
@@ -11,7 +11,7 @@
1111

1212
ๅŒๆ—ถ๏ผŒๆœฌไนฆๅœจไป‹็ป่ฟ™ไบ›็‰นๆ€ง็š„่ฟ‡็จ‹ไธญ๏ผŒๅฐฝๅฏ่ƒฝ็ฎ€ๅ•ๆ˜Žไบ†็š„ไป‹็ปไบ†่ฟ™ไบ›็‰นๆ€งไบง็”Ÿ็š„ๅކๅฒ่ƒŒๆ™ฏๅ’ŒๆŠ€ๆœฏ้œ€ๆฑ‚๏ผŒ่ฟ™ไธบ็†่งฃ่ฟ™ไบ›็‰นๆ€งใ€่ฟ็”จ่ฟ™ไบ›็‰นๆ€งๆไพ›ไบ†ๅพˆๅคง็š„ๅธฎๅŠฉใ€‚
1313

14-
ๆญคๅค–๏ผŒ็ฌ”่€…ๅธŒๆœ›่ฏป่€…ๅœจ้˜…่ฏปๆœฌไนฆๅŽ๏ผŒ่ƒฝๅคŸๅŠชๅŠ›ๅœจๆ–ฐ้กน็›ฎไธญ็›ดๆŽฅไฝฟ็”จ C++17๏ผŒๅนถๅŠชๅŠ›ๅฐ†ๆ—ง้กน็›ฎ้€ๆญฅ่ฟ็งปๅˆฐ C++17ใ€‚ไนŸ็ฎ—ๆ˜ฏ็ฌ”่€…ไธบๆŽจ่ฟ›็Žฐไปฃ C++ ็š„ๆ™ฎๅŠ่ดก็Œฎไบ†ไธ€ไบ›็ปต่–„ไน‹ๅŠ›ใ€‚
14+
ๆญคๅค–๏ผŒ็ฌ”่€…ๅธŒๆœ›่ฏป่€…ๅœจ้˜…่ฏปๆœฌไนฆๅŽ๏ผŒ่ƒฝๅคŸๅŠชๅŠ›ๅœจๆ–ฐ้กน็›ฎไธญ็›ดๆŽฅไฝฟ็”จ็Žฐไปฃ C++๏ผŒๅนถๅŠชๅŠ›ๅฐ†ๆ—ง้กน็›ฎ้€ๆญฅ่ฟ็งปๅˆฐ็Žฐไปฃ C++ใ€‚ไนŸ็ฎ—ๆ˜ฏ็ฌ”่€…ไธบๆŽจ่ฟ›็Žฐไปฃ C++ ็š„ๆ™ฎๅŠ่ดก็Œฎไบ†ไธ€ไบ›็ปต่–„ไน‹ๅŠ›ใ€‚
1515

1616
## ็›ฎๆ ‡่ฏป่€…
1717

โ€Žassets/cover-2nd-en.afphoto

10 KB
Binary file not shown.

โ€Žassets/cover-2nd-en.png

12.4 KB
Loading

โ€Žassets/cover-2nd.afphoto

2.38 MB
Binary file not shown.

โ€Žassets/cover-2nd.png

93.8 KB
Loading

โ€Žbook/en-us/00-preface.md

Whitespace-only changes.

โ€Žbook/en-us/toc.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# C++ 11/14/17 On The Fly
1+
# C++ 11/14/17/20 On The Fly
22

33
## Table of Contents
44

55
- [**Preface**](./00-preface.md)
6-
- [**Chapter 01 Towards C++11/14/17**](./01-intro.md)
6+
- [**Chapter 01 Towards Modern C++**](./01-intro.md)
77
+ 1.1 Deprecated Features
88
+ 1.2 Compatibility with C
99
+ Further Readings
@@ -39,69 +39,71 @@
3939
- Explicit delete default function
4040
- Strongly typed enumerations
4141
- [**Chapter 03 Language Runtime Enhancements**](./03-runtime.md)
42-
+ Lambda expression
42+
+ 3.1 Lambda expression
4343
+ Basics
4444
+ Value capture
4545
+ Reference capture
4646
+ Implicit capture
4747
+ Expression capture
4848
+ Generic lambda
49-
+ Function object wrapper
49+
+ 3.2 Function object wrapper
5050
+ std::function
5151
+ std::bind/std::placeholder
52-
+ rvalue reference
52+
+ 3.3 rvalue reference
5353
+ lvalue, rvalue, prvalue, xvalue
5454
+ rvalue reference & lvalue reference
5555
+ Move semantics
5656
+ Perfect forwarding
5757
- [**Chapter 04 Sandard Library: Containers**](./04-containers.md)
58-
+ `std::array`
59-
+ `std::forward_list`
60-
+ `std::unordered_set`
61-
+ `std::unordered_map`
62-
+ `std::tuple`
58+
+ 4.1 `std::array` and `std::forward_list`
59+
+ 4.2 Unordered containers
60+
+ `std::unordered_set`
61+
+ `std::unordered_map`
62+
+ 4.3 Tuples `std::tuple`
6363
+ basic operation
6464
+ runtime indexing
6565
+ merge and iteration
6666
- [**Chapter 05 Sandard Library: Pointers**](./05-pointers.md)
67-
+ RAII and reference counting
68-
+ `std::shared_ptr`
69-
+ `std::unique_ptr`
70-
+ `std::weak_ptr`
67+
+ 5.1 RAII and reference counting
68+
+ 5.2 `std::shared_ptr`
69+
+ 5.3 `std::unique_ptr`
7170
- [**Chapter 06 Sandard Library: Regular Expression**](./06-regex.md)
72-
+ Regular Expression Introduction
71+
+ 6.1 Regular Expression Introduction
7372
+ Normal characters
7473
+ Special characters
7574
+ Determinative
76-
+ `std::regex`
75+
+ 6.2 `std::regex` and related
7776
+ `std::regex`
7877
+ `std::regex_match`
7978
+ `std::match_results`
8079
- [**Chapter 07 Sandard Library: Threads and Concurrency**](./07-thread.md)
81-
+ `std::thread`
82-
+ `std::mutex`
83-
+ `std::unique_lock`
84-
+ `std::future`
85-
+ `std::packaged_task`
86-
+ `std::condition_variable`
80+
+ 7.1 `std::thread`
81+
+ 7.2 `std::mutex` and `std::unique_lock`
82+
+ 7.3 `std::future` and `std::packaged_task`
83+
+ 7.4 `std::condition_variable`
84+
+ 7.5 `std::atomic` and memory order
85+
+ 7.6 Transactional memory
8786
- [**Chapter 08 Sandard Library: File System**](./08-filesystem.md)
87+
+ 8.1 Documents and links
88+
+ 8.2 `std::filesystem`
8889
- [**Chapter 09 Minor Features**](./09-others.md)
89-
+ New Types
90+
+ 9.1 New Types
9091
+ `long long int`
91-
+ `noexcept`
92-
+ Literal
92+
+ 9.2 `noexcept` and its operates
93+
+ 9.3 Literal
9394
+ Raw string literal
9495
+ Custom string literal
95-
+ Math Library
96+
+ 9.4 Math Library
9697
- [**Chapter 10 Outlook: Introduction of C++20**](./10-cpp20.md)
9798
+ Concept
9899
+ Range
99100
+ Module
100101
+ Coroutine
101-
- [**Appendix: Further Study Materials**](./appendix.md)
102+
- [**Appendix 1: Further Study Materials**](./appendix1.md)
103+
- [**Appendix 2: Modern C++ Best Practices**](./appendix2.md)
102104

103105
Table of Content | Last Chapter | [Next Chapter: Preface](./00-preface.md)
104106

105107
## Licenses
106108

107-
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work is written by [Ou Changkun](https://changkun.de) and licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>. The code of this repository is open sourced under the [MIT license](./LICENSE).
109+
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a><br />This work was written by [Ou Changkun](https://changkun.de) and licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License</a>. The code of this repository is open sourced under the [MIT license](./LICENSE).

โ€Žbook/zh-cn/00-preface.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ order: 0
99
## ๅผ•่จ€
1010

1111
C++ ๆ˜ฏไธ€ไธช็”จๆˆท็พคไฝ“็›ธๅฝ“ๅคง็š„่ฏญ่จ€ใ€‚ไปŽ C++98 ็š„ๅ‡บ็Žฐๅˆฐ C++11 ็š„ๆญฃๅผๅฎš็จฟ็ปๅކไบ†้•ฟ่พพๅๅนดๅคšไน‹ไน…็š„็งฏ็ดฏใ€‚C++14/17 ๅˆ™ๆ˜ฏไฝœไธบๅฏน C++11 ็š„้‡่ฆ่กฅๅ……ๅ’Œไผ˜ๅŒ–๏ผŒๆ‰€ๆœ‰่ฟ™ไบ›ๆ–ฐๆ ‡ๅ‡†ไธญๆ‰ฉๅ……็š„็‰นๆ€ง๏ผŒ็ป™ C++ ่ฟ™้—จ่ฏญ่จ€ๆณจๅ…ฅไบ†ๆ–ฐ็š„ๆดปๅŠ›ใ€‚
12-
้‚ฃไบ›่ฟ˜ๅœจๅšๆŒไฝฟ็”จ**ไผ ็ปŸ C++**๏ผˆๆœฌไนฆๆŠŠ C++98 ๅŠๅ…ถไน‹ๅ‰็š„ C++ ็‰นๆ€งๅ‡็งฐไน‹ไธบไผ ็ปŸ C++๏ผ‰่€ŒๆœชๆŽฅ่งฆ่ฟ‡ C++11/14/17 ็š„ C++ ็จ‹ๅบๅ‘˜ๅœจ่งๅˆฐ่ฏธๅฆ‚ Lambda ่กจ่พพๅผ่ฟ™็ฑปๅ…จๆ–ฐ็‰นๆ€งๆ—ถ๏ผŒ็”š่‡ณไผšๆต้œฒๅ‡บใ€Žๅญฆ็š„ไธๆ˜ฏๅŒไธ€้—จ่ฏญ่จ€ใ€็š„ๆƒŠๅนไน‹ๆƒ…ใ€‚
12+
้‚ฃไบ›่ฟ˜ๅœจๅšๆŒไฝฟ็”จ**ไผ ็ปŸ C++**๏ผˆๆœฌไนฆๆŠŠ C++98 ๅŠๅ…ถไน‹ๅ‰็š„ C++ ็‰นๆ€งๅ‡็งฐไน‹ไธบไผ ็ปŸ C++๏ผ‰่€ŒๆœชๆŽฅ่งฆ่ฟ‡ C++11/14/17/20 ็š„ C++ ็จ‹ๅบๅ‘˜ๅœจ่งๅˆฐ่ฏธๅฆ‚ Lambda ่กจ่พพๅผ่ฟ™็ฑปๅ…จๆ–ฐ็‰นๆ€งๆ—ถ๏ผŒ็”š่‡ณไผšๆต้œฒๅ‡บใ€Žๅญฆ็š„ไธๆ˜ฏๅŒไธ€้—จ่ฏญ่จ€ใ€็š„ๆƒŠๅนไน‹ๆƒ…ใ€‚
1313

14-
**C++1x** (ๆˆ–**็Žฐไปฃ C++**๏ผŒๆœฌไนฆไธญๅ‡ๆŒ‡ C++11/14/17) ไธบไผ ็ปŸ C++ ๆณจๅ…ฅ็š„ๅคง้‡็‰นๆ€งไฝฟๅพ—ๆ•ดไธช C++ ๅ˜ๅพ—ๆ›ดๅŠ ๅƒไธ€้—จ็ŽฐไปฃๅŒ–็š„่ฏญ่จ€ใ€‚C++1x ไธไป…ไป…ๅขžๅผบไบ† C++ ่ฏญ่จ€่‡ช่บซ็š„ๅฏ็”จๆ€ง๏ผŒ`auto` ๅ…ณ้”ฎๅญ—่ฏญไน‰็š„ไฟฎๆ”นไฝฟๅพ—ๆˆ‘ไปฌๆ›ดๅŠ ๆœ‰ไฟกๅฟƒๆฅๆ“ๆŽงๆžๅบฆๅคๆ‚็š„ๆจกๆฟ็ฑปๅž‹ใ€‚ๅŒๆ—ถ่ฟ˜ๅฏน่ฏญ่จ€่ฟ่กŒๆœŸ่ฟ›่กŒไบ†ๅคง้‡็š„ๅผบๅŒ–๏ผŒLambda ่กจ่พพๅผ็š„ๅ‡บ็Žฐ่ฎฉ C++ ๅ…ทๆœ‰ไบ†ใ€ŽๅŒฟๅๅ‡ฝๆ•ฐใ€็š„ใ€Ž้—ญๅŒ…ใ€็‰นๆ€ง๏ผŒ่€Œ่ฟ™ไธ€็‰นๆ€งๅ‡ ไนŽๅœจ็Žฐไปฃ็š„็ผ–็จ‹่ฏญ่จ€๏ผˆ่ฏธๅฆ‚ Python/Swift/... ๏ผ‰ไธญๅทฒ็ปๅธ็ฉบ่งๆƒฏ๏ผŒๅณๅ€ผๅผ•็”จ็š„ๅ‡บ็Žฐ่งฃๅ†ณไบ† C++ ้•ฟๆœŸไปฅๆฅ่ขซไบบ่ฏŸ็—…็š„ไธดๆ—ถๅฏน่ฑกๆ•ˆ็އ้—ฎ้ข˜็ญ‰็ญ‰ใ€‚
14+
**C++1x** (ๆˆ–**็Žฐไปฃ C++**๏ผŒๆœฌไนฆไธญๅ‡ๆŒ‡ C++11/14/17/20) ไธบไผ ็ปŸ C++ ๆณจๅ…ฅ็š„ๅคง้‡็‰นๆ€งไฝฟๅพ—ๆ•ดไธช C++ ๅ˜ๅพ—ๆ›ดๅŠ ๅƒไธ€้—จ็ŽฐไปฃๅŒ–็š„่ฏญ่จ€ใ€‚C++1x ไธไป…ไป…ๅขžๅผบไบ† C++ ่ฏญ่จ€่‡ช่บซ็š„ๅฏ็”จๆ€ง๏ผŒ`auto` ๅ…ณ้”ฎๅญ—่ฏญไน‰็š„ไฟฎๆ”นไฝฟๅพ—ๆˆ‘ไปฌๆ›ดๅŠ ๆœ‰ไฟกๅฟƒๆฅๆ“ๆŽงๆžๅบฆๅคๆ‚็š„ๆจกๆฟ็ฑปๅž‹ใ€‚ๅŒๆ—ถ่ฟ˜ๅฏน่ฏญ่จ€่ฟ่กŒๆœŸ่ฟ›่กŒไบ†ๅคง้‡็š„ๅผบๅŒ–๏ผŒLambda ่กจ่พพๅผ็š„ๅ‡บ็Žฐ่ฎฉ C++ ๅ…ทๆœ‰ไบ†ใ€ŽๅŒฟๅๅ‡ฝๆ•ฐใ€็š„ใ€Ž้—ญๅŒ…ใ€็‰นๆ€ง๏ผŒ่€Œ่ฟ™ไธ€็‰นๆ€งๅ‡ ไนŽๅœจ็Žฐไปฃ็š„็ผ–็จ‹่ฏญ่จ€๏ผˆ่ฏธๅฆ‚ Python/Swift/... ๏ผ‰ไธญๅทฒ็ปๅธ็ฉบ่งๆƒฏ๏ผŒๅณๅ€ผๅผ•็”จ็š„ๅ‡บ็Žฐ่งฃๅ†ณไบ† C++ ้•ฟๆœŸไปฅๆฅ่ขซไบบ่ฏŸ็—…็š„ไธดๆ—ถๅฏน่ฑกๆ•ˆ็އ้—ฎ้ข˜็ญ‰็ญ‰ใ€‚
1515

1616
C++17 ๅˆ™ๆ˜ฏ่ฟ‘ไธ‰ๅนดไพ่ต– C++ ็คพๅŒบไธ€่‡ดๆŽจ่ฟ›็š„ๆ–นๅ‘๏ผŒไนŸๆŒ‡ๅ‡บไบ†**็ŽฐไปฃC++**็ผ–็จ‹็š„ไธ€ไธช้‡่ฆๅ‘ๅฑ•ๆ–นๅ‘ใ€‚ๅฐฝ็ฎกๅฎƒ็š„ๅ‡บ็Žฐๅนถไธๅฆ‚ C++11 ็š„ๅˆ†้‡ไน‹้‡๏ผŒไฝ†ๅฎƒๅŒ…ๅซไบ†ๅคง้‡ๅฐ่€Œ็พŽ็š„่ฏญ่จ€ไธŽ็‰นๆ€ง๏ผˆไพ‹ๅฆ‚็ป“ๆž„ๅŒ–็ป‘ๅฎš๏ผ‰๏ผŒ่ฟ™ไบ›็‰นๆ€ง็š„ๅ‡บ็Žฐๅ†ไธ€ๆฌกไฟฎๆญฃไบ†ๆˆ‘ไปฌๅœจ C++ ไธญ็š„็ผ–็จ‹่Œƒๅผใ€‚
1717

@@ -36,7 +36,7 @@ C++17 ๅˆ™ๆ˜ฏ่ฟ‘ไธ‰ๅนดไพ่ต– C++ ็คพๅŒบไธ€่‡ดๆŽจ่ฟ›็š„ๆ–นๅ‘๏ผŒไนŸๆŒ‡ๅ‡บไบ†**็Žฐ
3636

3737
ๆœฌไนฆๆฏ็ซ ไธญ้ƒฝๅ‡บ็Žฐไบ†ๅคง้‡็š„ไปฃ็ ๏ผŒๅฆ‚ๆžœไฝ ๅœจ่ทŸ้šๆœฌไนฆไป‹็ป็‰นๆ€ง็š„ๆ€่ทฏ็ผ–ๅ†™่‡ชๅทฑ็š„ไปฃ็ ้‡ๅˆฐ้—ฎ้ข˜ๆ—ถ๏ผŒไธๅฆจ่ฏปไธ€่ฏป้šไนฆ้™„ไธŠ็š„ๆบ็ ๏ผŒไฝ ๅฏไปฅๅœจ[่ฟ™้‡Œ](../code)ไธญๆ‰พๅˆฐไนฆไธญไป‹็ป่ฟ‡็š„ๅ…จ้ƒจ็š„ๆบ็ ๏ผŒๆ‰€ๆœ‰ไปฃ็ ๆŒ‰็ซ ่Š‚็ป„็ป‡๏ผŒๆ–‡ไปถๅคนๅ็งฐไธบ็ซ ่Š‚ๅบๅทใ€‚
3838

39-
[่ฟ”ๅ›ž็›ฎๅฝ•](./toc.md) | ไธŠไธ€็ซ  | [ไธ‹ไธ€็ซ  ่ฟˆๅ‘ C++11/14/17](./01-intro.md)
39+
[่ฟ”ๅ›ž็›ฎๅฝ•](./toc.md) | ไธŠไธ€็ซ  | [ไธ‹ไธ€็ซ  ่ฟˆๅ‘็Žฐไปฃ C++](./01-intro.md)
4040

4141
## ่ฎธๅฏ
4242

โ€Žbook/zh-cn/01-intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: ็ฌฌ 1 ็ซ  ่ฟˆๅ‘ C++11/14/17
2+
title: ็ฌฌ 1 ็ซ  ่ฟˆๅ‘็Žฐไปฃ C++
33
type: book-zh-cn
44
order: 1
55
---
66

7-
# ็ฌฌ 1 ็ซ  ่ฟˆๅ‘ C++11/14/17
7+
# ็ฌฌ 1 ็ซ  ่ฟˆๅ‘็Žฐไปฃ C++
88

99
[TOC]
1010

โ€Žbook/zh-cn/02-usability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ std::cout << new_enum::value3 << std::endl
931931

932932
## ๆ€ป็ป“
933933

934-
ๆœฌ่Š‚ไป‹็ปไบ† C++11/14/17 ไธญๅฏน่ฏญ่จ€ๅฏ็”จๆ€ง็š„ๅขžๅผบ๏ผŒๅ…ถไธญ็ฌ”่€…่ฎคไธบๆœ€ไธบ้‡่ฆ็š„ๅ‡ ไธช็‰นๆ€งๆ˜ฏๅ‡ ไนŽๆ‰€ๆœ‰ไบบ้ƒฝ้œ€่ฆไบ†่งฃๅนถ็†Ÿ็ปƒไฝฟ็”จ็š„๏ผš
934+
ๆœฌ่Š‚ไป‹็ปไบ† C++11/14/17/20 ไธญๅฏน่ฏญ่จ€ๅฏ็”จๆ€ง็š„ๅขžๅผบ๏ผŒๅ…ถไธญ็ฌ”่€…่ฎคไธบๆœ€ไธบ้‡่ฆ็š„ๅ‡ ไธช็‰นๆ€งๆ˜ฏๅ‡ ไนŽๆ‰€ๆœ‰ไบบ้ƒฝ้œ€่ฆไบ†่งฃๅนถ็†Ÿ็ปƒไฝฟ็”จ็š„๏ผš
935935

936936
1. auto ็ฑปๅž‹ๆŽจๅฏผ
937937
2. ่Œƒๅ›ด for ่ฟญไปฃ

โ€Žbook/zh-cn/10-cpp20.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Concepts TS ็š„ๅ‘ๅธƒๅˆฐๆœ€ๅŽไธ€ๆฌก C++17 ็š„่ฎจ่ฎบไผšๅช็›ธ้š”ไบ†ไธๅˆฐๅ››ไธช
130130
1. [Final features of C++17](https://meetingcpp.com/index.php/br/items/final-features-of-c17.html)
131131
2. [C++17: will it be great or just ok?](https://codeplay.com/public/uploaded/filehost/0cbdaf_c++17post-oulu2016.pdf)
132132
3. [Why Concepts didn't make C++17๏ผŸ](http://honermann.net/blog/2016/03/06/why-concepts-didnt-make-cxx17/)
133-
4. [C++11/14/17 ็ผ–่ฏ‘ๅ™จๆ”ฏๆŒๆƒ…ๅ†ต](http://en.cppreference.com/w/cpp/compiler_support)
133+
4. [C++11/14/17/20 ็ผ–่ฏ‘ๅ™จๆ”ฏๆŒๆƒ…ๅ†ต](http://en.cppreference.com/w/cpp/compiler_support)
134134
135135
## ่ฎธๅฏ
136136

โ€Žbook/zh-cn/appendix1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ order: 11
88

99
้ฆ–ๅ…ˆ๏ผŒๆญๅ–œไฝ ้˜…่ฏปๅฎŒๆœฌไนฆ ๐ŸŽ‰ ๏ผ็ฌ”่€…ๅธŒๆœ›ๆœฌไนฆๆœ‰ๆ่ตทไฝ ๅฏน็Žฐไปฃ C++ ็š„ๅ…ด่ถฃใ€‚
1010

11-
ๆญฃๅฆ‚ๆœฌไนฆๅผ•่จ€้ƒจๅˆ†ๆๅˆฐ็š„๏ผŒๆœฌไนฆๅชๆ˜ฏไธ€ๆœฌๅธฆไฝ ๅฟซ้€Ÿ้ข†็•ฅ็Žฐไปฃ C++ 11/14/17 ๆ–ฐ็‰นๆ€ง็š„่ฏป็‰ฉ๏ผŒ่€Œ้ž่ฟ›้˜ถๅญฆไน ๅฎž่ทต C++ใ€Ž้ป‘้ญ”ๆณ•ใ€็š„ๅ†…ๅฎนใ€‚็ฌ”่€…ๅฝ“็„ถไนŸๆƒณๅˆฐไบ†่ฟ™ไธช้œ€ๆฑ‚๏ผŒๅชๆ˜ฏ่ฟ™ๆ ท็š„ๅ†…ๅฎน้žๅธธ่‰ฐๆทฑ๏ผŒ้ฒœๆœ‰ๅ—ไผ—ใ€‚ๅœจๆญค๏ผŒ็ฌ”่€…ๅˆ—ๅ‡บไธ€ไบ›่ƒฝๅคŸๅธฎๅŠฉไฝ ๅœจๆญคไนฆๅŸบ็ก€ไน‹ไธŠ่ฟ›ไธ€ๆญฅๅญฆไน ็Žฐไปฃ C++ ็š„่ต„ๆ–™๏ผŒๅธŒๆœ›่ƒฝๅคŸ็ฅไฝ ไธ€่‡‚ไน‹ๅŠ›๏ผš
11+
ๆญฃๅฆ‚ๆœฌไนฆๅผ•่จ€้ƒจๅˆ†ๆๅˆฐ็š„๏ผŒๆœฌไนฆๅชๆ˜ฏไธ€ๆœฌๅธฆไฝ ๅฟซ้€Ÿ้ข†็•ฅ็Žฐไปฃ C++ 11/14/17/20 ๆ–ฐ็‰นๆ€ง็š„่ฏป็‰ฉ๏ผŒ่€Œ้ž่ฟ›้˜ถๅญฆไน ๅฎž่ทต C++ใ€Ž้ป‘้ญ”ๆณ•ใ€็š„ๅ†…ๅฎนใ€‚็ฌ”่€…ๅฝ“็„ถไนŸๆƒณๅˆฐไบ†่ฟ™ไธช้œ€ๆฑ‚๏ผŒๅชๆ˜ฏ่ฟ™ๆ ท็š„ๅ†…ๅฎน้žๅธธ่‰ฐๆทฑ๏ผŒ้ฒœๆœ‰ๅ—ไผ—ใ€‚ๅœจๆญค๏ผŒ็ฌ”่€…ๅˆ—ๅ‡บไธ€ไบ›่ƒฝๅคŸๅธฎๅŠฉไฝ ๅœจๆญคไนฆๅŸบ็ก€ไน‹ไธŠ่ฟ›ไธ€ๆญฅๅญฆไน ็Žฐไปฃ C++ ็š„่ต„ๆ–™๏ผŒๅธŒๆœ›่ƒฝๅคŸ็ฅไฝ ไธ€่‡‚ไน‹ๅŠ›๏ผš
1212

1313
- [C++ ๅ‚่€ƒ](http://en.cppreference.com/w)
1414
- [CppCon YouTube ้ข‘้“](https://www.youtube.com/user/CppCon/videos)

โ€Žbook/zh-cn/toc.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
# ้ซ˜้€ŸไธŠๆ‰‹ C++ 11/14/17
2-
3-
> ๆญฃๅœจๅ‘ๅ…จ้ขไป‹็ป C++17 ็‰นๆ€ง็š„ๅ†…ๅฎน่ฟ‡ๅบฆ
1+
# ้ซ˜้€ŸไธŠๆ‰‹ C++ 11/14/17/20
42

53
## ็›ฎๅฝ•
64

75
- [**ๅบ่จ€**](./00-preface.md)
8-
- [**็ฌฌ 1 ็ซ  ่ฟˆๅ‘ C++11/14/17**](./01-intro.md)
6+
- [**็ฌฌ 1 ็ซ  ่ฟˆๅ‘็Žฐไปฃ C++**](./01-intro.md)
97
+ 1.1 ่ขซๅผƒ็”จ็š„็‰นๆ€ง
108
+ 1.2 ไธŽ C ็š„ๅ…ผๅฎนๆ€ง
119
+ ่ฟ›ไธ€ๆญฅ้˜…่ฏป็š„ๅ‚่€ƒๆ–‡็Œฎ
@@ -83,6 +81,8 @@
8381
+ 7.2 `std::mutex` ๅ’Œ `std::unique_lock`
8482
+ 7.3 `std::future` ๅ’Œ `std::packaged_task`
8583
+ 7.4 `std::condition_variable`
84+
+ 7.5 `std::atomic` ไธŽๅ†…ๅญ˜้กบๅบ
85+
+ 7.6 ไบ‹ๅŠกๅ†…ๅญ˜
8686
- [**็ฌฌ 8 ็ซ  ๆ ‡ๅ‡†ๅบ“: ๆ–‡ไปถ็ณป็ปŸ**](./08-filesystem.md)
8787
+ 8.1 ๆ–‡ๆกฃไธŽ้“พๆŽฅ
8888
+ 8.2 `std::filesystem`

โ€Žpdf/en-us/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
title = 'C++11/14/17 On the Fly'
1+
title = 'C++11/14/17/20 On the Fly'
22
filename = 'modern-cpp-tutorial'
33
outputname='modern-cpp-tutorial'
44
revision = $(shell git describe --always --tags)

โ€Žpdf/en-us/aggregator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
with open('modern-cpp-tutorial.md', 'w') as outfile:
1212
outfile.write("""---
13-
title: "C++11/14/17 On the Fly"
13+
title: "C++11/14/17/20 On the Fly"
1414
author: Changkun Ou <hi@changkun.us>
1515
copyright: cc-by-nc-nd 4.0
1616
---

โ€Žpdf/en-us/meta/template.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
\thispagestyle{plain}
162162
\begin{center}
163163

164-
{\LARGE\textbf{C++11/14/17 On the Fly}}
164+
{\LARGE\textbf{C++11/14/17/20 On the Fly}}
165165

166166
\vspace{1em}
167167
{\large Changkun Ou (hi@changkun.us)}
@@ -172,7 +172,7 @@
172172
\vspace{1em}
173173
\textbf{\large License}
174174

175-
\noindent This work is written by \href{https://github.com/changkun}{Ou Changkun} and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. \texttt{\small http://creativecommons.org/licenses/by-nc-nd/4.0/}
175+
\noindent This work was written by \href{https://github.com/changkun}{Ou Changkun} and licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. \texttt{\small http://creativecommons.org/licenses/by-nc-nd/4.0/}
176176

177177
\vspace{8em}
178178
\includegraphics{../../assets/cover-2nd-en}

โ€Žpdf/zh-cn/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
title = '้ซ˜้€ŸไธŠๆ‰‹ C++11/14/17'
1+
title = '้ซ˜้€ŸไธŠๆ‰‹ C++11/14/17/20'
22
filename = 'modern-cpp-tutorial'
33
outputname='modern-cpp-tutorial'
44
revision = $(shell git describe --always --tags)

โ€Žpdf/zh-cn/aggregator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
with open('modern-cpp-tutorial.md', 'w') as outfile:
1111
outfile.write("""---
12-
title: "้ซ˜้€ŸไธŠๆ‰‹ C++11/14/17"
12+
title: "้ซ˜้€ŸไธŠๆ‰‹ C++11/14/17/20"
1313
author: ๆฌง้•ฟๅค <hi@changkun.us>
1414
copyright: cc-by-nc-nd 4.0
1515
---

โ€Žpdf/zh-cn/meta/template.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
\thispagestyle{plain}
165165
\begin{center}
166166

167-
{\LARGE\textbf{้ซ˜้€ŸไธŠๆ‰‹ C++11/14/17}}
167+
{\LARGE\textbf{้ซ˜้€ŸไธŠๆ‰‹ C++11/14/17/20}}
168168

169169
\vspace{1em}
170170
{\large ๆฌง้•ฟๅค (hi@changkun.us)}

โ€Žwebsite/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# changkun.de/modern-cpp
22

3-
Welcome to Modern C++ Tutorial! This site is built with [hexo](http://hexo.io/). Site content is written in Markdown format located in `../book`. And all static files will be built into `./public`, which is served by a nginx server at [changkun.de](https://changkun.de).
3+
Welcome to Modern C++ Tutorial! This site is built with [hexo](http://hexo.io/). Site content was written in Markdown format located in `../book`. And all static files will be built into `./public`, which is served by a nginx server at [changkun.de](https://changkun.de).
44

55
## Requirements
66

โ€Žwebsite/_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Site Configuration
2-
title: ้ซ˜้€ŸไธŠๆ‰‹ C++ 11/14/17
3-
subtitle: C++ 11/14/17 On the Fly
2+
title: ้ซ˜้€ŸไธŠๆ‰‹ C++ 11/14/17/20
3+
subtitle: C++ 11/14/17/20 On the Fly
44
description: "ๆฌง้•ฟๅค"
55
author: ๆฌง้•ฟๅค
66
email: hi[at]changkun.us
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
site_description: "็Žฐไปฃ C++ | ้ซ˜้€ŸไธŠๆ‰‹ C++ 11/14/17"
1+
site_description: "็Žฐไปฃ C++ | ้ซ˜้€ŸไธŠๆ‰‹ C++ 11/14/17/20"
22
google_analytics:
33
root_domain: changkun.de/modern-cpp
44
moderncpp_version: 2.0.0

โ€Žwebsite/themes/moderncpp/layout/index.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</div><div class="right">
1414
<h4>ๆฌง้•ฟๅค ่‘—</h4>
1515
<h1>
16-
้ซ˜้€ŸไธŠๆ‰‹<br>C++ 11/14/17
16+
้ซ˜้€ŸไธŠๆ‰‹<br>C++ 11/14/17/20
1717
</h1>
1818
<h2>็ฌฌไบŒ็‰ˆ</h2>
1919
<p>

โ€Žwebsite/themes/moderncpp/layout/layout.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!DOCTYPE html>
44
<html lang="en">
55
<head>
6-
<title><%- page.title ? page.title : '' %> ้ซ˜้€ŸไธŠๆ‰‹ C++ 11/14/17 - C++ 11/14/17 On the Fly</title>
6+
<title><%- page.title ? page.title : '' %> ้ซ˜้€ŸไธŠๆ‰‹ C++ 11/14/17/20 - C++ 11/14/17/20 On the Fly</title>
77
<meta charset="utf-8">
88
<meta name="description" content="<%- theme.site_description %>">
99
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
@@ -23,7 +23,7 @@
2323

2424
</head>
2525
<body class="<%- isIndex ? '' : 'docs' -%>">
26-
<div id="mobile-bar" data-bg-text="้ซ˜้€ŸไธŠๆ‰‹ C++ 11/14/17" <%- isIndex ? 'class="top"' : '' %>>
26+
<div id="mobile-bar" data-bg-text="้ซ˜้€ŸไธŠๆ‰‹ C++ 11/14/17/20" <%- isIndex ? 'class="top"' : '' %>>
2727
<a class="menu-button"></a>
2828
<a class="logo" href="/modern-cpp/"></a>
2929
</div>

0 commit comments

Comments
ย (0)