Dispute over contracts puts this year's C++26 release at risk

The C++26 draft failed an ISO vote in October: nine national standards bodies voted against it and 13 voted in favor. As Mezha reports, citing The Register, a dispute over the proposed contracts feature has put the standard's expected release this year at risk.
The vote was the penultimate stage in approving the international standard, at which national standards bodies formally approve its technical details. The draft also received 12 abstentions and failed to meet ISO's requirement that negative votes make up no more than a quarter of the total. The failed vote does not in itself mean C++26 has been canceled, but further work on the standard will require a decision by the working group.
Reported by Mezha.
Contracts are a mechanism for recording preconditions, postconditions and assertions in code to check whether specified conditions are met. Such checks can help detect programming errors that might otherwise lead to undefined behavior. Design by contract has long been used, among other places, in the Ada and Eiffel languages, Mezha notes.
The idea of adding contracts to C++ has been under discussion for at least ten years. They were removed from C++20 over concerns about unsafe default settings, and a revised proposal, P2900, was included in the C++26 draft. Its substance has now again become a point of disagreement among the language's technical stewards.
C++ creator Bjarne Stroustrup is part of the group opposing contracts in their current form. In an article published in August, he and his colleagues called the implementation careless, outdated and insufficiently tested, and said it could be implemented more effectively as a library. They also believe that contracts and the P2900 extensions add complexity and redundancy; Stroustrup argued that tighter checks could undermine C++'s main advantage — performance.
Andreas Fertig, a member of the C++ standardization committee, expressed a different view. He said criticism of the proposal had already been considered and rejecting it at such a late stage harms the development of the language. Fertig also noted that the topic had been worked on for years and had repeatedly won a majority of votes; in his view, the vote shook an established system of collaboration.
The dispute comes amid criticism that it is too easy to create security vulnerabilities in C++; as a result, some projects are moving to Rust. At the same time, C++ Alliance CEO Harry Bott does not consider the debate destructive to the language itself. He called sending the draft back for further work not a failure, but a sign that the process is working, and urged people to learn from the situation and strengthen it.
Next week, the ISO C++ WG21 working group is due to meet in Búzios, Brazil. According to Mezha, possible steps include removing contracts from the C++26 specification, though this would require reversing library strengthening already introduced using them; moving the feature to a separate technical specification for further refinement; or making minor changes and holding another vote.
A failure at such a late stage of standardization is rare in C++ history. If the standard is not released this year, the new version may informally be called C++27. If it is released next year, its official name will be ISO/IEC 14882:2027; C++27, then, is not the name of an ISO standard, but an informal designation.