2019-07 Cologne ISO C++ Committee Trip Report β€” πŸš€ The C++20 Eagle has Landed πŸš€ (C++20 Committee Draft shipped; Contracts Moved From C++20 to a Study Group; `std::format` in C++20; C++20 Synchronization Library)

The ISO C++ Committee met in Cologne 🍻 πŸ‡©πŸ‡ͺ last week to complete and publish the Committee Draft (CD) of the next International Standard (IS), C++20. Between now and the next meeting, we will send the Committee Draft to all the national standards bodies and collect their feedback. In the next two meetings, 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:

 

The following notable features have been approved for C++20 at prior meetings:

 

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

 


Contracts


We made the decision this week to move contracts out of C++20 (see P1823, although it is not publicly available as of the time of this post).

Why take contracts out?

  • We have made major design changes to contracts very late in the C++20 process, including at this meeting (see the many recent papers).
  • We were not confident on the impact or implications of these changes.
  • We have insufficient implementation and usage experience with contracts.
  • We have concerns that the changes artificially limited future directions.

In short, contracts were just not ready. It's better for us to ship contracts in a form that better addresses the use cases of interest in a future standard instead of shipping something we are uncertain about in C++20. Notably, this decision was unanimous -- all of contracts’ co-authors agreed to this approach.

We've created a new study group, SG21, to continue work on contracts, which will be chaired by John Spicer, which includes all original authors, as well as many new interested members. All feedback was this feature is highly desirable, will provide a lot of value to a lot of users, and SG21 is committed to delivering that as soon as it’s ready.

 


Language Progress


Evolution Working Group Incubator (EWGI) Progress


The Evolution WG Incubator (EWGI) saw all papers which were ready to be seen over two days, for a total of 18 papers:

There are 9 papers which were seen in a previous meeting, which we did not see because we're waiting for updates. Two other papers did not have presenters available this week, we'll try to see them in Belfast. Finally, one paper dropped from our schedule due to an unreachable author.


Evolution Working Group (EWG) Progress


Evolution met this week to finalize C++20's language features. We worked on the following:

  • Permit unevaluated inline asm in constexpr (approved as a part of C++20)
  • [[nodiscard]] for constructors (made retroactively applicable to C++17)
  • Removed pack support in expansion statements due to discovered ambiguity. You can now only iterate over tuple-like and range-like. Since you cannot iterate over packs, the spelling of for... no longer made any sense and was changed to template for
  • Discussed static, value-based exceptions and encouraged further work on the paper, but discouraged work on try-expressions.
  • Removed requires expressions of the form -> Type, as they don’t entirely match other parts of the language and the functionality can be entirely subsumed by whichever of -> same_as<Type> or -> convertible_to<Type> is actually intended by the concept author.
  • Encouraged further work on simplifying all the name lookup rules in an attempt to remove all the various exceptions and special-cases.

 


Library Progress


Library Evolution Working Group Incubator (LEWGI) Progress


The Library Evolution Incubator met for 3Β½ days this week, and looked at 35 papers targeting C++23, future TSes, and beyond.

We saw the following notable papers this week:

  • Process Management Library - We liked this proposal, and gave the authors guidance on which features to focus on for a minimal version 1.
  • Compositional Numeric Types for a Numerics Technical Specification - We've seen this proposal (and other related ones) before; hopefully it will be headed to a Technical Specification soon!
  • Low Level I/O Library - We haven't decided if we want to pursue this yet; we'll look at it more at the next meeting.
  • std::web_view - We liked this proposal as a solution for providing a modern UI library in the C++ standard; we'll look at it in more detail at the next meeting.
  • Linear Algebra - We looked through the proposal for a linear algebra library based on BLAS and gave the authors some design feedback; this proposal is still young, so we'll see it again in the future.

Happy Birthday Bryce! πŸŽ‚


Library Evolution Working Group (LEWG) Progress


This week LEWG polished the C++ standard library features, processing bugfixes for std::format and std::ranges.

LEWG met together with the concept authors to discuss the renaming from PascalCase to snake_case. We had the unique opportunity to revisit all the names and improve them, developing guidelines for naming to prevent name clashes between concepts and types. As a consequence, the namespace std::ranges::view/ std::view was renamed to std::ranges::views/std::views to free up the name for the View (now std::ranges::view) concept.

C++20 will also now have access to the Ο€ constant and friends, available as std::numbers::pi in <numbers>.

Finally, LEWG started looking at C++23 features. The focus will be on an executors and a better std::error_code, both in preparation for networking. As part of error management, LEWG started to discuss the handling of allocation failures.

We're also spinning up an effort to conduct an inter-meeting review of the Networking Technical Specification to figure out how to modernize it and proceed with it.


Library Wording Group (LWG) Progress


The library group was extremely busy reviewing many papers targeting C++20, and managed to land many of the big papers, such as std::format, the C++20 Synchronization Library, std::jthread, and constexpr all the things.

What happened to my favorite library feature not listed?

Unfortunately, the group was unable to review all papers that Library Evolution approved for C++20, which means they won't make it in.

 


Concurrency and Parallelism Study Group (SG1) Progress


Most of the concurrency & parallelism features for C++20 were actually applied to the Standard at this meeting.

That includes: semaphores (binary and counting), latches, barriers, efficient polling (wait and notify - think: like Futex), the joining thread and its stop token. We did some preventive maintenance in this release also, such as cleanups to release sequences (interact with consume) and volatile (parts of which never worked well).

We’re looking to the future projects now. Up next will be the Concurrency TS2, for which we’ve chosen a scope: concurrent deferred memory reclamation and fibers.

Executors progressed significantly at this meeting. There is now a CONSENSUS (!) design on everything except error handling, and a few TODOs on reconciling bulk executors with the latest changes. This should signal the end of the project slip that began with the Rapperswil meeting, 1 year ago, with the end now in sight.

