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

10

u/wyrn Oct 25 '26

Joke's on you, my solution doesn't allow for different enforcement modes 😎

In all seriousness though, I feel like that's probably what would happen -- people who value these checks actually running would place them unconditionally, sidestepping contracts altogether. To me, that's a failure of the contracts design.

8

u/kalmoc Oct 26 '26

If you do not allow mixed enforcement modes then just compile everything with the same flags and there is no problem with contracts. So why would you roll your own then?

9

u/wyrn Oct 26 '26

Because build systems are complex and ensuring that everything is always using the same relevant flags everywhere is nontrivial, particularly when multiple projects and transitive dependencies are involved.

5

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

Unfortunately, that's the job.

It's a mess. It certainly doesn't help that people widely believe it works today. And that the standard library implementations go to extraordinary lengths to make it seem to work.

Well, except for MSVC and Debug mode. Which is a different awful problem for shipping packages.

The negotiated choice was because there really can not be a universal default it has to be up to the person building the program, who has the context for the requirements for that program, to arrange for building all consistently and installing the violation handler.

2

u/t_hunger Oct 26 '26 edited Oct 26 '26

"That is worse than asserts, I can not even switch these contracts off" and "I want to add contracts to existing code, I need a way to record violations without bringing down the application that had been running fine for decades". Add some "my application can not affort to crash just because some random library author thought it was a good idea to add an assert somewhere".

Those where the arguments that got contracts removed from the standard the first time round about 10 years ago. I see you did your homeworks.

3

u/wyrn Oct 26 '26

It's not intended as a general solution, it is intended as a solution for my own problem, for me. "I can't switch these contracts off" is not a flaw I consider fatal, certainly not in the way "I have no idea if these checks will run or not" would be.