跪拜 Guibai
← All articles
Frontend · Backend · Programmer

Contracts Sink C++26: First Draft Rejected at Final Vote Since 1998

By 前端之虎陈随易 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

The rejection strands static reflection and the concurrent execution framework for at least another version cycle, and no compiler vendor can truthfully claim full C++26 support until the draft is reworked. For teams weighing a new codebase, the deadlock is a concrete point for Rust, which moves forward on no one's vote.

Summary

The C++26 international standard draft was voted down by member-state delegations on October 23, the first time a C++ standard has been rejected at the final DIS (Draft International Standard) step since 1998. The previous close call was the C++/CLI specification in 2006. The committee had already passed the technical draft in March 2026; the rejection came at the political layer, where delegations vote on the entire document as one package.

The flashpoint is Contracts, a feature under development since 2020 that adds preconditions and postconditions to function signatures — `pre(index < values.size())` before the body, `post(...)` for return values — checked at compile or runtime depending on flags. Contracts are not input validation, and the stricter the checks, the less room the compiler has to optimize; that built-in tension is why the proposal ballooned. Three committee members filed a paper called "Contract concerns" listing their objections.

The vote sends the whole draft back for revision. The std::execution concurrency framework, static reflection, and every uncontested fix travel with it. Two paths remain: revise the Contracts details and revote, or drop the feature entirely. Either way the C++26 timeline slips, no vendor can claim full C++26 support until a standard is finalized, and Rust keeps shipping versions without any such vote.

Takeaways
— The C++26 draft failed the final DIS vote on October 23, the first rejection at that stage since C++ was standardized in 1998; the only prior comparable case was the C++/CLI spec in 2006.
— The committee had already passed the full technical draft in March 2026, so the rejection happened at the member-state delegation vote, not the technical review.
— Contracts is the contested feature: it attaches preconditions and postconditions to function signatures, e.g. `pre(index < values.size())` or `post(result: result >= low && result <= high)`, with `contract_assert` available inside the body.
— Contracts are not input validation; callers still own checks on external data.
— The design tension is fundamental: stricter contract checking shrinks the compiler's optimization space, which is why the proposal required so many years of work.
— Three committee members formalized their opposition in a paper titled "Contract concerns".
— The entire draft is voted as one unit, so static reflection, the concurrent execution framework, and hundreds of uncontroversial changes are all delayed together.
— The two ways out are to revise the Contracts details and re-vote, or remove Contracts from the draft entirely.
— Compiler vendors keep shipping and existing code stays untouched, but no one can claim full C++26 support until a final standard exists.
— Reflection waits longer, and safety-oriented improvements are pushed back at least one version cycle; Rust advances without any intermediate vote.
Conclusions

The all-or-nothing vote structure means one contentious feature holds an entire release hostage; static reflection and the concurrency framework get delayed not on their own merits but by association.

Contracts spent five years in committee and passed the technical vote, so the rejection is a governance failure, not a design failure; the political layer overruled the people who actually built it.

The optimization-versus-safety tradeoff built into Contracts is why the feature is hard to get right: every check the compiler must honor narrows the transformations it can legally perform.

The timing is unlucky for C++; a formal delay in 'making C++ safer' lands exactly when Rust markets itself on safety and ships without any voting bottleneck.

Concepts & terms
Contracts (契约编程)
A C++ feature that lets developers declare preconditions and postconditions directly on function signatures, e.g. `pre(index < values.size())`, so the compiler can check them, log violations, or abort based on compile flags. It is a safety mechanism, not a substitute for validating untrusted input.
DIS (Draft International Standard)
The final approval vote in the ISO standardization process, where member-state delegations vote on the complete draft as one document. Passing it leads to publication; failing it sends the entire draft back for revision.
Static reflection
Compile-time inspection of a program's own types and structure, letting code generate or alter behavior based on that information without runtime cost. C++ has been waiting for a standardized form of it for over a decade.
From the discussion
Featured comments
小编

Honestly never imagined a single Contracts feature would drag down the entire draft.

前端之虎陈随易

Completely unexpected.

疯不皮 1 likes

Still don't understand why it's being opposed.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