forked from changkun/modern-cpp-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add changkun#12: prepare English supports
- Loading branch information
Showing
25 changed files
with
187 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<img src="assets/cover-2nd-en.png" alt="logo" height="600" align="right" /> | ||
|
||
# C++11/14/17 On the Fly | ||
|
||
![](https://img.shields.io/badge/version-v2-green.svg) ![](https://img.shields.io/badge/language-English-blue.svg) [![](https://img.shields.io/badge/$-donate-ff69b4.svg)](./assets/donate.md) [![](https://img.shields.io/badge/chat-community-667ed5.svg)](./assets/community.md) | ||
|
||
> This book is adapting to C++17 | ||
## Languages | ||
|
||
- 🇨🇳 [简体中文](./README.md) | ||
- 🇬🇧 English | ||
|
||
## Purpose | ||
|
||
The book claims "On the Fly". Its intent is to provide a comprehensive introduction to the relevant features regarding modern C++ (before 2020s). | ||
Readers can choose interesting content according to the following table of content to learn and quickly familiarize the new features you would like to learn. | ||
Readers should aware that all of these features are not required. It should be leart when you really need it. | ||
|
||
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. | ||
|
||
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. | ||
|
||
## Targets | ||
|
||
- This book assumes that readers are already familiar with traditional C++ (e.g. C++98), at least they do not have any difficulty in reading traditional C++ code. In other words, those who have long experience in traditional C++ and people who desire to quickly understand the features of modern C++ in a short period of time are well suited to read the book; | ||
|
||
- This book introduces to a certain extent of the dark magic of modern C++. However, these magics are very limited, they are not suitable for readers who want to learn advanced C++. The purpose of this book is offering a quick start for modern C++. Of course, advanced readers can also use this book to review and examine themselves on modern C++. | ||
|
||
## Start | ||
|
||
You can choose from the following reading methods: | ||
|
||
- [GitHub Online](./book/en-us/toc.md) | ||
- [PDF document] | ||
- [Website] | ||
|
||
## Code | ||
|
||
Each chapter of this book has a lot of code. If you encounter problems when writing your own code with the introductory features of the book, you might as well read the source code attached to the book. You can find the book [here](./code). All the code organized by chapter, the folder name is the chapter number. | ||
|
||
## Exercises | ||
|
||
There are few exercises At the end of each chapter of the book. It is for testing whether you can use the knowledge points in the current chapter. You can find the possible answer to the problem from [here](./exercise). The folder name is the chapter number. | ||
|
||
## Acknowledgements | ||
|
||
This book is originally written in Chinese, and the author's time, skills and languages are limited. If readers find any mistakes of the book or any language improvements, please feel free to open an [issue](https://github.com/changkun/modern-cpp-tutorial/issues). The author would like to appreciate all of the contributors of this book for discovering mistakes: | ||
|
||
[recolic](https://www.gitbook.com/@recolic), [sinomiko](https://www.gitbook.com/@sinomiko), [jackwish](https://www.gitbook.com/@jackwish), [asmwarrior](https://www.gitbook.com/@asmwarrior), [garicc](https://www.gitbook.com/@ihpy), [jiangwenhan](https://www.gitbook.com/@jiangwenhan), [liangx8](https://www.gitbook.com/@liangx8), [slivermeteor](https://github.com/slivermeteor), [inkedawn](https://github.com/inkedawn), [zhaoyao73](https://github.com/zhaoyao73), [sundy-li](https://github.com/sundy-li), [dontpanic92](https://github.com/dontpanic92) | ||
|
||
## Licenses | ||
|
||
<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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Community | ||
|
||
This book offers a reader community, you can join this Telegram: | ||
|
||
TBA |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Donate | ||
|
||
To donate the author: | ||
|
||
TBA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# C++ 11/14/17 On The Fly | ||
|
||
> This book adapting to C++17 and translating to English | ||
## Table of Contents | ||
|
||
- [**Preface**](./00-preface.md) | ||
- [**Chapter 01 Towards C++11/14/17**](./01-intro.md) | ||
+ 1.1 Deprecated Features | ||
+ 1.2 Compatibility with C | ||
+ Further Readings | ||
- [**Chapter 02 Language Usability Enhancements**](./02-usability.md) | ||
+ 2.1 Constants | ||
- nullptr | ||
- constexpr | ||
+ 2.2 Variables & Initialization | ||
- Conditional Statement | ||
- Initializer List | ||
- Structured binding | ||
+ 2.3 Type Deduction | ||
- auto | ||
- decltype | ||
- Tail return type | ||
- decltype(auto) | ||
+ 2.4 Control Flow | ||
- if constexpr | ||
- Range-based for loop | ||
+ 2.5 Templates | ||
- External templates | ||
- The ">" | ||
- Type alias templates | ||
- Default template parameters | ||
- Variadic templates | ||
- Fold expression | ||
+ 2.6 Object-oriented | ||
- Delegate constructor | ||
- Inheritance constructor | ||
- Explicit virtual function overwrite | ||
- override | ||
- final | ||
- Explicit delete default function | ||
- Strongly typed enumerations | ||
- [**Chapter 03 Language Runtime Enhancements**](./03-runtime.md) | ||
+ Lambda expression | ||
+ Basics | ||
+ Value capture | ||
+ Reference capture | ||
+ Implicit capture | ||
+ Expression capture | ||
+ Generic lambda | ||
+ Function object wrapper | ||
+ std::function | ||
+ std::bind/std::placeholder | ||
+ rvalue reference | ||
+ lvalue, rvalue, prvalue, xvalue | ||
+ rvalue reference & lvalue reference | ||
+ Move semantics | ||
+ Perfect forwarding | ||
- [**Chapter 04 Sandard Library: Containers**](./04-containers.md) | ||
+ `std::array` | ||
+ `std::forward_list` | ||
+ `std::unordered_set` | ||
+ `std::unordered_map` | ||
+ `std::tuple` | ||
+ basic operation | ||
+ runtime indexing | ||
+ merge and iteration | ||
- [**Chapter 05 Sandard Library: Pointers**](./05-pointers.md) | ||
+ RAII and reference counting | ||
+ `std::shared_ptr` | ||
+ `std::unique_ptr` | ||
+ `std::weak_ptr` | ||
- [**Chapter 06 Sandard Library: Regular Expression**](./06-regex.md) | ||
+ Regular Expression Introduction | ||
+ Normal characters | ||
+ Special characters | ||
+ Determinative | ||
+ `std::regex` | ||
+ `std::regex` | ||
+ `std::regex_match` | ||
+ `std::match_results` | ||
- [**Chapter 07 Sandard Library: Threads and Concurrency**](./07-thread.md) | ||
+ `std::thread` | ||
+ `std::mutex` | ||
+ `std::unique_lock` | ||
+ `std::future` | ||
+ `std::packaged_task` | ||
+ `std::condition_variable` | ||
- [**Chapter 08 Sandard Library: File System**](./08-filesystem.md) | ||
- [**Chapter 09 Minor Features**](./09-others.md) | ||
+ New Types | ||
+ `long long int` | ||
+ `noexcept` | ||
+ Literal | ||
+ Raw string literal | ||
+ Custom string literal | ||
+ Math Library | ||
- [**Chapter 10 Outlook: Introduction of C++20**](./10-cpp20.md) | ||
+ Concept | ||
+ Range | ||
+ Module | ||
+ Coroutine | ||
- [**Appendix: Further Study Materials**](./appendix.md) | ||
|
||
Table of Content | Last Chapter | [Next Chapter: Preface](./00-preface.md) | ||
|
||
## Licenses | ||
|
||
<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). |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.