I'm proud to present the early release of my book to C++20 on LeanPub. The book is 50 % done and has more than 300 pages and 150 code examples of content. I will update the book at least two times in 2021. Of course, you will get each update of the book.

How to Get it?
Use the link: Leanpub.com: C++20
What's Inside?
My book C++20 is both: a tutorial and reference to the C++20 standard. It teaches you C++20 and provides you with the details of this new thrilling C++ standard. The thrilling factor is mainly due to the big four of C++20.
- Concepts change the way we think and program templates. They are semantic categories for the template parameters. They enable you to express your intention directly in the type system. If something goes wrong, you get a clear error message.
- The new ranges library enables it to perform algorithms directly on the container, compose the algorithm with the pipe symbol, and apply them onto infinite data streams.
- Thanks to coroutines asynchronous programming in C++ becomes mainstream. Coroutines are the base for cooperative tasks, event loops, infinite data streams, or pipelines.
- Modules overcome the restrictions of header files. They promise a lot. For example, the separation of header and source files becomes as obsolete as the preprocessor. In the end, we have faster built time and an easier way to build packages.
More Details
- Core Language
- Concepts
- Two Wrong Approaches
- Advantages of Concepts
- Usage of Concepts
- Unconstrained Placeholders and Constrained Placeholders
- Abbreviated Function Templates
- Predefined Concepts
- Define Concepts
- Application
- Moduls
- Why do we need modules?
- Advantages
- A First Example
- Compilation and Use
- Modularized Standard Library
- Export
- Guidelines for a Module Structure
- Module Interface Unit and Module Implementation Unit
- Submodules and Module Partitions
- Templates in Modules
- Module Linkage
- Header Units
- Three-Way Comparison Operator
- Ordering before C++20
- Ordering since C++20
- The Compiler-Generated Spaceship Operator
- Rewriting Expressions
- User-Defined and Auto-Generated Comparison Operators
- Designated Initialization
- Aggregate Initialization
- Designated Initialization
consteval
and constint
consteval
constinit
- Function Execution
- Variable Initialization
- Solving the Static Initialization Order Fiasco
- Template Improvements
- Conditionally Explicit Constructor
- Non-Type Template Parameters
- Lambda Improvements
- Template Parameter for Lambdas
- Detection of the Implicitly Copy of the
this
Pointer
- Lambdas in an Unevaluted Context and Stateless Lambdas can be Default-Constructed and Copy-Assigned
- New Attributes
[[nodiscard("reason")]]
[[likely]]
and [[unlikely]]
[[no_unique_address]]
volatile
- Further Improvements
- Range-base for-loop with Initializers
- Virtual
constexpr
function
- The new Character Type of UTF-8 Strings:
char8_t
using
enum
in Local Scopes
- Default Member Initializers for Bit Fields
- Standard Library
- Ranges Library
- The Concepts Ranges and Views
- Direct on the Container
- Function Composition
- Lazy Evaluation
- A Flavor of Python
std::span
- Create a
std::span
from a Pointer and a Size
- Modifying the Referenced Objects
- Addressing its Elements
- Container Improvements
constexpr
Container and Algorithms
std::array
- Consistent Container Erasure
contains
for Associative Containers
- String prefix and suffix checking
- Arithmetic Utilities
- Safe Comparison of Integrals
- Mathematical Constants
- Midpoint and Linear Interpolation
- Bit Manipulation
- Calendar and Time-Zone
- Time of day
- Calendar Dates
- Time-Zones
- Formatting Library
- Format String
- User-Defined Types
- Further Improvements
- std::bind_front
std::is_constant_evaluated
std::source_location
- Concurrency
- Coroutines
- A Generator Function
- Details
- The Framework
- Atomics
std::atomic_ref
- Atomic Smart Pointer
std::atomic_flag
Extensions
std::atomic
Extensions
- Semaphores
- Latches and Barriers
- Cooperatively Interruption
std::stop_token
, std::stop_source
, and std::stop_callback
std::jthread
- Automatically Joining
- Interrupt a
std::jthread
- Synchronized Outputstreams
- C++23 and Beyond
- Coroutines Library
- Modularized Standandard Library for Modules
- Executors
- Network Library
- Contracts
- Reflection
- Pattern Matching
State of the Book
Early Publishing
Although the book is only 50 % done, I publish it at LeanPub. I will update the book at least two times and assume that I'm done with the book in about a year. I decided to publish it half-done because it provides valuable information even in this early stage.
Further Updates
You can expect the following improvements with future updates.
- More code examples when missing C++20 features are available. Additionally, I reimplement existing examples using the C++20 standard and not prototype libraries such as fmt or date.
- More details on the C++20 features.
- A preview of the new C++23 standard.
- Tutorials to the big four at least: concepts, ranges, modules, and coroutines.
- If you have any questions to the book, please contact me: This email address is being protected from spambots. You need JavaScript enabled to view it..
Modernes C++,

Thanks a lot to my Patreon Supporters: Matt Braun, Roman Postanciuc, Tobias Zindl, Marko, G Prvulovic, Reinhold Dröge, Abernitzke, Frank Grimm, Sakib, Broeserl, António Pina, Darshan Mody, Sergey Agafyin, Андрей Бурмистров, Jake, GS, Lawton Shoemake, Animus24, Jozo Leko, John Breland, espkk, Wolfgang Gärtner, Louis St-Amour, Stephan Roslen, Venkat Nandam, Jose Francisco, Douglas Tinkham, Kuchlong Kuchlong, Avi Kohn, Robert Blanch, Truels Wissneth, Kris Kafka, Mario Luoni, Neil Wang, Friedrich Huber, lennonli, Pramod Tikare Muralidhara, and Peter Ware.
Thanks in particular to Jon Hess, Lakshman, Christian Wittenhorst, Sherhy Pyton, Dendi Suhubdy, and Sudhakar Belagurusamy.
Seminars
I'm happy to give online-seminars or face-to-face seminars world-wide. Please call me if you have any questions.
Bookable (Online)
Deutsch
English
Standard Seminars
Here is a compilation of my standard seminars. These seminars are only meant to give you a first orientation.
New
Contact Me
Modernes C++,

Comments
RSS feed for comments to this post