2019-11 Belfast ISO C++ Committee Trip Report — Started Processing Feedback on the C++20 Committee Draft; ABI Review Group Formed

The ISO C++ Committee met in Belfast 🇬🇧 last week to start reviewing and responding to the National Body comments on the Committee Draft (CD) of the next International Standard (IS), C++20. The Committee Draft is like a beta release of the standard, collecting National Body comments is beta testing or code review, and responding to them is akin to bug fixes.

At the next meeting in Prague 🇨🇿, we'll respond to their comments, and then publish the C++20 International Standard at the February 2020 meeting in Prague.

 

This week, we made the following changes and additions to the C++20 draft:

 

Importantly, a committee member (Vincent Reverdy) constructed this histogram of algorithm name lengths in the standard library.

 

The following notable features are in C++20:

 

C++20, the most impactful revision of C++ in a decade, is nearly done. Our 3-year release cycle is paying off.


ABI Review Group Formed


Over the past few years, there's been a lot of discussion on the committee about ABI stability and our priorities; specifically, do we prioritize performance over stability (as we like to think we do) or stability over performance (which is what we do in practice). Today, we generally try to avoid making breaking changes, although we are interested in language features like epochs that may make it easier for us to fix our mistakes.

Often times, it's difficult for authors to identify when their proposal will introduce breaking changes, especially ABI breaking changes. So, we've decided to create an ABI Review Group to look at the impact that proposals will have on ABI and, when possible, what alternative approaches or changes might introducing ABI breaks.


The Great Rechairing


Since the last meeting, there's been a number of changes in leadership in the committee. We regularly rotate chairships on the committee; chairing is a really tough job, and no one can do it forever. A big thanks to all the outgoing chairs for all their hard work, and good luck to all the new chairs, who are:

  • JF Bastien (/u/jfbastien), Evolution (EWG) Chair.
  • Hana Dusíková (/u/hanickadot), Reflection (SG7) Chair.
  • David Stone (/u/david-stone), Modules (SG2) Chair and Evolution (EWG) Vice Chair.
  • Jeff Synder (/u/je4d), Networking (SG4) Chair.
  • Lisa Lippincott, Numerics (SG6) Chair.
  • Botond Ballo, Evolution Incubator (EWGI) Chair.
  • Erich Keane (/u/ErichKeane), Evolution Incubator (SG17) Assistant Chair.
  • David Vandevoorde, ABI Review Group Chair

 


Language Progress


Evolution Working Group Incubator (EWGI) Progress


EWGI met for two and a half days this week, spending this time reviewing 17 papers in an attempt to get them better prepared for a trip to Evolution Working Group. While some were short and simple Reserving Attribute Names for Future Use, others ended up being quite a bit more time (and mind!) consuming. Some of the more interesting papers discussed are:


Evolution Working Group (EWG) Progress


The Evolution Working Group Looked at about ~100 Nation Body comments, about half of which were for modules

We saw several coroutines comments, most of which were rejected. A comment to make unhandled_exception in the promise type of coroutine optional was sent back for further analysis.

We changed non-type template parameters (NTTPs) to remove the requirement for strong structural equality, instead adopting a model where types can be used as NTTPs if all members and bases are public.

 


Library Progress


Library Evolution Working Group Incubator (LEWGI) Progress

This was our longest meeting ever - Monday through Thursday and half of Friday. 20 papers were reviewed, including a number of big features:


Library Evolution Working Group (LEWG) Progress


LEWG spent nearly the entire meeting reviewing and processing National Body comments on the design and correctness of the standard library in C++20. Approximately 130 such comments were in our queue over the course of the week, and all have been processed.

One important block of comments dealt with fixing up and polishing the concepts provided by the library, and harmonizing the interoperability of ranges.

Other notable improvements:

There was little time for C++23 work, but LEWG managed to look at a few Executor related papers, especially the latest revision of the Unified Executors proposal, which will be one of the first orders of business over the next few meetings.


Library Wording Group (LWG) Progress


The Library Wording Group was swamped with eighty NB comments on Monday, with up to another 130 that could be forwarded from the Library Evolution group (and even more from study groups). We spent a lot of time working on processing these, by triaging them, before working out how to solve them. Sometimes we broke from working on NB comments, to address issues with the standard library (which was a request by an NB comment).

Changes we approved include:

We also made a lot of changes to the wording of the standard library (the whole effort is called "Mandating the Standard Library", and was started by the Guidelines for Formulating Library Semantics Specifications). These changes clean up the wording so that it’s simpler, clearly identifies what:

  • Affects overload resolution.
  • Is a compile-time [pre|post]condition.
  • Is a run-time [pre|post]condition.
  • Users can and cannot do.

 


