The results of the C++26 DIS poll


C++26 failed its DIS poll. As far as I do know, it’s the first C++ draft to fail one. Robert Seacord,
the convenor of the C committee, wrote that he doesn’t suppose any language normal from SC22 has ever
failed its poll earlier than, and Daveed Vandevoorde, a member of the WG21 Direction Group
(P5000R1), wrote that no earlier C++ draft obtained even a single vote
in opposition to. So reflection, std::execution, library hardening, and contracts are all in a draft that ISO hasn’t accredited, and no one is aware of but
how lengthy the delay shall be.

The poll closed on 23 October 2026, and Robert Seacord, the convenor of the C committee,
posted the
result

on LinkedIn the following day:

Where I stand#

I saved this collection impartial whereas the vote was open and didn’t wish to push anybody towards both
facet. The vote is over, so I can say the place I stand.

I like contracts as an concept, and I’ve missed them since they have been faraway from C++20. I’ve
at all times cared about API design, about libraries, good interfaces, and frameworks, and that’s additionally
why I’m in LEWG. My causes for liking contracts come from that have. Checking is one
profit, and a superb one: this system can confirm its personal assumptions. The second axis, which I
care about simply as a lot, is documentation. A precondition or a postcondition within the signature data
the intent of the API designer, so customers know what to anticipate and the best way to use the operate, and a
documentation system resembling Doxygen or cppreference.com can present it proper there. A remark can say
the identical factor, however nothing retains it true. It can drift away from the code with out anybody noticing.
A contract is a part of the code. The compiler checks it along with the operate, and when the
checks are enabled, a violation fails loudly, so this documentation can’t quietly go stale. Concepts
already give us each for the kinds a operate accepts, at compile time. Contracts are the half that
continues to be lacking, the one which does the identical for the values at run time. I’d like to see
contracts in the usual, and it’s a pity they didn’t make it this time. My desire is to maintain
them. If the design comes out higher due to this, that may be a good consequence too.

This isn’t an summary query for me. I’ve began educating C++26 contracts in my workshops, and
mp-units makes use of the C++26 model.

The numbers#

Part 2 defined the 2 situations a DIS
has to fulfill. The draft missed each of them:

Condition Requirement Result
Votes in favor, from the voting (P-)members no less than two-thirds 12 of 20, which is 60%
Negative votes, from all our bodies that voted not more than 25% 9 of twenty-two, which is 41%

Two-thirds of 20 wants 14 votes in favor, and the draft obtained 12. 1 / 4 of twenty-two permits 5 unfavorable
votes, and the draft obtained 9. Either one alone would have failed the draft.

Which international locations voted, and the way#

The official consequence names each nation. Nine voted No: Denmark, Finland, Iran, Italy, Japan,
Luxembourg, Romania, Spain, and Sweden. Each of them despatched feedback with its vote. France and Ireland
abstained but additionally despatched feedback, so 11 international locations commented in complete. Poland and the United States
abstained. I’m a member of the Polish nationwide physique.

The feedback themselves aren’t obtainable but. The ISO/IEC Directives (clause 2.6.5 of Part 1)
require a full report inside 12 weeks of the vote’s finish, together with the consequence, the committee chair’s
determination, and the complete textual content of the feedback. For a poll that closed on 23 October, that is
mid-January 2027 on the newest. At the committee-draft stage, WG21 revealed that type of report as
N5028. I don’t know if it should do the identical this time.

Poland’s abstention#

Poland’s place on C++ is set in a technical committee of the Polish Committee for
Standardization, KT 331. Its poll requested whether or not Poland ought to reject the DIS and ship technical
feedback to ISO. The vote didn’t cross, so Poland instructed ISO “Abstention”, and no technical feedback
might go together with it.

I gained’t share the tally or say who voted how. This is an inner vote, and I don’t know whether or not it
could also be revealed. Just a few votes resolve whether or not Poland says one thing or nothing in any respect.

It virtually got here to nothing for a unique motive. Just a few days earlier than the Polish poll closed, we
have been nonetheless lacking votes for a quorum, and and not using a quorum there would have been no Polish place.
Some of the individuals on the listing had modified jobs. I attempted to succeed in the quiet ones by e-mail and on
LinkedIn, and a few of the emails bounced, probably as a result of the addresses belonged to former
employers.

Whichever manner you suppose C++26 ought to have gone, two issues comply with:

  • If you’re on a nationwide committee, vote. The vote counts regardless of which manner you solid it.
  • If you may now not participate, ask to be faraway from the listing of voting members. The quorum
    counts you, so an inactive member makes it tougher for everybody else to succeed in one, on this poll
    and in each one that follows. The committee workplace can’t merely take away somebody who has gone quiet,
    so it is dependent upon the member to ask.

