MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20

github.com/andreasfertig/programming-with-cpp20 @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,029 symbols 1,453 edges 206 files 64 documented · 6% updated 22mo ago★ 2474 open issues

Browse by type

Functions 806 Types & classes 223
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Companion Source Code for "Programming with C++20 - Concepts, Coroutines, Ranges, and more" 2. Edition

Build Status License

Book cover

Code examples

This repository contains runnable source code examples from the 2. 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 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 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.

Core symbols most depended-on inside this repo

Shape

Function 418
Method 388
Class 209
Enum 14

Languages

C++100%

Modules by API surface

02.25-coroutineParsingDataStreamCustomAllocator1/main.cpp40 symbols
02.24-coroutineParsingDataStreamCustomAllocator0/main.cpp38 symbols
02.27-coroutineParsingDataStreamException0/main.cpp36 symbols
02.10-coroutineParsingDataStream0/main.cpp34 symbols
02.18-coroutineParsingDataStream1/main.cpp33 symbols
02.04-coroutineLimitlessSequence0/main.cpp22 symbols
01.33-optional6/main.cpp16 symbols
01.32-optional5/main.cpp14 symbols
12.19-constevalParmCheck1/main.cpp13 symbols
06.06-orderingComparisonString0/main.cpp13 symbols
01.29-optional4/main.cpp13 symbols
05.17-stdFmtStockIndexCustomFormatter2/main.cpp12 symbols

For agents

$ claude mcp add programming-with-cpp20 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page