changkun/modern-cpp-tutorial: a C++11 to C++26 book you can read as PDF, EPUB or source
📚 Modern C++ Tutorial: C++11 to C++26 On the Fly | https://changkun.de/modern-cpp/
At a glance
- What is it?
- Modern C++ Tutorial is a book plus a code repository, not a framework. It targets developers who already read C++98 and want the newer language features explained with runnable examples, and it ships in three formats.
- Who is it for?
- Adopt it if you already read C++98 and want the newer features explained alongside their historical motivation, in a format you can read offline. Do not adopt it as a reference manual or as a first programming course: the README states it assumes familiarity with traditional C++, and the author notes the dark magic covered is deliberately limited.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 101 days ago.
- What is it written in?
- Mainly C++, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What Modern C++ Tutorial actually is, and who it is written for
This repository holds a book, not a library. The README describes the project as "a comprehensive introduction to the relevant features of modern C++ (from C++11 through C++26)", and the top-level layout matches that: book/, code/, exercises/, pdf/, epub/, website/. There is no package to install into a build, no header to include, and no runtime dependency to manage.
The stated audience is narrow and explicit. The README says the book "assumes that readers are already familiar with traditional C++ (i.e. C++98 or earlier), or at least that they do not have any difficulty in reading traditional C++ code". That single sentence rules out a large group of people who search for modern C++ tutorials: beginners. If you cannot read a template declaration or a pointer-to-member without help, this book starts ahead of you.
The second stated goal is motivation, not just syntax. The README says the book "introduces the historical background of its technical requirements (as simple as possible), which provides great help in understanding why these features came out". That is the real differentiator against a plain feature list. Move semantics, variadic templates and the concurrency library all make more sense once you know which problem each one was proposed to solve.
The README also sets an expectation about depth. It says the book introduces "the dark magic of modern C++" to a limited extent, and that the tricks "are not suitable for readers who want to learn advanced C++". Read that as a scope boundary rather than modesty. You will not find a full treatment of template metaprogramming or of writing a custom allocator here.
How the book, the code and the exercises fit together
The repository is organised so that prose and compilable code stay adjacent. The README states that each chapter contains a lot of code, that the source is collected under code/, and that "all the code is organized by chapter, the folder name is the chapter number". The same convention applies to exercises: the README points to exercises/ and repeats that the folder name is the chapter number.
That numbering is the whole data flow. A reader moves from a chapter in book/ to the matching numbered directory under code/ to see the example in a form that can be compiled, then to the same numbered directory under exercises/ for the questions at the end of the chapter. Nothing in the repository generates or transforms the code; the build produces documents, not binaries.
The Makefile confirms the split between content and output. Its TARGET variable is set to "pdf epub", and its LANGS variable is "zh-cn en-us", so the build loop iterates over both languages and both formats. The recipe creates a directory under website/public/modern-cpp/, builds inside each language directory, runs make clean, and moves the produced file to a name of the form modern-cpp-tutorial-<lang>.<format>. The website target is separate and simply delegates to website/, which the README says is built with hexo and vuejs.
One practical consequence: the book exists in Simplified Chinese and English. The README notes the book "was originally written in Chinese by Changkun Ou", and the language badges at the top link to README.md and README-zh-cn.md. The English text is a translation, and the author states plainly in the acknowledgements that he "has limited time and language skills" and invites issues and pull requests for language improvements. Treat the English prose as editable community output, not as a frozen reference.
Installing nothing: reading Modern C++ Tutorial as PDF, EPUB or source
There is no installation step for the book itself. The README offers four reading methods: the GitHub online table of contents, a PDF document, an EPUB document, and the website. The PDF and EPUB are served from the project homepage at changkun.de, and the table of contents lives at book/en-us/toc.md in the repository.
If you want to build the documents yourself, the README recommends Docker and gives a single command. The Makefile defines the build target as a docker run that mounts the current directory into the container and invokes make inside it.
$ make buildThat target depends on the build-env image, which the Makefile builds from ./docker/Dockerfile. So a first local build means building the environment image first, then running the containerised make. Expect the output to land under website/public/modern-cpp/pdf/ and website/public/modern-cpp/epub/, named by language, per the Makefile recipe.
For a first real use, you do not need the build at all. Open the table of contents, pick the chapter that matches the feature you are being asked to use at work, and read the matching numbered directory under code/ side by side.
$ git clone https://github.com/changkun/modern-cpp-tutorial.git
$ cd modern-cpp-tutorial
$ ls codeThe README does not document a compiler version, a standard flag, or a per-chapter build command for the code/ directory, so compiling an example means choosing your own toolchain flags. That is a gap worth knowing about before you plan a study session around the examples.
If you only want the website locally, the Makefile has a serve target that changes into website/ and runs make s. The README does not document which port that serves on.
Where Modern C++ Tutorial stops being the right tool
The clearest limitation is stated by the author rather than discovered by the reader: the book is a quick start, and its coverage of advanced technique is deliberately thin. Anyone hoping to learn to write a compile-time parser or a custom iterator adaptor will need another source.
The second limitation is version drift. The title promises C++11 to C++26, and the README repeats that range, but the most recent release listed is v2.0.0-beta, dated 2021-08-11, and its own title reads "Modern C++ Tutorial: C++11/14/17/20 On the Fly". The repository's last push was on 2026-06-21, so work has continued on the master branch, but the release history does not show a stable release covering the later standards. If you need C++23 or C++26 material, verify it exists in the current table of contents rather than assuming the title delivers it evenly.
Third, the code examples are illustrations, not a tested library. Nothing in the repository layout suggests a continuous integration job that compiles every example across compilers, and the README does not claim one. Examples that rely on a particular standard revision will need the matching flag from you.
Finally, the book is opinionated about adoption in a way that may not match a conservative codebase. The README states the author "would like to encourage readers to use modern C++ directly in their new projects and migrate their old projects to modern C++ gradually". That is advice about project policy, not a technical guarantee, and it does not address ABI compatibility, toolchain availability, or the cost of rewriting code that already works.
Alternatives: cppreference, and the case for a reference instead of a book
The obvious alternative is cppreference.com, and the difference is structural rather than qualitative. cppreference is organised by language entity: one page per type, function, or header, each documenting signatures, overloads and standard revision markers. It answers "what are the exact semantics of std::optional::value_or" and it does not attempt to explain why the feature exists or in what order you should learn things.
Modern C++ Tutorial inverts that. It is organised as a linear book with chapters, exercises and paired example code, and its stated value is the historical background behind each feature. The cost of that organisation is lookup speed: finding one specific rule means knowing which chapter covers it.
A second alternative for the same audience is the compiler itself plus a conformance table. If your question is "does this compiler support this feature at this standard level", a book cannot answer it reliably, and the README makes no such claim. Use the book to decide whether a feature is worth adopting, then use the compiler to confirm it is available in your toolchain.
The two are complementary rather than competing. The book's chapter structure tells you the order in which features build on each other; the reference tells you the exact rules once you have chosen. A reader who tries to use the book as a reference will find it too coarse, and a reader who tries to learn from the reference alone will find it too granular.
Licence, maintenance and the cost of keeping a book current
The repository splits its licensing, and the split matters if you plan to reuse anything. The README states the work was written by Ou Changkun and is licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International, while "the code of this repository is open sourced under the MIT license". The LICENSE file at the top level carries the MIT text.
In practice that means the prose and the code carry different permissions. MIT on the code is permissive. The CC BY-NC-ND terms on the book text restrict commercial use and derivatives, which is relevant if you were considering translating a chapter, republishing it inside a company wiki, or bundling it in paid training material. This is a description of what the files say, not legal advice; if your intended reuse is commercial or derivative, read the licence texts and take your own counsel.
Maintenance is the harder question for a book. The last push to the repository was on 2026-06-21, so the project is not abandoned, but the release list is thin: v2.0.0-beta in 2021, v2.0.0-alpha in 2019, and v1.0.1 in 2018. A book that tracks a language standard has to be revised every three years or so, and the release history does not show that cadence settling into stable tags. The practical upgrade cost for a reader is low, since you consume a document rather than a dependency, but the cost for the project is high, because every new standard adds chapters that must be written in two languages and rebuilt into two formats.
The contribution path is documented: the README asks readers to open an issue or a pull request and points to CONTRIBUTING.md for guidelines and a checklist. The author explicitly invites language improvements, which suggests the English text benefits most from review.
Editorial conclusion
Adopt it if you already read C++98 and want the newer features explained alongside their historical motivation, in a format you can read offline. Do not adopt it as a reference manual or as a first programming course: the README states it assumes familiarity with traditional C++, and the author notes the dark magic covered is deliberately limited. Before relying on it, check the chapter list in book/en-us/toc.md against the standard you actually target, and confirm the licence split, because the prose is CC BY-NC-ND 4.0 while the code is MIT.
Frequently asked questions
What is the difference between C++ and modern C++ in changkun/modern-cpp-tutorial?
The book uses "modern C++" for the features introduced from C++11 onward, and its stated scope runs from C++11 through C++26. It assumes you already read traditional C++ (C++98 or earlier), so the difference it teaches is the set of features added after that baseline.
Is C++ still worth learning in 2026?
The repository does not address this. Its README only states the author's encouragement to use modern C++ in new projects and to migrate old projects gradually, which is a position on adoption rather than a claim about the language's current standing.
Is changkun/modern-cpp-tutorial the best tutorial for learning C++?
The README does not make a comparative claim, and it rules out beginners by stating the book assumes familiarity with traditional C++ or at least no difficulty reading it. It is positioned as a quick start for people who already know C++98.
What is meant by modern C++ in changkun/modern-cpp-tutorial?
The README defines the term by its range: the relevant features of modern C++ from C++11 through C++26, presented with the historical background of why each feature was introduced.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/changkun-modern-cpp-tutorial)