C++26 is done (again)! — Trip report: November 2026 ISO C++ standards meeting (Búzios, Brazil)
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
Herb Sutter C++ 2026-11-21 8 Minutes tl;dr: A few highlights C++26 technical work, originally completed in March, was reopened and is now recompleted: The anticipated plan is to reissue the updated C++26 document for a second approval ballot. Most of the six-day meeting was devoted to addressing a second set of international comments for C++26, primarily on the contracts language feature. Adopted this week for draft C++29: break label; continue label;, std::ranges::any_view, views::slice, and more…
Herb Sutter C++ 2026-11-21 8 分钟摘要:几个亮点。最初于 3 月完成的 C++26 技术工作已重新开启并再次完成:预期的计划是重新发布更新后的 C++26 文档,以进行第二次批准投票。为期六天的会议大部分时间都用于处理针对 C++26 的第二轮国际意见,主要集中在契约(contracts)语言特性上。本周为 C++29 草案采纳的内容包括:break label;、continue label;、std::ranges::any_view、views::slice 等。
Overview Today, the ISO C++ committee completed technical work on C++26 for a second time in beautiful Búzios, Rio de Janeiro, Brazil (hybrid online via Zoom). As I reported in March, the ISO C++ committee completed technical work on C++26 at our March meeting; following that, we held the first meeting of C++29 in June. Since then, the approval (Draft International Standard, or DIS) ballot for C++26 was held but, for the first time, did not pass unanimously and was sent back to the ISO C++ committee with additional international comments to address, mostly about the contracts feature (pre, post, and contract_assert).
概述:今天,ISO C++ 委员会在巴西里约热内卢美丽的布齐奥斯(通过 Zoom 进行线上线下混合会议)第二次完成了 C++26 的技术工作。正如我在 3 月份报告的那样,ISO C++ 委员会在 3 月的会议上完成了 C++26 的技术工作;此后,我们在 6 月召开了 C++29 的第一次会议。自那时起,C++26 的批准(国际标准草案,即 DIS)投票已经举行,但这是第一次未能获得一致通过,并被退回给 ISO C++ 委员会,要求处理额外的国际意见,这些意见主要涉及契约特性(pre、post 和 contract_assert)。
So this week we addressed the additional comments on C++26, including by adopting an extension to contracts and providing a detailed rationale and timeline to inform national bodies of the history and process by which contracts were developed, concerns heard repeatedly, and decisions made. The committee is now producing an updated final document that is anticipated to be sent out for its second international approval (DIS) ballot and final editorial work, anticipated to be published in the near future by ISO.
因此,本周我们处理了关于 C++26 的额外意见,包括采纳了对契约的扩展,并提供了详细的理由和时间表,以告知各国机构契约的开发历史和过程、反复听取的担忧以及所做的决定。委员会目前正在制作一份更新后的最终文档,预计将发送进行第二次国际批准(DIS)投票和最终编辑工作,预计不久后将由 ISO 发布。
This meeting was hosted by C++ Alliance. Thank you to everyone involved and especially to Matheus Izvekov, who took the lead in making the arrangements! Our hosts arranged for high-quality facilities for our six-day meeting from Monday through Saturday. We had about 220 attendees, split about 35%/65% in-person/remote-Zoom, formally representing 27 nations. (The higher-than-usual percentage of remote participation was partly because of the U.S. aviation ground stop that disrupted air travel just as experts were trying to fly to the ISO C++ meeting.)
本次会议由 C++ Alliance 主办。感谢所有参与者,特别感谢带头进行安排的 Matheus Izvekov!主办方为我们周一至周六的六天会议安排了高质量的设施。我们约有 220 名与会者,约 35% 现场出席,65% 通过 Zoom 远程参加,正式代表 27 个国家。(远程参与比例高于往常,部分原因是美国航空停飞,这在专家们试图飞往 ISO C++ 会议时扰乱了航空旅行。)
At each meeting we have new guest attendees, and this time there were 13 new guests, mostly in person, in addition to new attendees who are official national body representatives. To all of them, once again welcome! The committee currently has 22 active subgroups, but this time fewer of them met throughout the week than usual as we focused on the additional C++26 comments.
每次会议我们都有新的嘉宾出席,这次有 13 位新嘉宾,大多是现场出席,此外还有作为官方国家机构代表的新与会者。再次欢迎他们所有人!委员会目前有 22 个活跃的子小组,但这次在整个星期内开会的小组比往常少,因为我们专注于处理额外的 C++26 意见。
C++26, take 2 The most controversial feature in C++26 is contracts: pre, post, and contract_assert. The committee already had strong consensus, and as of the end of this meeting has still stronger consensus, on including the feature in C++26, but we spent most of this meeting rehearing contracts concerns and working hard again to address them.
C++26,第二次尝试:C++26 中最具争议的特性是契约:pre、post 和 contract_assert。委员会此前已经达成了强有力的共识,而截至本次会议结束,在将该特性纳入 C++26 方面达成了更强的共识,但我们花费了本次会议的大部分时间来重新听取关于契约的担忧,并再次努力解决这些问题。
Here is some history (much of this repeated from my March trip report): In February 2025, when we took the plenary poll to adopt contracts in the C++26 working draft (“merge it to trunk”), the vote was: 87.7% in favor:opposed — 100 in favor, 14 opposed, and 12 abstaining. After that, the concerns were all deeply rediscussed for the last four meetings of the original C++26 cycle thanks to thoughtful and high-quality technical papers explaining the objections; all of those papers continued to be fully heard, often for multiple days and at many telecons between meetings, with some contracts fixes adopted.
以下是一些历史背景(其中大部分重复了我 3 月份的旅行报告):2025 年 2 月,当我们进行全体投票以在 C++26 工作草案中采纳契约(“合并到主干”)时,投票结果为:87.7% 赞成:反对 — 100 票赞成,14 票反对,12 票弃权。此后,在原始 C++26 周期的最后四次会议中,由于解释反对意见的深思熟虑且高质量的技术论文,这些担忧得到了深入的重新讨论;所有这些论文都得到了充分的听取,通常持续多天,并在会议之间的多次电话会议中进行讨论,并采纳了一些契约修复方案。
At our meeting in March 2026, when we took the plenary poll to finalize and ship the C++26 standard, the vote was non-unanimous primarily because of the sustained concerns about contracts: 90.5% in favor:opposed — 114 in favor, 12 opposed, and 3 abstaining. As I reported in March: After extensive scrutiny, the ISO C++ committee still wanted C++26 with contracts, and so contracts stayed in C++26 for the ISO DIS ballot. Our past ISO C++ DIS approval ballots have always been unanimous. No national bodies (NBs) objected to balloting this C++26 DIS document that included contracts.
在 2026 年 3 月的会议上,当我们进行全体投票以最终确定并发布 C++26 标准时,投票并非一致通过,这主要是因为对契约的持续担忧:90.5% 赞成:反对 — 114 票赞成,12 票反对,3 票弃权。正如我在 3 月份报告的那样:经过广泛审查,ISO C++ 委员会仍然希望 C++26 包含契约,因此契约保留在 C++26 中以进行 ISO DIS 投票。我们过去的 ISO C++ DIS 批准投票一直是一致通过的。没有国家机构(NBs)反对对包含契约的这份 C++26 DIS 文档进行投票。
However, during the ISO DIS process, additional late concerns were raised about contracts, including from five NBs that raised contracts concerns for the first time and voted Disapprove on C++26 because of them (see also my paper P4454R0 section 2.3). The result, which surprised nearly everyone, was that the first DIS was not approved. Therefore we spent most of the week in Búzios, rehearing the NB comments on the DIS, which were mostly about contracts.
然而,在 ISO DIS 过程中,关于契约出现了额外的后期担忧,包括来自五个首次提出契约担忧并因此对 C++26 投下反对票的国家机构(参见我的论文 P4454R0 第 2.3 节)。结果令几乎所有人感到惊讶,即第一次 DIS 未获批准。因此,我们在布齐奥斯度过了大部分时间,重新听取了国家机构对 DIS 的意见,这些意见大多是关于契约的。
One requested extension to contracts was adopted in response to NB comments (see next section). Other suggested changes were not adopted, notably the request by multiple comments to remove contracts from C++26; the committee discussed, revoted, and reaffirmed it wants to retain contracts in C++26. This week, the vote to reship the C++26 standard with the changes to C++26 adopted at this meeting, including an additional extension to contracts in response to the international comments and retaining contracts as part of C++26, was: 92.5% in favor:opposed — 111 in favor, 9 opposed, and 8 abstaining.
为了响应国家机构的意见,采纳了一项对契约的扩展请求(见下一节)。其他建议的更改未被采纳,特别是多项意见要求从 C++26 中删除契约的请求;委员会进行了讨论、重新投票,并重申希望在 C++26 中保留契约。本周,关于重新发布包含本次会议所采纳更改的 C++26 标准的投票结果为:92.5% 赞成:反对 — 111 票赞成,9 票反对,8 票弃权,其中包括为响应国际意见而对契约进行的额外扩展,并保留契约作为 C++26 的一部分。
Thank you again to everyone in the committee who has been working hard together to discuss and address these concerns, including all week long again this week! Changes to C++26 adopted this week (and for draft C++29) For C++26, we adopted four main papers and fixed some editorial issues. All of these changes were also adopted for draft C++29, which keeps the standards work in sync rather than forking.
再次感谢委员会中所有共同努力讨论和解决这些问题的人,包括本周整整一周的努力!本周采纳的 C++26 更改(以及针对 C++29 草案的更改):对于 C++26,我们采纳了四篇主要论文并修复了一些编辑问题。所有这些更改也都被 C++29 草案采纳,这使得标准工作保持同步,而不是分叉。
The primary change to contracts was to adopt P4451R2 “Early Adoption of an Always-Enforced Label” by Joshua Berne (in a similar spirit to Romania’s paper P3911R2 “Make Contracts Reliably Non-Ignorable”). Thanks, Romania and Josh! This paper addresses what several NBs told the committee was their primary request for contracts: It is a pure extension that gives programmers a way to express in source code that a
对契约的主要更改是采纳了 Joshua Berne 的 P4451R2 “Early Adoption of an Always-Enforced Label”(其精神类似于罗马尼亚的论文 P3911R2 “Make Contracts Reliably Non-Ignorable”)。感谢罗马尼亚和 Josh!这篇论文解决了几个国家机构告诉委员会的关于契约的主要请求:这是一个纯粹的扩展,为程序员提供了一种在源代码中表达的方式,即……