Skip to content
Projects

About

Cppuccino is a compact C++ tutorial and reference repository covering modern C++ features, value categories, references, and move semantics. Includes hands-on examples and clear explanations for real-world development.

Learning & Education

How these counts are measured

What you can do

  • std-print: Type-safe formatted output
  • deducing-this: C++23 explicit object parameter
  • zip-range: Parallel iteration
  • generator-pipeline: Lazy std::generator pipelines with early-exit propagation

Measured star growth

in 24h
Collecting history
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

Cppuccino banner Cppuccino banner

One C++ idea, in two languages, with runnable proof.

English · 中文

Build status Documentation checks Pages deployment MIT license

Documentation · Failure Atlas · Arcade · UB Camp · Labs · Actions · Contributing · MIT

Cppuccino Arcade: choose a stage, enter the UB Training Camp, or return to Read Mode

Read an idea. Break it. Repair it. Prove it.

Start with Undefined Behavior · Open the Arcade · Fight the Dangling Pointer

Quick Stats

Counts are recomputed by tools/check_stats.py, so they stay in step with the repository.

Category Count
Documentation 142 articles (71 en + 71 zh)
Pitfalls 74 articles (37 en + 37 zh)
Examples 161 runnable examples
Projects 151 projects across 43 stages
Tests 975 (all passing)

Start Here

One cycle at a time: read an idea, inspect how it fails, then change code. If this is your first visit, use this order:

  1. Read the Roadmap Overview.
  2. Pick one topic track from the concept docs.
  3. Read one related pitfall article.
  4. Finish by touching code in an example or project.

Want the shortest path through failure modes? The UB Training Camp runs four bosses in order: lifetime → containers → concurrency → ownership. Each stop is read → reproduce → repair → prove. The final Proof Gate asks three questions per boss; only a 3/3 pass stamps the proof and completes the camp.

No toolchain at hand? Open the repo in GitHub Codespaces. The devcontainer ships GCC 15, clang, CMake and Python; run tools/run_all_checks.sh inside it.

The published site is at polarours.github.io/Cppuccino.

Suggested Entry Points

Roadmap Overview

The Mastery Roadmap is a staged path through the material — an index, not a syllabus to finish.

Stages Theme Projects
1–7 C++ Foundations to Advanced 35
8–27 Design Patterns (GoF 23 + Specification) 61
28–31 Architecture Patterns 12
32–33 Concurrency Patterns 7
34 C++ Specific Patterns (CRTP, SFINAE, Variadic) 4
35 Memory Patterns 4
36 Modern C++ (Coroutines, Ranges, Concepts) 3
37 Error Handling Patterns 4
38 Testing Patterns 4
39 Content Enhancement (Parser / Diff Tools) 3
40 C++23 Features 4
41 Capstone (HTTP Framework, Router, Template Engine) 3
42 Performance Patterns 3
43 Toolchain Patterns (CMake, CI/CD, Package Manager) 3

Repository Map

Four kinds of material, cross-linked so an idea can be read, tested, and then used.

Documentation

Tooling

See tools/README.md for what each check does and why, and CHANGELOG.md for the short list of notable changes.

tools/run_all_checks.sh          # documentation checks
tools/run_all_checks.sh --full   # and every project build

Examples

  • examples, indexed in examples/README.md: 161 runnable code samples covering:
    • Core concepts: ownership, move semantics, smart pointers, RAII
    • Modern C++: lambda, constexpr, structured bindings, ranges
    • C++20: concepts, ranges, span, format, coroutines
    • C++23: fold expressions, CRTP, SFINAE, type traits
    • Pitfall reproductions: one runnable example for every pitfall article

Projects

Beginner · Stage 1

Stage 1: Beginner

Intermediate · Stage 2

Stage 2: Intermediate

Advanced · Stage 3

Stage 3: Advanced

  • thread-pool: Thread pool with futures and synchronization
  • allocator: Fixed-block memory allocator with STL interface
  • json-parser: Recursive descent JSON parser
  • http-parser: HTTP request/response parser
  • smart-pointer: Custom smart pointer implementation
  • event-loop: Event loop with priority queue for timers
  • static-init-demo: Static initialization order fiasco and the fix
  • skip-list: Probabilistic ordered set with randomized levels
  • csv-parser: RFC-4180 quoting rules with roundtrip formatting
  • base64-codec: RFC 4648 encode/decode with strict padding validation
More practice · Stages 4–7

Stages 4–7: More Practice

Design patterns · Stages 8–27

Stages 8–27: Design Patterns

  • GoF 23 patterns: All 23 Gang-of-Four patterns + Specification
  • Command pattern variants: command-history, command-logger, command-memento, command-router, command-snapshot, command-translator, command-validator
  • Observer pattern variants: observer-bus, observer-buffer, observer-debouncer, observer-filter-chain, observer-mediator, observer-subscription, observer-throttler
  • Strategy pattern variants: strategy-adapter, strategy-chain, strategy-combinator, strategy-decorator, strategy-evaluator, strategy-factory, strategy-pipeline, strategy-resolver
  • rate-limiter: Token bucket, fixed window, and sliding window algorithms
Architecture · Stages 28–31

Stages 28–31: Architecture Patterns

Concurrency · Stages 32–33

Stages 32–33: Concurrency Patterns

Idioms, memory, modern C++ · Stages 34–38

Stages 34–38: C++, Memory, Modern C++, Error, Testing

Content tools · Stage 39

Stage 39: Content Enhancement

  • markdown-parser: Block-level markdown parsing with inline link extraction
  • link-checker: Relative link validation with lexical path normalization
  • text-diff: LCS line diff with unified-style rendering
C++23 · Stage 40

Stage 40: C++23 Features

Capstone · Stage 41

Stage 41: Capstone Project

Performance · Stage 42

Stage 42: Performance Patterns

Toolchain · Stage 43

Stage 43: Toolchain Patterns

Other

  • tinyshell: Unix shell with job control, signal handling, and variable expansion

How To Use This Repo

  • Read by topic if you want a concise explanation of one C++ idea.
  • Read by roadmap if you want a more structured learning path.
  • Use the pitfalls folder as a review checklist when writing or reviewing code.
  • Jump between docs and examples when you want the semantic explanation and the code sample together.
  • Build the projects to practice applying concepts in real code.

Building Projects

Most projects use CMake. To build and test any project:

cd cpp-mastery-roadmap/<stage>/<project>
cmake -S . -B build -DBUILD_TESTING=ON
cmake --build build
ctest --test-dir build --output-on-failure

Some projects require C++20 or C++23 — check the CMakeLists.txt for CMAKE_CXX_STANDARD.

Project Philosophy

  • One document should focus on one central idea.
  • Content should stay concise, technically grounded, and reviewable.
  • Explanation matters more than prescription.
  • Ownership, lifetime, semantics, and tradeoffs matter more than folklore.

Contributing

See CONTRIBUTING.md.

Technical corrections, simplifications, better examples, and thoughtful counterexamples are especially useful contributions.

Community

Explore related projects

Loading…