1. Executive summary
Most time was spent in ballot resolution for C++20, to address National Body comments in [N4844].
2. Work highlights
Language Evolution received roughly 100 National Body comments. We did at least one round of discussion on all of these comments.
-
Concepts: allow requires clauses on non-template friend functions of class templates.
-
Coroutines: most comments rejected, a few sent away to write a paper.
-
Undefined Behavior: deferred addressing all comments to C++23.
-
Feature test macros: comments were addressed.
-
Modules: many comments, including fixing issues around header units.
-
Changed how non-type template parameters work: allow types with all public members, all of which can themselves be used as NTTPs. This allows array members, reference members, pointers and references to subobjects, floating-point, and unions.
-
Began discussing some papers targeted at C++23.
3. National Body comment details
Miscellaneous NB comments:
- Late-CH01 — 11.3.5 [class.copy.assgn] p2,5 Defaulted copy and move assignment should have ref-qualifier rejected
- FR222 — 20.15.10 Replace std::is_constant_evaluated with "if consteval" P1938 rejected
- US129 — 15.1 Rename __has_cpp_attribute to __has_attribute rejected
- US056 — 09.03 [dcl.init] Revert P0960 (parenthesized initialization of aggregates) accepted
- US055 — 09.02.3.5 [dcl.fct].18 Parameter with placeholder-type-specifier and default argument is valid but useless rejected
- GB051 — 08.05.4 Range-based for-loop should use ranges::begin/end rejected
- US040 — 06.06.2 [intro.object] Adopt implicit object creation P0593 accepted
- RU011 — [dcl.fct.def.general].8 Make
usable in constant expressions rejected__func__ - RU007 — [basic.life].8.3 Relax pointer value / aliasing rules accepted
- US212 — 20.07.3.1 [variant.ctor] Suprising variant construction LWG3228 forwarded by CWG, accepted as proposed by CWG
using enum:
- US043 — 06.08 [basic.def].2.17 "using enum" feature is too subtle rejected
- US070 — 09.06.2 [enum.udecl] Keep the "using enum" language feature in C++20 not relevant given above rejection
Non-type template parameters:
- US114 — 13.05 p1.5 Class types as non-type template arguments accepted
- US102 — 13.1 p4.1 Allow non-type template parameters of floating-point type P1714 with US114
- US092 — 11.10.01 [class.compare.default] p04.2.1 Array members should have strong structural equality with US114
- US091 — 11.10.01 p04.1 Strong structural equality for enums rejected
Concepts:
- CA378 — Remove constrained non-template functions accepted
- US115 — 13.6.4 [temp.friend] Hidden non-template friends need a requires-clause accepted
- US111 — 13.04.3 p1 Constraint normalization should also normalize negation accepted
- PL103 — 13.01 [temp.param] Elaborate syntax for constrained type template parameters rejected
- US098 — 13 p6 Concept
as type-constraint vs. id-expression rejected - US058 — 09.04.1 Validity of bodies of non-templated functions with unsatisifed constraints accepted CWG with CA378 accepted
- GB046 — 07.05.4 Allow caching of evaluations of concept specializations will see in Prague
- RU012 — [expr.prim.req].6 Incomplete types in requires-expressions should be ill-formed rejected
Coroutines:
- US370 — Remove coroutines, revert P0912 rejected
- BG049 — 7.06.2.3 p3.7 Remove await_suspend() that returns void/bool rejected
- BG369 — 07.06.2.3 p6 Do not use await_suspend returning void in example rejected
- FR068 — 09.05.4 Rename promise_type::final_suspend rejected
- FR067 — 09.05.4 Reduce number of coroutines customization points P1477 rejected
- US062 — 09.04.4 [dcl.fct.def.coroutine].5 Make unhandled_exception in promise types optional will see in Prague
- FR066 — 09.05.4 Make unhandled_exception in promise types optional with US062
- US061 — 09.04.4 p10 Coroutine allocation should consider std::align_val_t will see in Prague
- BG059 — 09.04.4 Consistent naming for get_return_object, initial_suspend, final_suspend rejected
- BG060 — 09.04.4 Fix names of Promise functions rejected
- BG048 — 07.06.2.3 Rename await_suspend and await_resume rejected
- US071 — 09.09.4 [dcl.fct.def.coroutine] p1 Rename coroutine keywords away from co_ P1485 rejected
- FR179 — 7.12.03.2 Remove coroutine_handle::from_/address rejected
- FR001 — Allow separation of coroutine_handle and suspend points rejected
- BG180 — 17.12.05 Fix example using await_suspend rejected
Undefined Behavior:
- US368, US149, US148, US145, US144, US143, US142, US141, US131, US130, US027, US024 — Undefined Behavior in the preprocessor rejected
- RU008 — [class.cdtor].2 Clarify value of *this during construction rejected
Modules: seen by SG2, mostly accepted their recommendations.
Unicode:
Feature test macros:
All addressed by [P1902r1].
- US150 — 15.10 [cpp.predefined] Add feature-test macro for "familiar template syntax for generic lambdas" P1902 accepted
- GB147 — 15.10 Add a feature-test macro for "consteval" P1902 accepted
- GB146 — 15.10 Add a feature-test macro for concepts P1902 accepted
4. C++23 discussions
We started discussing a few papers which could make it to C++23.
-
Floating-point types from [P1467r2] and [P1468r2] received strong support.
-
[P1105r1] freestanding: there’s ongoing interest in better supporting freestanding targets, and we gave direction to the author.
-
[P1371r1] Pattern matching: moving along, but the authors need help with implementation / usage experience if we want this to make C++23.
-
[P1040r4]
: was seen by this group and others, and received confusing feedback, though most many people agree there’s something useful to be had here.std :: embed -
[P1219r2] Homogeneous variadic function parameters: did not receive sufficient support to move forward.
-
[P1097r2] Named character escapes: received feedback, will see again.
-
[P1895r0] tag_invoke: A general pattern for supporting customisable functions: the general feeling was that there were some concerns with a library-only solution to the problem. Several interested parties are planning on working with the paper authors to try to come up with such a language feature.
-
[P1676r0] C++ Exception Optimizations. An experiment: informative discussion.
-
[P1365r0] Using Coroutine TS with zero dynamic allocations: informative discussion.
-
[P1046r1] Automatically Generate More Operators: received feedback, fairly positive.
-
[P1908r0] Reserving Attribute Names for Future Use: accepted, sent to CWG.
-
[P0876r9]
- fibers without scheduler: targets a TS. Gave feedback, will see again.fiber_context -
[P1061r1] Structured Bindings can introduce a Pack: approve of general direction.
-
[P1839r1] Accessing Object Representations: approve of general direction.
5. Near-future EWG plans
There will still be some ballot resolution work in Prague, to address comments which we discussed but haven’t resolved in Belfast. There will be no further ballot resolution after Prague.
Ballot resolution will likely take a small portion of our time. Once that is done, Language Evolution will switch into full C++23 mode, likely following the plans outlined in [P0592r3]. These plans were discussed in multiple groups and received strong support.