C++26 Disapproved
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
On October 23, 2026, the unthinkable happened. It was supposed to be a mere formality: C++26 was up for a vote by the ISO National Bodies (NBs). The options are always approval, rejection, or abstention. Comments are also allowed. Since 1998, this process had run quietly and smoothly. Not so on October 23, 2026. After a twelve-week voting period, the result is in: Disapproved!
2026年10月23日,不可思议的事情发生了。这本应只是一个例行公事:C++26正等待ISO国家机构(NBs)的投票。选项始终是批准、拒绝或弃权,同时也允许提交意见。自1998年以来,这一流程一直安静且顺利地运行。但在2026年10月23日,情况并非如此。经过为期十二周的投票期,结果出炉:未获批准!
I would like to mention here that I am a member of the C++ Standardization Committee and, together with my colleagues, represent Germany’s vote. ISO rules also stipulate that certain votes are internal to ISO, and the results—or the breakdown of the results—may not be published. This article contains my own personal views.
在此我想说明,我是C++标准化委员会的成员,并与同事们共同代表德国进行投票。ISO规则还规定,某些投票属于ISO内部事务,其结果或结果明细不得公开。本文仅代表我个人的观点。
As far as I know, this is the first time in the history of C++ that DIS ballot failed. When I searched the ISO system, I could only find one other DIS that was not approved: ISO/IEC DIS 26926 C++/CLI Language Specification dated August 11, 2006. It’s possible that my search privileges aren’t sufficient to view everything, but all ISO programming languages should be visible to me. The sad end of ISO/IEC DIS 26926: the project was halted. I mention this upfront to clarify the significance of this vote.
据我所知,这是C++历史上首次出现DIS(国际标准草案)投票失败的情况。当我在ISO系统中搜索时,我只找到了另一个未获批准的DIS:2006年8月11日的ISO/IEC DIS 26926 C++/CLI语言规范。虽然我的搜索权限可能不足以查看所有内容,但所有ISO编程语言标准对我来说应该是可见的。ISO/IEC DIS 26926的悲惨结局是:该项目被叫停。我提前提到这一点,是为了阐明此次投票的重要性。
In the following, I will use various terms from everyday ISO terminology. At https://isocpp.org/std/iso-iec-jtc1-procedures, there is an overview of the various stages of an ISO standard. DIS is the penultimate stage. As the overview also shows, a two-thirds majority is required. This majority was not achieved.
接下来,我将使用一些ISO日常术语。在 https://isocpp.org/std/iso-iec-jtc1-procedures 网站上,有关于ISO标准各个阶段的概述。DIS是倒数第二个阶段。正如概述所示,该阶段需要三分之二的多数票才能通过。而此次投票并未达到这一多数要求。
The reason for the rejection is quite clear from the comments submitted by the National Bodies (NBs): contracts. Put simply, a number of NBs believe that this feature is not yet ready for release.
从国家机构(NBs)提交的意见来看,拒绝的原因非常明确:契约(Contracts)。简单来说,一些国家机构认为该特性尚未达到发布标准。
Now it gets complicated. The C++ Standardization Committee, also known as WG21, follows ISO rules but also has some additional rules. One of these is (or was) that opinions are always heard whenever new information becomes available. If an opinion was heard and a feature was nevertheless not changed as desired, the person respects the outcome and accepts that many others disagree.
现在情况变得复杂了。C++标准化委员会(也称为WG21)遵循ISO规则,但也拥有一些额外规则。其中之一是(或曾经是):每当有新信息出现时,意见总会被倾听。如果意见被听取后,特性仍未按预期修改,相关人员会尊重结果,并接受许多其他人持不同意见的事实。
However, the voting body at the NB level may also consist of other individuals, or the NBs are, of course, free to vote differently.
然而,国家机构层面的投票主体可能由其他个人组成,或者国家机构当然可以自由地进行不同的投票。
The previous practice was that NBs would only vote against a standard if new information became available or if errors in the process or similar issues were identified. This changed on October 23, 2026.
以往的做法是,只有在出现新信息,或者发现流程错误及类似问题时,国家机构才会对标准投反对票。这种情况在2026年10月23日发生了改变。
It’s difficult to judge in this complex situation; the NBs who want C++26 without Contracts argue that there is new information. I myself find it hard to share this view. A new paper with old arguments is not new information to me.
在这种复杂的情况下很难做出判断;那些希望在没有契约特性的情况下发布C++26的国家机构认为存在新信息。我个人很难认同这一观点。对我而言,一份带有旧论据的新文件并不算新信息。
The feature has been on the wish list for a long time. I was already in the room in Cologne back in 2019, at the time for C++20, when Contracts, in a different form back then, were being included in the standard. I was also in the room when the feature was removed from C++20 again during the same meeting. As a result, a study group was formed to address the topic of Contracts and its various aspects from 2020 to approximately 2024. Afterward, the study group submitted its work and proposals to the Evolution Working Group (EWG), the central body for language extensions. There, the topic was discussed further over several meetings before being included in C++26 by a majority vote.
该特性早已在愿望清单上。早在2019年科隆会议期间,我就在现场,当时C++20正准备将以不同形式存在的契约特性纳入标准。当该特性在同一次会议中又被从C++20中移除时,我同样在场。因此,一个研究小组成立了,专门负责处理从2020年到大约2024年期间关于契约及其各个方面的主题。随后,该研究小组将其工作成果和提案提交给了语言扩展的核心机构——演进工作组(EWG)。在那里,该主题经过多次会议的进一步讨论,最终通过多数票被纳入C++26。
In the next step, WG21 voted on the C++26 draft in March 2026, which included Contracts. Here, too, a large majority was achieved, though not without dissenting votes.
在下一步中,WG21于2026年3月对包含契约特性的C++26草案进行了投票。同样,该草案以绝大多数票获得通过,尽管并非没有反对票。
And that brings us to the next phase: DIS. At this stage, there were enough “no” votes that a two-thirds majority was not reached.
这就引出了下一个阶段:DIS。在这个阶段,反对票数量足够多,导致未能达到三分之二的多数票要求。
The big problem: what happens next? ISO, of course, has a process for this. It offers various options:
最大的问题是:接下来会发生什么?当然,ISO对此有一套流程,并提供了多种选择:
All of these possibilities mean a delay in the next C++ standard. Whether it will still be called C++26 is also up in the air, but that’s a much smaller issue.
所有这些可能性都意味着下一个C++标准的延迟。它是否仍被称为C++26尚不确定,但这只是一个小问题。
The difficulty with all four options is that they require a majority within WG21. However, this working group voted to move C++26 with Contracts into the next voting phase leading to its release. And it did so with more than just the required two-thirds majority. The feature didn’t come out of nowhere, either; it was developed over the course of years through the work and possibly personal commitment of many people. It’s hard to imagine that this group would simply want to abandon its work, which has received approval on multiple occasions so far. The same applies to the group that is dissatisfied with Contracts. This group, too, has invested effort, in some cases even in alternative implementations. It’s hard to imagine that, after these groups voted “no” in the DIS vote, the result would change without Contracts being removed.
这四种选择的难点在于,它们都需要WG21内部的多数支持。然而,该工作组此前已经投票决定将包含契约的C++26推进到下一个发布投票阶段,并且是以超过三分之二的多数票通过的。该特性并非凭空出现;它是经过多年努力,通过许多人的工作甚至个人投入开发出来的。很难想象这个群体会轻易放弃他们迄今为止已多次获得批准的工作成果。同样的情况也适用于对契约不满的群体。该群体也投入了精力,在某些情况下甚至投入了替代实现。很难想象在这些群体于DIS投票中投下“反对”票后,如果不移除契约,结果会有所改变。
Even the last option removing C++26 requires a majority in WG21. As I understand it, this step would mean reverting to C++23 and proceeding to C++29 without a single change. This would affect the work of even more people. WG21 would then be tasked with incorporating features that have already been successfully included in C++26 into C++29. Since this can only be done through a paper backed by at least one person advocating for it, features could be omitted if that person lacks the motivation or time.
即使是最后一种移除C++26的选项,也需要WG21的多数票支持。据我理解,这一步骤意味着退回到C++23,并在没有任何更改的情况下直接进入C++29。这将影响更多人的工作。WG21随后将被要求把已经成功纳入C++26的特性整合到C++29中。由于这只能通过至少有一人支持的提案来完成,如果该人缺乏动力或时间,某些特性可能会被遗漏。
Of course, certainty about the voting outcome can only be achieved if the respective path is actually taken.
当然,只有在真正采取相应路径的情况下,才能确定投票结果。
Unfortunately, the way forward is currently more than uncertain. Perhaps this also explains why ISO/IEC DIS 26926 marked the end of this activity. Consensus is needed to move forward. Trust is always required for consensus. Unfortunately, that trust has just been shaken.
不幸的是,未来的道路目前极其不确定。也许这也解释了为什么ISO/IEC DIS 26926标志着该项活动的终结。前进需要共识,而共识始终需要信任。遗憾的是,这种信任刚刚受到了动摇。
The next C++ standard, and thus the future of C++, is currently at an impasse.
下一个C++标准,以及C++的未来,目前正处于僵局之中。
The good news is that the next meeting will take place on November 16, which is just a few days away. The top priority will be to break the deadlock. This will very likely have implications for C++29 as well; in fact, there is currently no reason to c
好消息是,下一次会议将于11月16日举行,距离现在仅剩几天时间。当务之急是打破僵局。这很可能会对C++29产生影响;事实上,目前没有任何理由去 c