// toolset / matrix

C++26 compiler support

Per-feature, per-compiler support for C++26 reflection and adjacent papers. Cells in the per-example groups link to runnable Compiler Explorer URLs we re-verify on every publish.

Reading the matrix. The first table is paper-level feature status across compilers we test. The remaining tables are per-post: each row is one example file from a wro.cpp post, each cell is a runnable Compiler Explorer link under that compiler. Green cells compile and run cleanly today; greyed-out cells were not attempted yet under that compiler.

Compilers we track. clang-p2996 = the Bloomberg fork (the C++26 reflection reference implementation), invoked with -std=c++26 -freflection-latest -stdlib=libc++. GCC 16.1 = mainline GCC 16.1 (released April 2026), invoked with -std=c++26 -freflection. MSVC and EDG are listed in the paper-level table for reference but we do not yet run examples against them.

Standard features (paper-level)

Example / feature clang-p2996GCC 16.1
P2996 — Reflection GCC 16.1 ships <meta>; clang-p2996 ships <experimental/meta> (alias for <meta>). worksworks
P3394 — Annotations for reflection GCC 16.1 spells the query `annotations_of_with_type`; clang-p2996 spells it `annotation_of_type`. Source-level divergence. workspartial
P3096 — Function parameter reflection Both compilers expose parameter info via parameters_of(). worksworks
P1306 — Expansion statements (`template for`) First-class `template for` shipped with the reflection cluster. worksworks
P3560 — Reflection error handling Standardised exception type for failed reflection queries. worksworks
P2900 — Contracts Politically hot. Brno (June 2026) and Helsinki (November 2026) likely to refine. No production use. experimentalexperimental
P2300 — std::execution (senders/receivers) Reference impl is libstdexec; mainline standard-library support still landing. partialpartial

why-cpp26-reflection-matters

Example / feature clang-p2996GCC 16.1
40-line JSON serializer with reflection worksworks
Peel-first variant — first iteration hoisted to compile time worksworks
Annotated serializer — rename, skip, skip-if-empty, rename_all worksuntested
One reflection walk, three formats: JSON · YAML · XML worksuntested

first-reflection

Example / feature clang-p2996GCC 16.1
Describe worksworks

splicing

Example / feature clang-p2996GCC 16.1
Splice basics worksuntested

template-for-expansion-statements

Example / feature clang-p2996GCC 16.1
Dump worksuntested

enum-to-string

Example / feature clang-p2996GCC 16.1
Renum untestedworks

auto-formatter

Example / feature clang-p2996GCC 16.1
Formatter untestedworks
Formatter custom worksuntested
Formatter enum worksuntested
Formatter optional worksuntested
Formatter skip worksuntested

derive-eq-hash

Example / feature clang-p2996GCC 16.1
Hash demo untestedworks

json-naive

Example / feature clang-p2996GCC 16.1
Rjson untestedworks

json-deserialize

Example / feature clang-p2996GCC 16.1
From values untestedworks

dependency-injection

Example / feature clang-p2996GCC 16.1
Di demo untestedworks

auto-mocks

Example / feature clang-p2996GCC 16.1
Mock demo untestedworks

define-aggregate

Example / feature clang-p2996GCC 16.1
Pick untestedworks

cross-language-comparison

Example / feature clang-p2996GCC 16.1
Main untestedworks

reflect-arbitrary

Example / feature clang-p2996GCC 16.1
Arbitrary untestedworks

reflect-optics

Example / feature clang-p2996GCC 16.1
Optics untestedworks

reflect-dx

Example / feature clang-p2996GCC 16.1
Natvis emit untestedworks

reflect-soa

Example / feature clang-p2996GCC 16.1
Soa untestedworks

gcc-16-hands-on

Example / feature clang-p2996GCC 16.1
GCC 16.1 reflection hands-on worksworks

vector-consteval-or-constexpr

Example / feature clang-p2996GCC 16.1
Promote a consteval vector to a constexpr span worksworks

sanitizers-2026

Example / feature clang-p2996GCC 16.1
Reflection-driven binary parser at trust boundary worksuntested

profiling-cpp-2026

Example / feature clang-p2996GCC 16.1
Auto-trace every annotated method (clang-p2996) worksuntested

memory-safety-cpp26-and-beyond

Example / feature clang-p2996GCC 16.1
Reflection-driven basic safety profile (clang-p2996) worksuntested
cppfront -- safety by default (executes via godbolt CMake tree) worksuntested

testing-for-safety-2026

Example / feature clang-p2996GCC 16.1
arbitrary<T> + round-trip property tests (clang-p2996) worksuntested
pretty_diff field-level test diagnostics (clang-p2996) worksuntested

annotations

Example / feature clang-p2996GCC 16.1
Annotated worksuntested

one-codegen-many-formats

Example / feature clang-p2996GCC 16.1
Formats demo worksuntested

clap-for-cpp

Example / feature clang-p2996GCC 16.1
Cli demo worksuntested
Cli bitflag worksuntested
Cli type axis worksuntested

tiny-orm

Example / feature clang-p2996GCC 16.1
Sql gen worksuntested

Methodology

Per-example cells are auto-derived from scripts/shorten-examples.py runs against the godbolt API. Each successful site build reflects the latest verified state; the "last regenerated" date in the badge above is the modification time of src/data/godbolt-permalinks.yml .

Paper-level cells in the top table are hand-curated from src/data/compatibility-features.yml and refreshed quarterly (or on major compiler releases). When a new ISO C++ paper ships across compilers, it lands here first, then radiates into the per-example tables once a wro.cpp post covers it.

See also: how we test, in general.