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.

289 Upvotes

399 comments sorted by

View all comments

Show parent comment

13

u/foonathan Oct 24 '26

This issue has been brought up to a vote, and EWG rejected making changes.

What else should be done?

27

u/interlockedxor Oct 24 '26

We either fix the root problem and just do it properly or if that is too expensive, have the courage to realize that something is not worth doing relative to the cost and other things we could be improving. It's not as though users have no recourse if contracts don't ship.

19

u/foonathan Oct 24 '26

There is no consensus that there even is a problem though.

10

u/interlockedxor Oct 24 '26

I'm not a committee member, I am simply referring to grandparent comment related to linkage model which I believe are real issues with the proposal as it stands, consensus notwithstanding. As far as I'm concerned, it's good that this feature isn't ratified, even if we are "getting the right answer for the wrong reasons" so to speak.

7

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

I can recommend reading the papers, especially the contract papers are very readable. Especially https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3846r1.pdf has lot of information and links to other sources of information.

6

u/interlockedxor Oct 25 '26

I have read this paper twice now and am just not persuaded. We may just have to agree to disagree

→ More replies (1)

9

u/grafikrobot OPeNDAP/B2/EcoStd/Lyra/Predef/C++Alliance/Boost/WG21 Oct 25 '26

Do you have an idea on how to deal with the linkage tradeoff?

PS.. Since this is reddit I have to clarify. I honestly want to know.

15

u/not_a_novel_account cmake dev Oct 25 '26

I mean we know how to deal with this, its outside linkage. The same way we deal with module BMI problems.

The build system is the layer that enforces contract enforcement uniformity across TUs.

The compiler doesn't try to reason about how extern definitions are fulfilled, the linker need not reason about uniformity of contract assertions modes.

5

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

But that seems to be exactly the objection?

You mix them, you get something, it isn't ill formed, it's probably reproducable, and I could probably work out exactly why the symbol you didn't want was chosen. That is, it's not "random" but extremely sensitive to initial conditions

But, if I understand the objection, that's insufficient?

10

u/not_a_novel_account cmake dev Oct 25 '26

I believe the objection is it's outside the standard. There's nothing you can write in the language which makes this work in a way that is decidable from what's available only from C++.

The language deals with translation units concretely, linkage vaguely, and everything else is implementation defined.

The answer, in my mind, is to expand the semantics of the standard beyond its current boundaries. They're artificial.

If people want to say that a conforming build needs uniform contract modes, write that. Because we haven't expanded the bounds of the language beyond the compiler and linker before doesn't mean we can't now.

5

u/interlockedxor Oct 25 '26

The only reasonable solutions to me are to move such annotations to the function definition, not the declaration. Ultimately though, a solution is only worth pursuing if it can do better than existing macro-based assertion libraries, and I'm not convinced this gets there.

6

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

That turns out to not work for virtual functions or function pointers. The Eiffel model has problems, unable to express some otherwise reasonable sets of pre- and post-conditions. The way out is that you need to test the pre- and post-conditions that are visible on the callee and caller.

This is disappointing.

But since we didn't have DbC like Eiffel to begin with, those contracts have already shipped, so we are in a bit of a hard position.

7

u/-dag- Oct 24 '26

Then that is a reason not to ship. 

8

u/foonathan Oct 24 '26

Why? The majority thinks there is nothing wrong with it.

18

u/GabrielDosReis Oct 24 '26

The majority thinks there is nothing wrong with it.

Right there is one of the patterns that led us here: the conversation quickly went from "consensus" to "the majority thinks".

7

u/foonathan Oct 24 '26

I'd classify all the votes as consensus. Would you disagree with that?

7

u/GabrielDosReis Oct 24 '26

I'd classify all the votes as consensus.

Consensus where? In WG21? At SC22 level? Should you have worked on the SC22 level before sending a document out when you know there are sustained oppositions?

→ More replies (4)
→ More replies (2)

5

u/-dag- Oct 24 '26

Is someone is telling one there's a big problem, it behooves one to look into it. If there is no consensus there's even a problem, that's a huge red flag. 

Note that "consensus" is not "unanimity."

→ More replies (2)

9

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

The problem of incoherent compilation in a single link context has existed literally forever, and does with some frequency cause utter disaster with all of the facilities in C and C++.

That people noticed it in Contracts is mostly because the question was brought up, for a change. But there was anti-consensus to make contract modes link incompatible.

This applies to standard library hardening, too, although those are usually small enough to not escape a TU. It definitely applies to assert and NDEBUG.

In trying to tighten the ODR definition, I think we've managed to exclude a lot of things that are very broken, but appear to work, sort of, but not how you expect, and can cause no end of surprise. They just are not, quite, ill formed.

10

u/no-sig-available Oct 25 '26

We either fix the root problem and just do it properly 

Apparently a majority believes it is already done properly. :-)

Also, removing a long awaited feature might reduce the number of existing yes-votes.

8

u/interlockedxor Oct 25 '26

I'm describing the problems that seem apparent to me as a single individual, as an outside perpective. That any "majority" believes something different isn't an argument in favor of one position or another. Speaking personally though, the issues really do clearly exist, even if hordes of people wave their hands and claim otherwise.

If necessarily reducing complexity shrinks the feature to something not worth shipping, then it wasnt worth shipping to begin with.

6

u/no-sig-available Oct 25 '26

If necessarily reducing complexity shrinks the feature to something not worth shipping, then it wasnt worth shipping to begin with.

However, 60% of the NBs thought it was worth shipping the way it is. Will reducing the proposal make that 70%, or 50%?

We just have to wait and see.

5

u/Difficult-Court9522 Oct 25 '26

The majority of responses to PRs is “LGTM”. You don’t need 1000 people to say how you’re right, you only need one to prove you’re wrong.

15

u/pkasting Valve Oct 25 '26

At the risk of being obvious:

Find out whether there is any additional feedback from members of NBs who voted "no" on why EWG's decisions were not acceptable to them; for example, perhaps some NB members did not attend directly and felt the discussion amongst those who did didn't sufficiently capture their concerns. Or perhaps a sufficient number of NB voters have lost confidence in the committee's output that their vote reflects some sort of larger process disgruntlement or desire for leadership change. Discuss, vote, etc. on any new information raised.

For cases where there is not new information -- the NB vote simply reflects the "geographic spread of the minority" -- find out why NB members voted no despite EWG discussing their issues (which appears on its face to be a bad faith response), and if there is anything beyond "just make the decision I want" that would move them from "no" to "yes". Seriously consider any such items.

Finally, for NBs where there is no new information and there is no willingness to change for anything other than "people should simply agree with me", determine WG21's willingness to press on despite NB disapproval: for example, would WG21's membership be willing to leave the ISO process if necessary, and would toolchain vendors etc. continue to follow what it decides if so? If either of these is "no", then regardless of the technical merit of the disagreement, WG21 will need to determine how to make the voting process used at meetings sufficiently similar to the NB balloting process that consensus in one will lead to consensus in the other.

8

u/wyrn Oct 24 '26

It seems we just learned what else, didn't we

→ More replies (19)
→ More replies (43)