What the No votes have been about#

I’m satisfied the No votes have been about contracts. That is the place the opposition was on file earlier than
the poll. Both objections defined on the Croydon plenary that despatched C++26 to the poll have been
about contracts. Several national-body feedback on the committee draft requested to take away them (part
2
has the desk). P4238R1 requested the nationwide our bodies
to vote No over the contracts design and the way it superior by way of the committee. I count on all 9 No
votes to be about contracts, and we are going to know for certain solely when the feedback are revealed.

For readers who haven’t adopted the collection, that is the characteristic, and part
1
explains it intimately:

#embody 

double checked_sqrt(double x)
    pre (x >= 0.0)
    put up (r : r >= 0.0)
{
  const double root = std::sqrt(x);
  contract_assert(!std::isnan(root));
  return root;
}

This code doesn’t resolve whether or not every of these checks runs or what occurs when certainly one of them fails.
The draft defines 4 analysis semantics, ignore, observe, implement, and quick-enforce,
and leaves the selection between them to the implementation. In GCC 16, you choose one with a compiler
flag. Much of the dispute is about this selection, whether or not a contract assertion is a examine the construct
might drop or a assure this system can depend on (part
3
). Part
4
and part
5
cowl the remainder of it.

What occurs subsequent#

The directives give 4 programs of motion after a failed DIS:

  • flow into a revised enquiry draft, with an eight-week vote as an alternative of twelve,
  • flow into a revised committee draft for feedback,
  • flow into it as a draft technical specification as an alternative,
  • cancel the undertaking.

The SC22 chair chooses one of many first three, in cooperation with the SC22 secretariat and the WG21
convenor, and in session with the ISO/IEC central workplace. Canceling is the one one which SC22
as an entire has to resolve. WG21’s half is to deal with the feedback, advocate a course, and, if
wanted, put together a revised draft. When I wrote this, I had seen no announcement of which one they
selected.

The subsequent WG21 assembly is in Búzios, Brazil, from 16 to 21 November 2026. It would be the first
assembly of the entire committee because the consequence, and opinions on what it ought to do are divided:

  • Some need WG21 to hunt one other poll with out altering or eradicating contracts. P4433R0 is a proper
    proposal for this. It additionally asks WG21 to reject feedback that decision for elimination except they create
    new technical info, and to substantiate each with a ballot in Búzios.
  • Others say the short-term reply is easy. J. Daniel Garcia, one of many authors of P4238R1, wrote
    beneath Seacord’s put up: “the brief time period answer is easy, take away one problematic characteristic and the
    remainder of the usual can very possible be accredited”. Vandevoorde’s suggestion “shall be to take away
    contracts from the draft, with changes to maintain library hardening”.
  • Some of the sooner national-body feedback requested for a technical specification or a white paper
    as an alternative.

I wish to see a plan in Búzios, and it’s not sufficient for me if it solely says what to do with
contracts. If they’ve to go away C++26 so the remainder can ship, that may be a pity, however I can reside with
it. I’d not like every little thing else to attend with them. I wish to see the remainder of C++26 ship
as quickly as attainable.

A tougher query is how the design improves from right here. The objections I’ve learn level in
totally different instructions: stronger ensures checked by the compiler, extra of the design within the
library, a technical specification first, checks that may’t be switched off. I’ve not seen a
single various that every one of those that object would settle for, so I discover it exhausting to say which one
change would fulfill everybody. That is how I see it, and I could also be fallacious.

Until a brand new version is revealed, the present C++ normal continues to be ISO/IEC 14882:2024 (C++23).

What it means in your code in the present day#

Compilers implement options from the working draft, and the poll doesn’t change what they already
ship. GCC 16 accepts -std=c++26, and Clang has -std=c++2c. GCC 16 implements contracts as half
of its experimental C++26 help, and the Clang implementation hasn’t been merged. Whether distributors
hold each drafted characteristic beneath that flag is as much as every of them, and no one can promise it in the present day.

If your workforce already makes use of C++26 options, or is studying them, nothing must be undone but.
However, what your compiler implements in the present day is a draft, and it could not match the revealed
normal.

What continues to be open#

  • the textual content of the feedback from the 11 international locations that despatched them,
  • what WG21 recommends in Búzios, which plan of action is chosen, and on what schedule.

I hope the compilers hold implementing C++26 contracts, regardless of the committee decides subsequent. One
objection is the shortage of manufacturing and deployment expertise, and part
5
presents each side
of that argument. This expertise is tough to achieve with out implementations that folks can use, which
is a chicken-and-egg downside. I’d moderately not see the identical objection come again the following time
contracts are voted on.

I’ll replace this text when extra info is revealed.



Source link