Companion Source Code for "Programming with C++20 - Concepts, Coroutines, Ranges, and more" 1. Edition
This repository contains runnable source code examples from the 1. edition of Programming with C++20 - Concepts, Coroutines, Ranges, and more, by Andreas Fertig.
The layout of the examples
The examples are separated into different directories based on how they appear in the book.
Running the examples
The examples are contained in a single
.cpp file that can be easily executed in any IDE. There is also an
CMakeLists.txt which can generate IDE projects or used to compile the example in a terminal. This repo contains a top-level
CMakeLists.txt which does build all the examples.
Building the examples
You can select the compiler by setting the
CXX environment variable.
mkdir programming-with-cpp20 cd programming-with-cpp20 git clone https://github.com/andreasfertig/programming-with-cpp20 mkdir build cd build cmake ../ cmake --build . -j
After that you find all the executables in
Some of these examples use the latest C++ standard, so you will need a modern compiler in order to compile them. The latest stable versions of GCC or Clang are recommended. The code is not tested, but expected to work, with MSVC as well.
The source code is released under the MIT License.