explaingit

anthonycalandra/modern-cpp-features

21,645Audience · developerComplexity · 1/5MaintainedLicenseSetup · easy

TLDR

A cheatsheet documenting new C++ language and library features added in C++11 through C++23, with code examples for each.

Mindmap

mindmap
  root((repo))
    What it covers
      Language features
      Library features
      C++11 to C++23
    Key concepts
      Move semantics
      Lambda expressions
      Coroutines
    Use cases
      Learning modern C++
      Feature lookup
      Migration guide
    Format
      Structured README
      Code examples
      Clear descriptions

Things people build with this

USE CASE 1

Look up how a specific modern C++ feature works when you encounter it in code.

USE CASE 2

Study and learn new language capabilities when upgrading from older C++ versions.

USE CASE 3

Quickly reference what features were added in each C++ standard release.

USE CASE 4

Understand move semantics, lambdas, coroutines, and other advanced concepts with examples.

Tech stack

C++11C++14C++17C++20C++23

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

This repository is a cheat sheet of language and library features introduced in modern versions of C++, specifically C++11, C++14, C++17, C++20, and C++23. C++ is one of the older and more widely used programming languages, and over the past decade the language committee has steadily added new syntax and standard-library tools that change how idiomatic C++ code looks. Following all of those changes by reading the formal standards is impractical for most people, so this project collects the highlights into one long, browsable page with short examples. The README is structured as nested checklists, one per standard version. For each version there is a list of "new language features" (things that change syntax, such as lambdas, move semantics, structured bindings, concepts, coroutines, three-way comparison, deducing this, and consteval if) and a list of "new library features" (additions to the C++ standard library, such as smart pointers, std::chrono, std::optional, std::variant, std::filesystem, std::span, std::expected, the stacktrace library, and many more). Each item links to a section further down where the feature is explained in a paragraph or two and shown with a code snippet. You would use it as a quick reference whenever you encounter unfamiliar syntax in someone else's C++ code, or when moving from an older standard to a newer one and want a single place to scan for what is now available without reading the standards document. The repository itself is just Markdown documentation, there is no compiled binary, no installation, and no runtime dependency; you read it on GitHub or clone it for offline browsing. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
Show me how to use move semantics in C++ with a practical example from the modern-cpp-features repo.
Prompt 2
Explain lambda expressions in C++11 and how they differ from traditional function pointers.
Prompt 3
What are coroutines in C++20 and how do I write one? Give me a simple example.
Prompt 4
I'm migrating from C++98 to C++17. What are the most important new features I should learn first?
Prompt 5
Compare the syntax and use cases of auto type deduction across C++11, C++14, and C++17.
Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.