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

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.