Skip to main content

C++ Knowledge Base

A structured reference for modern C++ (C++17/20/23): from the toolchain that turns text into a binary, through the language and standard library, down to the memory model, ABI, and the tools you use to debug and profile. Pages favour why it behaves this way over syntax dumps, and link to each other instead of repeating themselves.

How this is organised

Three loose tiers: the foundation (Overview, Toolchain, Language Fundamentals), the language and library you write every day (Types through Standard Library), and the systems-level and tooling layers (Error Handling through Debugging). Each folder is a self-contained topic; follow the cross-links between them.

Sections

SectionWhat it covers
OverviewWhat C++ is, its philosophy, and the standard versions
Toolchain & BuildPreprocess → compile → assemble → link, and the build tools around it
Language FundamentalsSyntax, expressions, operators, control flow
Types & ValuesFundamental types, conversions, cv-qualifiers, value categories, type deduction
Functions & Call MechanicsOverloading, default args, inline, constexpr, noexcept, calling conventions
Memory & Object LifetimeStorage duration, initialization, new/delete, lifetime, aliasing
Pointers, References & Smart PointersRaw vs smart pointers, unique_ptr, shared_ptr, weak_ptr
Classes & OOPConstruction, copy/move, inheritance, polymorphism, layout
Templates & MetaprogrammingTemplates, deduction, SFINAE, concepts, traits, variadics
Standard LibraryContainers, iterators, algorithms, ranges, strings, chrono, filesystem
Error Handling & SafetyExceptions, the strong guarantee, error codes, assertions, contracts, UB
Concurrency & Memory ModelThe memory model, atomics, threads, mutexes, futures, pools
Low-Level & PlatformABI, object layout, padding, endianness, volatile, C interop
Idioms & DesignRAII, PIMPL, CRTP, non-copyable, copy-and-swap, type erasure, policies
Debugging & ProfilingGDB, core dumps, sanitizers, Valgrind, perf, reading assembly

Suggested reading paths

Conventions used across these docs
  • Code blocks compile against C++17 or later; version-specific features are tagged inline (e.g. (C++20)).
  • Admonitions flag the important bits: info for context, tip for guidance, warning/danger for foot-guns.
  • Diagrams are Mermaid; data tables prefer plain words over decorative symbols.