Finally, so many memory model experts were in attendance! We used this opportunity to process memory model extensions for an entire day.

 


Compile Time Programming and Reflection Study Group (SG7) Progress


We discussed the constexpr based reflection proposal containing novel requires syntax for compile-time value based function overloading. The language feature was sent towards EWG and the authors were encouraged to continue developing a value-based reflection API based on this technique.

We also looked at updates of metaclass paper. At the end of the session we discussed the future of the compile-time metaprogramming in C++ and the proposed code-injection syntax.

 


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


SG12 and WG23 met this week to continue work on their efforts to document vulnerabilities in the C++ programming language.

We also reviewed a number of papers relating to Undefined Behavior:

Finally, we’re extremely interested in the proposal to enumerate language Undefined Behavior.

 


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


SG13 met for two afternoons this week, and reviewed 3 major proposals:

 


Tooling Study Group (SG15) Progress


This week, the Evolution Working Group (EWG) agreed to begin work on a C++ Modules Ecosystem Technical Report, to prepare the C++ community for the transition to C++20 Modules..

SG15 has been very busy since the last meeting, holding eight telecons to work on content for the C++ Modules Ecosystem Technical Report.

We also met for a full day at Cologne, discussing 7 papers for the Technical Report, most notably a proposal on the build system ecosystem and build system interchange and a proposed file format for describing dependencies, which we had consensus to use as the basis for addressing build systems and packaging.

We reached two key conclusions about what content we want in the Technical Report:

  • We want to recommend module naming conventions, but not project structure, file naming conventions, or namespace naming conventions.
  • We want recommendations for implicit builds of modules which do not prescribe a particular project layout or file naming scheme.

 


Unicode and Text Study Group (SG16) Progress


SG16 reviewed 7 papers at this meeting, all targeting a post-C++20 revision of the standard. Two of these papers directly target text processing. For the others, we provided guidance to the paper authors regarding handling of Unicode, character encodings, and file names (since file names do not have associated portable character encodings in general, they are challenging to handle accurately, particularly in text processing).

Standard Text Encoding is exploring new interfaces for transcoding text between various encodings. This is important foundational work necessary to add further Unicode support.

Text Parsing proposes a type-safe and extensible replacement for sscanf, similarly to how std::format is a type-safe replacement for sprintf.

The papers we provided guidance on include proposals for a std::filesystem::path_view class, new process creation interface, 2D graphics support, a file format for describing dependencies, and a paper advising against teaching beginner programmers to use char8_t until more support for this new builtin type is available. Some of these reviews were a collaboration with SG13 (HMI/IO) and SG20 (Education). We enjoyed working with our fellow study groups!

 


Education Study Group (SG20) Progress


SG20 met for a day to continue discussing the formation of curriculum guidelines. We reviewed five papers, four of which target an earlier proposal, the guidelines for teaching C++ to beginners, and one that looks to introduce a new idiom for teaching and safety-critical programming. It’s important to recall that the work that leaves SG20 won’t be included in a C++ standard; it’ll instead be included in a different medium.

The group reviewed Don't use char8_t and std::u8string yet in P1389, and agreed that while teaching students to appreciate UTF-8 string-handling is important, it’s best to hold off until C++ has UTF-8 string-handling support.

We then looked at Fill in [delay.cpp] TODO in P1389, where we agreed that P1389 should adopt recommendations to delay teaching macros until absolutely necessary, and should be integrated into the guidelines.

We encouraged the author of Class Natures for Safety Critical Code: On user-declared and user-defined special member functions to continue working on their proposal, for further consideration in the Belfast meeting.

We finally reviewed Modular Topic Design, which proposes that we replace the rigid stage-based design in P1389 with a far more modular sets of topics. We encouraged the author to continue working on their proposal for further consideration in Belfast.

 


C++ Release Schedule


We've scheduled two additional meetings between now and the next full committee meeting to work on specific parts of C++20.

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
2017 Summer Meeting Toronto πŸ‡¨πŸ‡¦ First meeting of C++20.
2017 Fall Meeting Albuquerque πŸ‡ΊπŸ‡Έ Design major C++20 features.
2018 Spring Meeting Jacksonville πŸ‡ΊπŸ‡Έ Design major C++20 features.
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 CD wording. Start CD balloting ("beta testing").
2019 Fall Meeting Belfast πŸ‡¬πŸ‡§ CD ballot comment resolution ("bug fixes").
2020 Spring Meeting Prague πŸ‡¨πŸ‡Ώ CD ballot comment resolution ("bug fixes"), C++20 completed.
2020 Summer Meeting Varna πŸ‡§πŸ‡¬ First meeting of C++23.
2020 Fall Meeting New York (Tentative) πŸ‡ΊπŸ‡Έ Design major C++23 features.
2021 Winter Meeting Kona πŸ„β€β™‚οΈ 🌊 πŸ‡ΊπŸ‡Έ Design major C++23 features.
2021 Summer Meeting πŸ—ΊοΈ Design major C++23 features.
2021 Fall Meeting πŸ—ΊοΈ C++23 major language feature freeze.
2022 Spring Meeting πŸ—ΊοΈ C++23 feature freeze. C++23 design is feature-complete.

 


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 Incubator (SG17) Chair

/u/arkethos (aka code_report)

/u/foonathan

/u/vulder

/u/hanickadot

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

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

/u/nliber

/u/sphere991

/u/tituswinters, Library Evolution Working Group (LEWG) Chair

/u/HalFinkel, Vice Chair of PL22.16

/u/ErichKeane

/u/sempuki

/u/ckennelly

/u/mathstuf

β‹― and others β‹―