Complete Guide to C++17
This book is a personal Chinese translation version of "C++17 the complete guide" (first edition) by Nicolai M. Josuttis. It is for learning and communication only. If there is any infringement, please contact the author to delete it.
The following is the original English purchase address
- Electronic version https://leanpub.com/cpp17
- Printed version https://t.co/aJQbbvmt4Z
The following is a Chinese translation version
pdf version (recommended)
Click here to download
Note:
- Clicking the above link in github may display "something went wrong", which can be downloaded and opened locally.
- It seems that latex will not embed the fonts used by default. If a certain font looks weird after pdf is opened, it is likely that the corresponding fonts are missing. The fonts used in this book include Song font, Kai font, Times New Roman, and Consolas
epub version
Click here to download
Note:
- epub version provided by @wizardforce, thanks for the contribution.
markdown version directory
- Part 1 Basic Language Features
- Chapter 1 Structured Binding
- Chapter 2 If and switch statements with initialization
- Chapter 3 Inline Variables
- Chapter 4 Polymer expansion
- Chapter 5 Forced omit copy or pass unsubstantiated objects
- Chapter 6 lambda expression extension
- Chapter 7 New Attributes and Attribute Features
- Chapter 8 Other Language Features
- Part 2 Template Features
- Chapter 9 Derivation of Class Template Parameters
- Chapter 10 Compilation period if statement
- Chapter 11 Folding Expressions
- Chapter 12 Handling String Literal Template Parameters
- Chapter 13 Placeholder type as template parameter
- Chapter 14 Extended using statement
- Part 3 New Standard Library Components
- Chapter 15 std::optional<>
- Chapter 16 std::variant<>
- Chapter 17 std::any
- Chapter 18 std::byte
- Chapter 19 String View
- Chapter 20 File System Library
- Part 4 has been extended and modified from the standard library
- Chapter 21 Type Feature Extension
- Chapter 22 Parallel STL Algorithm
- Chapter 23 Detailed explanation of the new STL algorithm
- Chapter 24 Substring and Subsequence Searcher
- Chapter 25 Other Tool Functions and Algorithms
- Chapter 26 Container and String Extensions
- Chapter 27 Multithreading and Concurrency
- Chapter 28 Other tiny features and modifications of the standard library
- Part 5 Expert Tools
- Chapter 29 Polymorphic Memory Resources (PMR)
- Chapter 30 Use new and delete to manage hyper-aligned data
- Chapter 31 std::to_chars() and std::from_chars()
- Chapter 32 std::launder()
- Chapter 33 Improvements in writing generic code
- Part 6 Some general tips
- Chapter 34 Overall C++17 Matters
- Chapter 35 The characteristics of abandonment and removal
illustrate
The markdown version is converted directly from the PDF version using the program, and then proofread and correct it.
However, not only some information is lost during the conversion process, but also many errors are caused.
Although many errors were corrected during proofreading, due to limited time, there must be many errors that have not been discovered.
Therefore, it is more recommended to PDF version
Whether it is the PDF version or the markdown version, if you find an error, please point it out, and you can also correct it yourself and submit a PR.
Compilation
- Install
tectonic - Make sure you have the required fonts: Song font, Kai font (optional), Times New Roman, Consolas
- If there is a line
includeonly{xxx} in latex/src/main.tex and is not commented out (the content after % is a comment), please delete this line before compilation - Compile pdf file
cd latex/src
tectonic main.tex
- The generated
main.pdf is the last pdf file
- note: If
tectonic is not in PATH after installing tectonic , please replace tectonic in step 5 with the full path - note: If you want to replace fonts or modify line spacing, you can modify
latex/src/main.tex - note: If all steps are correct and the compilation fails, please contact the issue