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.

290 Upvotes

399 comments sorted by

View all comments

Show parent comment

4

u/peterbindels Oct 26 '26

I wrote https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3267r1.html a while ago - last updated may 2024, but I should update it again - and it goes into implementation strategies. In 2.3 I have an approach that works if you make an ABI change, with minimal breakage even on incremental upgrades. Part of the feedback on that was that it does not catch any contract changes on half rebuilds ... which IMO isn't a problem, but some people do ship their code that way. In offline discussion beyond that point we tried to see if encoding the contracts themselves would work but the counterexample of pre(foo(x)) just breaks any such proposal. The discussion on this paper in SG15 from iirc Wroclaw should have some detail on it, but lots of it was in offline meetings and discussions with Joshua.

1

u/13steinj Oct 31 '26

In offline discussion beyond that point we tried to see if encoding the contracts themselves would work but the counterexample of pre(foo(x)) just breaks any such proposal.

Sorry, being dense here-- why does that break? What exactly is wrong with doing this. I won't have the ability to look up any internal discussions for a couple of months (my org's NB primary as far as anyone knows left the company last year, and even tracking the slightest stuff down internally has been a hassle).

1

u/peterbindels 25d ago

from the perspective of the user `foo()` is just an opaque function, with no details. If you encode that into your ABI you rely on the *implementation* of `foo()` never changing. If it does change, you get an undetectable changed contract and you again link against something with a different contract.

You'd still detect almost all contract changes so it's a good warning, and a good practice for implementers to consider, but it doesn't *solve* the problem, and in fact it can never *solve* it. It's in part why in P3267 approach 3 I didn't add it to the ABI change because it'd be a larger ABI change without a matching added guarantee to make it worthwhile. P3267's approach 3 works 100% including optimization for held contracts iff you recompile when code changes. If you are willing to accept partial recompiles it cannot guarantee it - and nobody truly can. Y'know, the source of tons of ODR violations.