r/cpp • WG21 Member • Oct 24 '26

Balloting has completed for C++26. Unfortunately it was Disapproved

https://www.linkedin.com/posts/robertseacord_balloting-has-completed-for-c26-unfortunately-share-7519795139859517440-AOth/

Since the C++26 DIS has been disapproved, the next step is going to be taken in Buzios during the 2026-11 meeting. The committee will have to decide what changes to make (if any) and submit an FDIS (Final Draft of International Standard) for Balloting.

292 Upvotes

399 comments sorted by

View all comments

84

u/frayien Oct 24 '26

Could someone knowledgeable explain us what it means, and why is it important ?

175

u/daveedvdv EDG front end dev, WG21 DG Oct 24 '26 • Regret

WG21 (the committee of C++ experts) submitted a "draft international standard" (DIS) as a candidate for the next C++ standard. That draft was sent for voting by "national bodies" (NBs), which are national standards organizations like Germany's DIN and Iran's INSO. I was told 13 NBs voted in favor, 9 against, and 12 abstained... that's nowhere near consensus (for reference, there was never even one vote "against" C++ drafts in the past).

We now get a chance to review our draft to produce a final DIS (FDIS). That will be balloted again and if it passed it will become the next standard. Otherwise, the project fails (and I don't remember what happens then).

Next month, we're meeting in Búzios, Brazil. Given this situation, we'll most likely discuss how to change our draft to improve NB-level consensus. I believe all 9 votes "against" are due to the "contracts" feature. So presumably we'll change that.

My recommendation will be to remove contracts from the draft, with adjustments to keep library hardening (which is currently worded in terms of the contracts infrastructure, but it doesn't have to be). And then move on with our lives (and work on the next standard after what I hope will be C++27).

49

u/frayien Oct 24 '26

Sounds like some people REALLY dislike contracts... The library hardening proposals where worded as to work whereas contracts where in or not, so I don't think there is much issues here other than editorial wording.

18

u/PossibilityUsual6262 Oct 24 '26

The only thing which i heard about them ao far, is that there no proof of concept for implementation of contracts because they flawed.

And looking at higher level politics of it, i believe in that.

Is this correct?

62

u/Dragdu Oct 24 '26

Are you sure you aren't mixing up contracts and profiles? Because contracts have multiple implementations, and you could test PoC through the last year+ on CE. Meanwhile profiles are paper design that is known to not work.

23

u/frayien Oct 24 '26

I dont know much. It is the kind of things I heard.

At least gcc 16 claims to fully implement them so I dont think implementation is an issue. https://gcc.gnu.org/projects/cxx-status.html#cxx26

What I understood is that what we got in C++26 is a minimal working form of contracts to get them approved, and that they will receive improvements later as we get more feedback on actual usage (which sounds legit to me). Then again I am nowhere near knowledgeable enough with the matter to be taken seriously.

26

u/JVApen Clever is an insult, not a compliment. - T. Winters Oct 25 '26

There is a lot of misinformation about contracts. In the mailing the following paper was submitted as an answer: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4433r0.pdf

17

u/13steinj Oct 26 '26

There's also misinformation, or at best, disingenuous claims, in this paper.

4

u/processeus1 Oct 29 '26

Which ones?

23

u/Sinomsinom Oct 24 '26 edited Oct 24 '26

Like dragdu said, I think you are mixing up profiles and contracts.

Profiles were the main controversial proposal during the C++26 cycle, and ultimately didn't end up making it in because of some of the issues, but are still targeting C++29 now.

For Contracts there has been some amount of pushback to it. But while for profiles the big question was are profiles even a good idea in the first place and how much of what the proposal promises cna actually implemented in practice, for contracts most of the pushback was either wording choices, syntax choices or how to implement them specifically. I don't think there was any serious "we shouldn't have contracts at all" pushpack like there was for profiles

12

u/smdowney WG21, Text/Unicode SG, optional<T&> Oct 24 '26

C++29, I think you mean, instead of 27?

Profiles are definitely not going to be ready for next year.

The number of bugs around the maybe-uninitialized warning also suggest they are not going to be ready anytime soon, since that bit of analysis keeps getting cited as prior art. Retro-fitting dynamic analysis at compile time is hard.

5

u/Sinomsinom Oct 24 '26

Yup sorry saw someone else accidentally write C++27 instead of C++29 before and guess I then somehow ended up mistyping it as well

9

u/13steinj Oct 25 '26

I think the implication is 26 might actually come out as 27 (without contracts) and the next one will probably be 30

9

u/c0r3ntin Oct 24 '26

s/hard/impossible

→ More replies (1)
→ More replies (5)

18

u/jonathanhiggs Oct 24 '26

Why are they so against contracts?

57

u/daveedvdv EDG front end dev, WG21 DG Oct 24 '26

They think they are poorly designed. (So do I, but I've mostly stayed out of the discussions, at first because my time was monopolized by the reflection work, and later because I didn't want to deal with the acrimony and endless repetition of arguments.)

16

u/Sixo Oct 24 '26

You made a good bet, at least from where I'm sitting. The reflection stuff is some of the coolest and most interesting stuff there is, and I've been having a lot of fun playing with the scraps of it that have trickled down. Concepts are good, and I'll be glad to have them in whatever form they come in, but they're not reflection.

3

u/moneyl3 Oct 26 '26

Wait. Aren't contracts already part of C++26? I though C++26 was already final.

→ More replies (79)

8

u/JVApen Clever is an insult, not a compliment. - T. Winters Oct 25 '26

You might want to read https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4433r0.pdf a paper for the next meeting

11

u/Kunzite_128 Oct 26 '26

Isn't that basically saying "we (WG21) have already made our decision, and removing contracts is too complicated anyway"?

4

u/JVApen Clever is an insult, not a compliment. - T. Winters Oct 26 '26

In some sense: yes

→ More replies (1)

0

u/[deleted] Oct 24 '26

[deleted] — view deleted comment

12

u/way2lazy2care Oct 24 '26

I wouldn't stress length of time being worked on as a reason to approve. You could spend 100 years working on something sketchy and unsafe and that wouldn't be an argument for it making it into the standard. You could nail your proposal in a month and have a good argument for making it into the standard. Should focus on the quality of the proposal. Imo contracts still have my upvote, it's just not a great argument to try to push.

16

u/daveedvdv EDG front end dev, WG21 DG Oct 24 '26

I don't think that's a fair assessment, but at this point it doesn't matter: There is way too much acrimony involved.

→ More replies (10)
→ More replies (14)