Concurrency and Parallelism Study Group (SG1) Progress


This week, SG1 focused on finalizing C++20, processing 18 comments on C++20.

The paper "A Unified Executors Proposal for C++" was updated to incorporate the sender/receiver concepts for representing composable, lazily started asynchronous operations and both executor and 'scheduler' concepts for abstracting execution contexts. This design represents the culmination of many, many years of design evolution and we have now, importantly, reached unanimous consensus in SG1 that this design should by adopted and represent the basis for asynchrony and execution going forward.

This is significant progress and a step closer to unblocking the long list of other features dependent on these facilities.

We also reviewed:

 


Modules Study Group (SG2) Progress


SG2 primarily focused on addressing NB comments. There were a handful of technical detail bug fixes. Key issues discussed include:

  • We approved dynamic initialization order in modules which addressing a long-standing “fiasco” in C++. It is primarily intended to ensure that we didn’t lose the init ordering guarantees currently provided for #included headers (such as <iostream>) that would be lost when they were imported, which the compiler is allowed/encouraged to do automatically. However, it will be even more useful with named modules since we will now guarantee that any variables defined in the interface of a named module will be initialized before any code that imports them, even though they are in different translation units.
  • We refined and approved support for fast scanning which should ensure it is possible to write a fast prescanner for efficiently building named modules. It was written by the author of one of those tools and addresses all known impediments. This paper additionally grew to resolve where import and module declarations are allowed to appear.
  • We discussed what to do about local linkage entities in header units (such as std::ios::Init in <iostream>). We decided that this needs to be resolved for C++20, and we'll see a paper for it in Prague.
  • We rejected all proposed changes to named module naming, including:
    • We decided to continue to allow dots in module and partition names (rejecting P1873, accepting P1948.
    • We did not expand the set of characters allowed in module names (rejecting P1876).
    • We decided to not apply special lexing rules around module names (rejecting FR075. This means that you can have whitespace around your .s and :s when spelling module names in code, even though they do not affect the actual module name.
  • We ensured that the vast majority of real-world uses of import and module identifiers in existing code would not be broken in C++20, including a particularly amusing import.module.get(); line.
  • We decided to remove implicit inline for member functions defined in the definition of a class within the purview of a named module.
  • We resolved quite a few other NB comments fixing modules wording bugs.

 


Networking Study Group (SG4) Progress


SG4 discussed & approved design of Networking Technical Specification improvements related to: - completion tokens, - executors and - dynamic buffers

We also had an initial discussion about whether & how secure networking (i.e. TLS/DTLS) should be supported in C++. The result was that we will aim to include secure networking in C++23, but that we will ship networking support without secure networking if it is not ready in time for C++23.

 


Numerics Study Group (SG6) Progress


We met a few times this week, sometimes jointly with the Library Evolution Incubator, working on a few major numerics topics:

For awhile, we've been discussing putting together a proposed Numerics Technical Specification. At this meeting, we took the first steps towards that; approximately 10 papers intended for this numerics library were combined into one paper. This will allow us to look at all the components of this library, resolve inconsistencies, and combine overlapping functionality when possible. Some of that work has already begun.

 


Compile-Time Programming Study Group (SG7) Progress


This week, we discussed the current state of reflection in the two existing implementations (Clang and EDG). We discussed support for unicode identifiers and reflection over user-defined attributes.

We had an interesting discussion about the programming model for compile-time side effects, (error reporting, asserts, and mutable variables). We encouraged further work on constexpr arguments.

The Reflection group also discussed a paper for better runtime polymorphism and asked the author to look for library solutions using reflection instead of creating new language features. We encouraged the author of a proposal for language support for class layout control to choose a more programmatic solution.

We discussed some recent changes to std::embed, and liked the direction. We would like to explore a more generalized solution to constexpr I/O. We expressed some concerns over security and toolability. We believe the feature should provide an easily scannable list of resources that can be opened by std::embed.


Feature Test Study Group (SG10) Progress


The Feature Test Study Group met this week, and worked on the following:

  • Added missing feature test macros.
  • Feature test macros for freestanding.
  • 36 new feature test macros.
  • Will now add feature test macros for major library features that add constexpr, otherwise each header gets a macro.

We have a standing document that lists all the feature test macros.

 


Undefined Behavior Study Group (SG12)/Vulnerabilities Working Group (WG23) Progress


The Undefined Behavior Study Group once again held a joint session with the Vulnerabilities Working Group (WG23).

We met discussed undefined behavior in the preprocessor this week. Our plan is to file some issues for this and resolve them for C++23, and hopefully backport the fixes to C++20 via a defect report.

 


Human Machine Interface and Input/Output Study Group (SG13) Progress


  • std::web_view: We looked at an update to the proposal, and provided feedback. We encourage the author to provide an update for a future meeting addressing these comments.
  • 2D Graphics: Presentation of the new appendices responding to feedback given earlier and some discussion about this
  • Audio: The paper looked at six main use cases. During discussion we identified that one use case could be subdivided (and one should be, for the future). We polled each use case for whether it was ‘critical’; i.e. it must be addressed in the first version of an eventual audio TS. This provided some useful feedback to the audio proposal paper authors.

 


Tooling Study Group (SG15) Progress


The Tooling Study Group met on Friday and reviewed four papers.

Tooling continues to make progress towards producing a Technical Report supporting the modules ecosystem so that compilers, build systems, and other tools will be able to cooperate on C++20 modules.

 


Unicode and Text Study Group (SG16) Progress


The Unicode and Text Study Group provided guidance on 7 NB comments with 4 associated papers and reviewed an additional 8 papers.

We recommended that std::format field widths be measured in units of character display width so as to enable proper alignment of Unicode text in terminals. LEWG accepted our guidance and approved the change for C++20. Next stop is LWG approval. We think this change will be much appreciated and are grateful to the paper author for the great work he did demonstrating the possibilities! (P1868).

We also replaced the {n} format specifier of floating point numbers by a generalized {L} locale specifier applied to more types and more consistently. This enables std::format to replace more uses of printf than was previously possible. This change sailed straight through LEWG and LWG and will be in C++20! (P1892).

Another tweak to std::format was the subject of an NB comment and will benefit support for right-to-left (RTL) languages. As previously specified, std::format would have been required to align fields specified with the < specifier on the left side of a field when formatting RTL text, but that isn’t the desired behavior (and would have been very challenging to implement!). Thanks to a sharp eyed new committee member for spotting this issue and providing compelling demonstration of the desired behavior! This change has also been approved by LEWG and LWG for C++20, but won’t be voted in until the next meeting.

We recommended to accept an NB comment regarding the use of questionable characters such as Left-To-Right modifiers, Right-To-Left modifiers, Zero-Width-Joiners and other control characters, with a proposed resolution to further restrict permitted identifiers according to Unicode Standard Annex #31 - Identifier and Pattern Syntax. This was forwarded to the Evolution Working Group, which decided not to apply it directly to C++ 20 at this late stage, but will consider applying it as a defect resolution against the next, and earlier, standards.

Consistent use of terminology is essential to avoid miscommunication, but the standard has not yet adopted modern text processing terminology and that sometimes leaves us struggling to understand each other. We were therefore grateful to review standard terminology for execution character set encodings and provide encouragement to continue this endeavor by refining the proposed terms and adding a few more.

Speaking of naming things, we also forwarded Naming Text Encodings to Demystify Them to the Library Evolution Working Group. This paper proposes taking the guesswork out of figuring out which encoding is used for string literals or for the run-time locale dependent character encodings by providing a simple interface to query these encodings.

We also discussed locale aspects and the possibility of formatting physical unit quantities and symbols using fancy characters outside the basic source character set. This discussion made it clear why std::format being locale independent by default is such a good choice. We came away with homework assignments to think more about how to handle localization within the standard.

Finally, we reviewed a paper proposing enhancement of std::regex. While we’re appreciative of and quite impressed by the author’s work, we find ourselves reluctant to invest in std::regex at this time given well established concerns about performance. Additionally, since proper handling of Unicode regular expressions depends on Unicode character properties, it may be prudent for us to address general support for the Unicode character database before tackling this.

All in all, it was a good week for SG16. This was our first time contributing to resolution of NB comments and it was a great experience being included in this part of the process!

 


Education Study Group (SG20) Progress


SG20 met for a day to continue discussing the formation of curriculum guidelines. We are creating a project plan that aims to have a Standing Document for isocpp.org at the end of 2020. We agreed for guidelines that encourage teaching patterns that:

  • Are iterative and incremental.
  • Focus on consumption, then production.
  • Are audience-appropriate
  • Are driven by use-cases.
  • Have actionable learning objectives.

We have decided on a modular-based teaching approach, with multiple topics per module. These modules will be accompanied by outcomes for curriculum designers ("An Instructor Should Be Able To") and student outcomes ("A Student Should Be Able To") that are action-driven and measurable. They will include what is in scope and what is not. The topics will include an audience table and dependencies on other subjects.

The idea is that we are not prescribing: a curriculum designer will get food for thought; but they should pick their own journey and choose examples and exercises from their own experiences.

 


Contracts Study Group (SG21) Progress


We had an initial conversation about the scope for contracts in the standard (e.g., should an assumption facility be pursued separately from other capabilities). We’re anticipating papers to discuss at future meetings covering use cases, experience with past systems, and technical proposals.

 


C++ Release Schedule


NOTE: This is a plan not a promise. Treat it as speculative and tentative. See P1000 for the latest plan.

  • IS = International Standard. The C++ programming language. C++11, C++14, C++17, etc.
  • TS = Technical Specification. "Feature branches" available on some but not all implementations. Coroutines TS v1, Modules TS v1, etc.
  • CD = Committee Draft. A draft of an IS/TS that is sent out to national standards bodies for review and feedback ("beta testing").
Meeting Location Objective
2018 Summer Meeting Rapperswil 🇨🇭 Design major C++20 features.
2018 Summer LWG Meeting Chicago 🇺🇸 Work on wording for C++20 features.
2018 Fall EWG Modules Meeting Seattle 🇺🇸 Design modules for C++20.
2018 Fall LEWG/SG1 Executors Meeting Seattle 🇺🇸 Design executors for C++20.
2018 Fall Meeting San Diego 🇺🇸 C++20 major language feature freeze.
2019 Spring Meeting Kona 🇺🇸 C++20 feature freeze. C++20 design is feature-complete.
2019 Summer Meeting Cologne 🇩🇪 Complete C++20 CD wording. Start C++20 CD balloting ("beta testing").
2019 Fall Meeting Belfast 🇬🇧 C++20 CD ballot comment resolution ("bug fixes").
2020 Spring Meeting Prague 🇨🇿 C++20 CD ballot comment resolution ("bug fixes"), C++20 completed.
2020 Summer Meeting Varna 🇧🇬 First meeting of C++23.
2020 Fall Meeting New York 🇺🇸 Design major C++23 features.
2021 Winter Meeting Kona 🇺🇸 Design major C++23 features.
2021 Summer Meeting Montreal 🇨🇦 Design major C++23 features.
2021 Fall Meeting 🗺️ C++23 major language feature freeze.
2022 Spring Meeting Portland 🇺🇸 C++23 feature freeze. C++23 design is feature-complete.
2022 Summer Meeting 🗺️ Complete C++23 CD wording. Start C++23 CD balloting ("beta testing").
2022 Fall Meeting 🗺️ C++23 CD ballot comment resolution ("bug fixes").
2023 Spring Meeting 🗺️ C++23 CD ballot comment resolution ("bug fixes"), C++23 completed.
2023 Summer Meeting 🗺️ First meeting of C++26.

 


Status of Major C++ Feature Development


NOTE: This is a plan not a promise. Treat it as speculative and tentative.

  • IS = International Standard. The C++ programming language. C++11, C++14, C++17, etc.
  • TS = Technical Specification. "Feature branches" available on some but not all implementations. Coroutines TS v1, Modules TS v1, etc.
  • CD = Committee Draft. A draft of an IS/TS that is sent out to national standards bodies for review and feedback ("beta testing").

Changes since last meeting are in bold.

Feature Status Depends On Current Target (Conservative Estimate) Current Target (Optimistic Estimate)
Concepts Concepts TS v1 published and merged into C++20 C++20 C++20
Ranges Ranges TS v1 published and merged into C++20 Concepts C++20 C++20
Modules Merged design approved for C++20 C++20 C++20
Coroutines Coroutines TS v1 published and merged into C++20 C++20 C++20
Executors New compromise design approved for C++23 C++26 C++23
Contracts Moved to Study Group C++26 C++23
Networking Networking TS v1 published Executors C++26 C++23
Reflection Reflection TS v1 published C++26 C++23
Pattern Matching C++26 C++23

 

Last Meeting's Reddit Trip Report.

 

If you have any questions, ask them in this thread!

 

 

/u/blelbach, Tooling (SG15) Chair, Library Evolution Incubator (SG18) Chair

/u/bigcheesegs

/u/c0r3ntin

/u/jfbastien, Evolution (EWG) Chair

/u/arkethos (aka code_report)

/u/vulder

/u/hanickadot, Compile-Time Programming (SG7) Chair

/u/tahonermann, Text and Unicode (SG16) Chair

/u/cjdb-ns, Education (SG20) Lieutenant

/u/nliber

/u/sphere991

/u/tituswinters, Library Evolution (LEWG) Chair

/u/HalFinkel, US National Body (PL22.16) Vice Chair

/u/ErichKeane, Evolution Incubator (SG17) Assistant Chair

/u/sempuki

/u/ckennelly

/u/mathstuf

/u/david-stone, Modules (SG2) Chair and Evolution (EWG) Vice Chair

/u/je4d, Networking (SG4) Chair

/u/FabioFracassi, German National Body Chair

/u/redbeard0531

⋯ and others ⋯