A member of the WG21 C++ standardisation committee, Andreas Fertig, has asked “how does C++ survive” following the disapproval of C++ 26 by the ISO National Bodies.
C++ will survive but there is now a question mark over C++ 26, which was already approved by the standardisation committee and for which approval by the national bodies is normally a formality; Fertig said that this is the “first time in the history of C++” that it has happened.
The reason for the disapproval is a particular feature: Contracts, a means of setting preconditions and postconditions on function declarations and adding assertion statements within functions. Although the idea behind Contracts is generally welcomed, there are disagreements about the implementation. Herb Sutter, chair of WG21 is an advocate for the C++ 26 implementation, while Bjarne Stroustrup, inventor of C++, is opposed. Stroustrup said that the feature is “adding complexity in very obscure ways … I worry about the complexity, I worry about whether we can use it correctly.”
Stroustrup faces obstacles standardising a feature he champions called Profiles, which like Contracts are intended to improve the safety of C++ code. Another C++ expert, Sean Baxter, argues that “after a decade of effort, Profiles failed to produce a specification, reliable implementation or any tangible benefit for C++ safety. The cause of this failure involves a number of mistaken premises at the core of its design.” The controversy around profiles resulted in the proposal being removed from C++ 26 though still possible for C++ 29.
The question is what happens next for C++ 26, which also includes significant features such as Reflection and Annotations. Fertig said that the next steps are “more than uncertain”; the next WG21 meeting is on November 16th and will try to resolve this. If the Contracts feature is removed, a further vote on C++ 26 would probably pass; but this would require the committee to abandon a feature it strongly supports. Another possibility, according to Fertig, is that C++ 26 will be cancelled, extending the life of C++ 23 as the latest version.
It is a problem for the standardisers and also for the trust within the community. Depending on your point of view, this is an example of tyranny of the minority, or that one cannot proceed without greater consensus. Discussion here and here shows that developers in general have reservations both about the implementation of Contracts and regarding the over-complexity of the C++ standard.