Annex B · Toolchain
What a C++ team installs
To earn a place here, a tool has to be maintained, say which C++ standards it supports, and be open source, free or open to a trial, with its price stated.
- Document
- Toolchain
- Annex
- B
- Tools
- 44, in 8 groups
- Updated
Compilers and standard libraries 5 tools
Whether a feature works depends on the compiler and its standard library together, so check both before you raise -std.
| Tool | What it is | Price | Platforms |
|---|---|---|---|
| GCC | The GNU compiler and its libstdc++. GCC 16 compiles C++20 by default and adds C++26 reflection and contracts; modules still need -fmodules. | Free, open source | Linux, macOS, Windows (MinGW-w64) |
| Clang | The LLVM project’s compiler and the base of clang-tidy, clangd and the sanitizers. It builds against libc++ or libstdc++; release 23 is current. | Free, open source | Linux, macOS, Windows |
| MSVC | Microsoft’s compiler, linker and STL, in Visual Studio or the standalone Build Tools, which need a Visual Studio license (Community counts). | Windows | |
| libc++ | LLVM’s standard library, the one Clang uses on macOS and FreeBSD. Its status pages list each C++20, C++23 and C++26 paper and the release that finished it. | Free, open source | macOS, Linux, Windows, FreeBSD, Android |
| Microsoft STL | MSVC’s standard library, developed in the open. Its changelog maps each change to a Visual Studio release, and /std:c++latest previews new features. | Free, open source | Windows |
Build systems and package managers 6 tools
| Tool | What it is | Price | Platforms |
|---|---|---|---|
| CMakeOur pick | Generates Ninja, Make, Xcode or Visual Studio builds from one CMakeLists.txt; CLion and Visual Studio open CMake projects directly. Release 4.4 is current. | Free, open source | Windows, macOS, Linux |
| Ninja | A small, low-level build tool that runs the builds CMake or Meson generate as fast as it can. Chrome, LLVM and parts of Android build with it. | Free, open source | Windows, macOS, Linux |
| Meson | An open-source build system that aims to be fast and easy to read, with support for GCC, Clang and Visual Studio on Linux, macOS and Windows. | Free, open source | Linux, macOS, Windows |
| Conan | The MIT-licensed C and C++ package manager, kept by a full-time team. ConanCenter holds about 2,000 recipes, and works with CMake, MSBuild and Meson. | Free, open source | Windows, macOS, Linux, FreeBSD |
| vcpkg | Microsoft’s C and C++ dependency manager, with about 2,900 open-source libraries. It ships in the MSVC Build Tools and works with Visual Studio and VS Code. | Free, open source | Windows, macOS, Linux |
| ccache | A compiler cache: it recognizes a compilation it has run before and returns the earlier result, so rebuilds and CI runs skip work. GCC, Clang and MSVC. | Free, open source | Linux, macOS, Windows |
IDEs and editors 5 tools
Editors that use clangd read compile_commands.json, which CMake writes when you configure with -DCMAKE_EXPORT_COMPILE_COMMANDS=.
| Tool | What it is | Price | Platforms |
|---|---|---|---|
| Visual Studio | Microsoft’s Windows IDE, with its debugger, CMake support and Unreal Engine tooling. Community is free for individuals, open source and up to five users. | Community free; Professional $45/month | Windows |
| CLionOur pick | JetBrains’ C and C++ IDE for CMake, Meson, Bazel and Makefile projects. Free for non-commercial use, which sends anonymous usage data; companies pay. | Free non-commercial; from $109/year | Windows, macOS, Linux |
| Visual Studio Code | Microsoft’s open-source editor. The C/C++ extension adds IntelliSense and debugging over GDB, LLDB or the MSVC debugger; you bring the compiler. | Free | Windows, macOS, Linux |
| clangd | The LLVM language server: completion, compile errors and go-to-definition in VS Code, Neovim, Emacs, Sublime Text or any other editor with an LSP client. | Free, open source | |
| Qt Creator | The Qt Company’s cross-platform IDE, for Qt and for plain CMake projects, with embedded targets. The IDE is the same under every Qt license. | Free, open source | Windows, macOS, Linux |
Debuggers and profilers 6 tools
Profile a release build with debug info (-O2 -g): the hot spots of a debug build are not the ones you ship.
| Tool | What it is | Price | Platforms |
|---|---|---|---|
| GDB | The GNU debugger for C, C++, Rust, Go, Fortran and more: native, remote through gdbserver, or on a simulator. GDB 18.1 is current. | Free, open source | Linux, macOS, Windows |
| LLDB | LLVM’s debugger and the default in Xcode, using Clang’s parser to evaluate expressions. Supported on macOS, Linux and FreeBSD; Windows is still in development. | Free, open source | macOS, Linux, FreeBSD, Windows |
| rr | Records a failing run once, then replays it identically under GDB, with reverse-continue back to the write that broke it. Linux on modern x86 or some ARM. | Free, open source | Linux |
| perf | The Linux kernel’s profiler: perf record samples call stacks with hardware counters, and perf report and perf annotate show where the cycles went. | Free, open source | Linux |
| Tracy Profiler | A frame and sampling profiler with nanosecond timing, made for games and other apps. It tracks zones, locks, memory allocations, context switches and GPU work. | Free, open source | |
| Superluminal | A sampling CPU profiler that needs no code changes and lays every thread out on a timeline. Licensed per seat, with a 14-day trial of every feature. | Personal €59 once; Business €289/year | Windows, Linux, Xbox, PlayStation |
Analyzers, sanitizers and fuzzers 6 tools
Static analyzers read the code and sanitizers watch it run, so each catches bugs the other misses.
| Tool | What it is | Price | Platforms |
|---|---|---|---|
| AddressSanitizerOur pick | Add -fsanitize=address in Clang or GCC to catch out-of-bounds access, use-after-free and double frees at about twice the run time. UBSan and TSan work alike. | Free, open source | Linux, macOS, Windows, Android, BSDs |
| clang-tidy | Clang’s linter, with check groups such as bugprone, modernize, performance and cppcoreguidelines. Many checks rewrite the code for you with -fix. | Free, open source | |
| Cppcheck | A static analyzer aimed at undefined behavior and dangerous constructs, with very few false positives as its stated goal. Reads non-standard embedded code. | Free, open source | Windows, Linux, macOS |
| Valgrind | A framework of seven tools: a memory error detector, two thread error detectors, cache and call-graph profilers and two heap profilers. 3.28 is current. | Free, open source | Linux, FreeBSD, Android, Solaris |
| AFL++ | A coverage-guided fuzzer that carries on from AFL, which stopped in 2017, with compiler and binary-only instrumentation and corpus minimization tools. | Free, open source | |
| SonarQube Cloud | Hosted static analysis with C and C++ support through C++23, free for open-source projects and for private code up to 50k lines on the main branch. | Free to 50k lines; Team from $34/month |
Testing and benchmarking libraries 5 tools
A benchmark result means little without the code and the compiler that produced it, so keep all three together.
| Tool | What it is | Price |
|---|---|---|
| GoogleTest | Google’s C++ test framework, with GoogleMock for mocks in the same repository. Release 1.18 needs C++17 and builds with CMake or Bazel. | Free, open source |
| Catch2 | A test framework with plain assertions such as REQUIRE(a == b), sections for shared setup and basic micro-benchmarks. Version 3 is compiled, not single-header. | Free, open source |
| doctest | A single-header test framework built to keep the cost of including it, and of writing many asserts, low on compile times. Supports C++11 through C++23. | Free, open source |
| Google Benchmark | Google’s microbenchmark library: register a function, give it argument ranges and read the time per iteration. It needs C++17 to build and links from CMake. | Free, open source |
| nanobench | A single-header microbenchmark library for C++11 to C++20: define ANKERL_NANOBENCH_IMPLEMENT in one file, include nanobench.h and time a lambda. | Free, open source |
Online tools and references 5 tools
| Tool | What it is | Price |
|---|---|---|
| Compiler ExplorerOur pick | Write code in the browser, see the assembly from many compilers and versions side by side, run it and share a short link. Funded by donors and sponsors. | Free |
| cppreference.com | The community reference for the C++ language and library, with each feature marked by the standard that added it, and compiler support pages to C++26. | Free |
| C++ Insights | Andreas Fertig’s tool that shows what the compiler makes of your code: implicit casts, object lifetimes, lambdas as classes. C++98 through C++2c. | Free |
| C++ Core Guidelines | Rules for using modern C++ well, edited by Bjarne Stroustrup and Herb Sutter. clang-tidy’s cppcoreguidelines checks enforce part of them. | Free |
| eel.is C++ draft | The current working draft of the C++ standard as linked HTML, generated from the committee’s LaTeX sources. Not an ISO publication, as the page says. | Free |
Books and courses 6 tools
Each entry names the standard it was written for, so you know how much has changed since.
| Tool | What it is | Price |
|---|---|---|
| A Tour of C++, Third EditionOur pick | Bjarne Stroustrup’s overview of ISO C++20, with some library parts not due until C++23. Addison-Wesley, 2022, in print, as an eBook or both. | Book $39.99; eBook $37.99 |
| C++ Move Semantics - The Complete Guide | Nicolai Josuttis on rvalue references, std::move, perfect forwarding and noexcept, through C++20. PDF and EPUB on Leanpub, and in print. | From $9.90; suggested $19.90 |
| C++ Concurrency in Action, Second Edition | Anthony Williams on threads, atomics, the memory model and lock-free data structures, written for C++17. Manning, 2019; print includes the eBook. | eBook $74.99; print + eBook $79.99 |
| Professional C++, Sixth Edition | Marc Gregoire’s 1,376-page guide to the language and the standard library as of C++23. Wiley, 2024, in paperback and as an eBook. | eBook $59; paperback $74 |
| LearnCpp.com | A free tutorial course in C++ from the first program through classes, templates and smart pointers, with an appendix on C++23. Suits newcomers to C++. | Free |
| Pluralsight C++ path | 13 video courses, about 44 hours, mostly by Kate Gregory and Giovanni Dicanio, from first steps to legacy code, testing and mocking. Written for C++14 and 17. | Core Tech $45/month or $449/year |