https://github.com/andreasfertig/programming-with-cpp20
Companion source code for "Programming with C++20 - Concepts, Coroutines, Ranges, and more"
https://github.com/andreasfertig/programming-with-cpp20
concepts coroutines cpp cpp20 ranges
Last synced: 15 days ago
JSON representation
Companion source code for "Programming with C++20 - Concepts, Coroutines, Ranges, and more"
- Host: GitHub
- URL: https://github.com/andreasfertig/programming-with-cpp20
- Owner: andreasfertig
- License: mit
- Created: 2021-03-25T17:40:05.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T16:15:54.000Z (8 months ago)
- Last Synced: 2025-03-31T04:06:23.404Z (22 days ago)
- Topics: concepts, coroutines, cpp, cpp20, ranges
- Language: C++
- Homepage:
- Size: 313 KB
- Stars: 227
- Watchers: 15
- Forks: 67
- Open Issues: 5
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Companion Source Code for "Programming with C++20 - Concepts, Coroutines, Ranges, and more" 2. Edition
[](https://github.com/andreasfertig/programming-with-cpp20/actions/) [](/LICENSE.txt)

## Code examples
This repository contains runnable source code examples from the 2. edition of [Programming with C++20 - Concepts, Coroutines, Ranges, and more](https://andreasfertig.com/books/programming-with-cpp20/), by [Andreas Fertig](https://andreasfertig.com).
### 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 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 be 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 `programming-with-cpp20/build/bin`.
Some examples use the latest C++ standard, so you will need a modern compiler to compile them. The latest stable versions of GCC or [Clang](https://releases.llvm.org/) are recommended. The code is not tested but is also expected to work with MSVC.
## License
The source code is released under the [MIT License](/LICENSE.txt).