RICCILAB
> blog/cpp26
> CATEGORY

C++26

C++26 standard library and language experiments.

ENTRIES: 11

> ENTRIES

2026-04-20> C++26#01

Two Months, Twenty Stages

A closing retrospective on the annotation-reflective validator project — ten posts, twenty stages, one header-only library built macro-free on C++26 P2996 reflection + P3394 annotations.

_DEV_C++26
2026-04-20> C++26#02

One Declaration, Two Outputs

The repo freezes here. Regex fold, i18n, full policy-layer consteval are all mechanical refinements — none Stage-21 material. Library-ification waits on P2996 landing in mainline clang/gcc, and is a separate project on a separate timeline. What this repo 

_DEV_C++26
2026-04-20> C++26#03

Static Assert Reads the Error

 Lifting the Stage 18 validator into the compile-time phase with four probes and one 

_DEV_C++26
2026-04-20> C++26#04

From Stage to Library

The Stage 18 post closed with a list of five "plausibly-next" items. Migration of include/validator.hpp — still stuck at Stage 8's closed-set shape — was number five, tagged "mostly mechanical." That was eighty percent true: the dispatch really does collapse to one 

_DEV_C++26
2026-04-20> C++26#05

Annotation IS the Validator

Stage 17 closed by naming two things it left on the table: hardcoded Predicate messages, and a real protocol for user-defined validators. They turn out to be the same work. Once every annotation — 

_DEV_C++26
2026-04-19> C++26#06

One Refactor, Three Payoffs

One dispatch refactor resolves three different symptoms in the C++26 reflection validator. Split the walker into walk_members<T> and dispatch_value<Member, V>, let the ladder run against the value in hand at every level, and the annotation traverses through optional / vector / aggregate wrappers. Stage 13's optional<Scalar>+Range and Stage 14's vector<Scalar>+Range un-skip themselves, vector<optional<Aggregate>> composes without special cases, and two Predicate annotations on the same field — one over the container, one over the element — fire at the correct level because the requires-guard selects the scope.

_DEV_C++26
2026-04-18> C++26#07

Opening a Closed Annotation Set with Structural Lambdas

Closed-set annotation dispatch + one wrapper branch: Predicate<F>. Captureless lambda closures ride through [[=...]] as structural NTTPs, capturing ones don't, and textually identical lambdas at two sites don't fold the way Regex<N> did.

_DEV_C++26
2026-04-18> C++26#08

Validating Containers with C++26 Reflection

Three stages extending the aggregate-only recursion rule past std::optional and std::vector. Type-driven dispatch with a has_value() gate + NotNullopt{}, path_stack switched to variant<string, size_t> so indices render as [N] and stay structurally distinct from field names, and container-level MinSize / MaxSize annotations on top.

_DEV_C++26
2026-04-18> C++26#09

Caching Regex with C++26 Reflection

Four stages on caching std::regex from a reflected annotation. A Regex<N> annotation that sidesteps the NTTP-string-view rejection, the naive per-call rebuild cost, a function-local static map + mutex cache, and a template-parameter cache keyed on std:

_DEV_C++26
2026-04-18> C++26#10

A Declarative Validator in C++26 — No Macros, No Codegen

Eight stages from a one-field reflection smoke test to a header-only validator. [[=Range{0,150}]]-style annotations on fields, structured errors with dotted paths, three policy wrappers (throw / expected / vector), and one core-always-collects invariant with fail-fast living on the context. No macros, no codegen — the type is the schema.

_DEV_C++26
2026-04-18> C++26#11

Building clang-p2996 for C++26 Reflection — Three Things That Went Wrong

Building Bloomberg clang-p2996 from scratch on WSL2. Three things the README doesn't warn about — LLVM_ENABLE_RUNTIMES for libcxx (GCC's libstdc++ has no <meta>), the consteval-only rule that makes std:

_DEV_C++26