04 / Guides

Modern C++ Recovery Guide

Modern C++ Recovery Guide

A quick, practical wiki for someone who learned C++ around 2008 and wants to recover quickly into modern C++17/20.

How to Use This Wiki

Go through the pages in order. Do not try to memorize everything. For each topic, aim to understand:

  1. What problem does this solve?
  2. What does modern C++ prefer?
  3. What are the common failure modes?
  4. Can I write a tiny example from memory?

Phase 1 — Rebuild the Core

  1. Mental Model: Modern C++
  2. Compilation, Linking, and Project Shape
  3. Object Lifetime, Stack, Heap, and RAII
  4. Ownership, Raw Pointers, and Smart Pointers
  5. Value Semantics and Rule of 0/3/5

Phase 2 — Modern Language Features

  1. Move Semantics
  2. Const, References, and Parameter Passing
  3. STL Containers and Algorithms
  4. Modern Syntax: auto, Lambdas, enum class, constexpr
  5. Optional, Variant, String View, Span, Filesystem, Chrono
  6. Templates and Generic Programming

Phase 3 — Serious C++

  1. Error Handling and Exception Safety
  2. Concurrency: Threads, Mutexes, Atomics
  3. Undefined Behavior and Memory Safety
  4. Performance Fundamentals
  5. Tooling: CMake, Debuggers, Sanitizers, Testing

Phase 4 — Pick a Domain

  1. Domain Tracks
  2. Project Ideas
  3. Quick Checklist
  4. Grounding and References

Fastest Practical Plan

If you want a 30-day sprint:

  • Week 1: RAII, ownership, smart pointers, value semantics.
  • Week 2: move semantics, STL, lambdas, modern syntax.
  • Week 3: CMake, debugging, sanitizers, tests, concurrency basics.
  • Week 4: build one serious project.

Default Target Stack

If you do not know where to start, aim for:

C++17/20 + Linux + CMake + gdb/lldb + sanitizers + GoogleTest/Catch2 + Python for automation.

That combination gives you a durable technical foundation and keeps you productive.

Grounding

This is a quick recovery guide, not a substitute for the standard or a full textbook. For authoritative references and version notes, see Grounding and References.

2 min read

01 — Modern C++ Mental Model

Modern C++ is not “C with classes.” It is a language for building efficient systems using explicit ownership, deterministic cleanup, value semantics, and z

2 min read

02 — Compilation, Linking, and Project Shape

C++ is usually built in separate translation units. Understanding the build process saves hours of confusion.

2 min read

03 — Object Lifetime, Stack, Heap, and RAII

C++ is a lifetime language. To write good C++, you must know when objects are created, when they are destroyed, and who owns resources.

2 min read

04 — Ownership, Raw Pointers, and Smart Pointers

Modern C++ code should make ownership obvious.

2 min read

05 — Value Semantics and Rule of 0/3/5

Modern C++ prefers types that behave like values. A good type can be copied, moved, stored in containers, returned from functions, and destroyed safely.

2 min read

06 — Move Semantics

Move semantics let C++ transfer resources instead of copying them.

2 min read

07 — Const, References, and Parameter Passing

Function signatures should communicate ownership, mutation, and optionality.

2 min read

08 — STL Containers and Algorithms

The standard library is the default toolbox. Modern C++ code should use containers and algorithms instead of manual memory and hand-written loops everywher

2 min read

09 — Modern Syntax: auto, Lambdas, enum class, constexpr

Use `auto` when the type is obvious or verbose.

2 min read

10 — Modern Library Types

Use when a value may or may not exist.

2 min read

11 — Templates and Generic Programming

Templates let you write code that works with many types while still being compiled into efficient type-specific code.

2 min read

12 — Error Handling and Exception Safety

C++ has multiple error handling styles. The right one depends on the domain.

2 min read

13 — Concurrency: Threads, Mutexes, Atomics

Concurrent code lets multiple things happen at once, but introduces data races, deadlocks, ordering issues, and debugging pain.

2 min read

14 — Undefined Behavior and Memory Safety

Undefined behavior means the C++ standard places no requirements on what happens. The program may appear to work, crash, corrupt data, or become vulnerable

2 min read

15 — Performance Fundamentals

C++ gives you control over performance, but you must measure. Guessing is unreliable.

2 min read

16 — Tooling: CMake, Debuggers, Sanitizers, Testing

Modern C++ skill includes tooling. Real C++ work is not just language syntax.

2 min read

17 — Domain Tracks

C++ becomes most valuable when attached to a serious domain. Do not learn endless syntax in isolation.

2 min read

18 — Project Ideas

A serious project beats passive study. Pick one project that forces you to use modern C++ features, tooling, debugging, and domain concepts.

2 min read

19 — Quick Checklist

Use this as a fast self-assessment.

2 min read

20 — Grounding and References

Authoritative references used to ground the Modern C++ Recovery Guide.

00 / The Agent

The chat box that lives on the blog.

running on Cloudflare · free tier

A tiny JS island posting to a Cloudflare Worker that streams answers from a free Nemotron endpoint. No origin server. No database. The static site stays static — this one box is the only thing that breathes.