N4945 Editors' Report -- Programming Languages -- C++

Date: 2022-03-22

Thomas Köppe (editor, Google DeepMind)
Jens Maurer (co-editor)
Dawn Perchik (co-editor, Bright Side Computing, LLC)
Richard Smith (co-editor, Google Inc)

Email: cxxeditor@gmail.com

Acknowledgements

Thanks to all those who have submitted editorial issues and to those who have provided pull requests with fixes. Thank you also to Robert Leahy for drafting motion applications, and special thanks to Johel Ernesto Guerrero Peña for providing in-depth review of many of the draft motion applications.

New papers

National body comments on the Committee Draft

N4919 is the C++23 Committee Draft. It received 137 comments from national bodies. The first set of responses to all 11 editorial comments and to 49 non-editorial comments was incorporated into the previous working draft, N4928; see the previous Editors' Report for details. The present working draft contains the final set of responses, to 26 non-editorial comments, as noted below.

Non-editorial comments

Motions incorporated into working draft

Notes on motions

Core working group polls

CWG Poll 1: Accept as a Defect Report and apply the proposed resolution of all issues except issues 2518, 2521, 2659, 2674, 2678, and 2691 in P2796R0 (Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.

CWG Poll 2: Apply the proposed resolution of issues 2674 and 2691 in P2796R0 (Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.

CWG Poll 3: Accept as a Defect Report and apply the proposed resolution of issue 2518 (Conformance requirements and #error/#warning) in P2796R0 (Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.

CWG Poll 4: Accept as a Defect Report and apply the proposed resolution of issue 2521 (User-defined literals and reserved identifiers) in P2796R0 (Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.

CWG Poll 5: Accept as a Defect Report and apply the proposed resolution of issue 2678 (std::source_location::current is unimplementable) in P2796R0 (Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.

CWG Poll 6: Apply the proposed resolution of issue 2659 (Missing feature-test macro for lifetime extension in range-for loop) in P2796R0 (Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper, resolving NB comment DE 038.

CWG Poll 7: Specify that P2647R1 (Permitting static constexpr variables in constexpr functions) (applied in November, 2022) is no longer a Defect Report.

CWG Poll 8: Apply the changes in P2736R2 (Referencing The Unicode Standard) to the C++ Working Paper, resolving NB comments FR 133 and FR 013.

CWG Poll 9: Accept as a Defect Report and apply the changes in P2788R0 (Linkage for modular constants) to the C++ Working Paper, resolving NB comment US 036.

CWG Poll 10: Apply the changes in P2797R0 (Proposed resolution for CWG2692 Static and explicit object member functions with the same parameter-type-lists) to the C++ Working Paper.

Library working group polls

Poll 1 does not concern the C++ Working Paper.

LWG Poll 2: Apply the changes for all Ready and Tentatively Ready issues in P2789R0 (C++ Standard Library Issues to be moved in Issaquah, Feb. 2023) to the C++ working paper.

LWG Poll 3: Apply the changes for all Immediate issues except 3441 in P2790R0 (C++ Standard Library Immediate Issues to be moved in Issaquah, Feb. 2023) to the C++ working paper.

LWG Poll 4: Apply the changes for the Immediate issue 3441 in P2790R0 (C++ Standard Library Immediate Issues to be moved in Issaquah, Feb. 2023) to the C++ working paper.

LWG Poll 5: Apply the changes in P2770R0 (Stashing stashing iterators for proper flattening) to the C++ working paper. This addresses ballot comment US 126.

LWG Poll 6: Apply the changes in P2164R9 (views::enumerate) to the C++ working paper. This addresses ballot comments FR 021 and US 108.

LWG Poll 7: Apply the changes in P2711R1 (Making multi-param constructors of views explicit) to the C++ working paper.

LWG Poll 8: Apply the changes in P2609R3 (Relaxing Ranges Just A Smidge) to the C++ working paper. This addresses ballot comment US 099.

LWG Poll 9: Apply the changes in P2713R1 (Escaping improvements in std::format) to the C++ working paper. This addresses ballot comments US 098 and FR 134.

LWG Poll 10: Apply the changes in P2675R1 (format's width estimation is too approximate and not forward compatible) to the C++ working paper. This addresses ballot comment FR 012.

LWG Poll 11: Apply the changes in P2572R1 (std::format fill character allowances) to the C++ working paper.

LWG Poll 12: Apply the changes in P2693R1 (Formatting thread::id and stacktrace) to the C++ working paper. This addresses ballot comment FR 023.

LWG Poll 13: Apply the changes in P2679R2 (Fixing std::start_lifetime_as for arrays) to the C++ working paper. This addresses ballot comment CA 086.

LWG Poll 14: Apply the changes in P2674R1 (A trait for implicit lifetime types) to the C++ working paper. This addresses ballot comment GB 089.

LWG Poll 15: Apply the changes in P2655R3 (common_reference_t of reference_wrapper Should Be a Reference Type) to the C++ working paper.

LWG Poll 16: Apply the changes in P2652R2 (Disallow User Specialization of allocator_traits) to the C++ working paper. This addresses ballot comment US 077.

LWG Poll 17: Apply the changes in P2787R1 (pmr::generator - Promise Types are not Values) to the C++ working paper. This addresses ballot comment US 116.

LWG Poll 18: Apply the changes in P2614R2 (Deprecate numeric_limits::has_denorm) to the C++ working paper. This addresses ballot comment DE 079.

LWG Poll 19: Apply the changes in P2588R3 (barrier's phase completion guarantees) to the C++ working paper. This addresses ballot comment DE 135 and US 131.

LWG Poll 20: Apply the changes in P2763R1 (layout_stride static extents default constructor fix) to the C++ working paper.

Noteworthy editorial changes

Minor editorial changes

A log of editorial fixes made to the working draft since N4928 is below. This list excludes changes that do not affect the body text or only affect whitespace or typeface. For a complete list including such changes (or for the actual deltas applied by these changes), consult the draft sources on github.

commit 538ed7470087a1304ec9c04db8b00de1d4f40d03
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Sun Dec 18 21:19:08 2022 +0000

    [lex.ccon] Add xref to lex.charset, where encodings are defined

commit ffd3141ffd278f86209845282548e6e5d9ed21eb
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Mon Dec 19 00:02:24 2022 +0000

    [lex.string] Add xref to lex.charset, where encodings are defined

commit 13fa11859e144ecba44807746cd376c0b33f571f
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Thu Dec 29 02:01:37 2022 +0800

    [range.single.view] Remove duplicate semicolon (#6040)

commit b98b620ec72c67423169782aa197dd0008900154
Author: Eric41293 <eric41293@comcast.net>
Date:   Wed Dec 28 11:07:01 2022 -0700

    [format.string.std] Fixing grammatical error (#6037)

commit c8e334d0632b5e49e7333002ebeb04c58754f2d1
Author: zhihaoy <43971430+zhihaoy@users.noreply.github.com>
Date:   Thu Jan 5 02:40:02 2023 -0800

    [bitwise.operations.not] missing parameter name

commit 0c9dd96bbfc421a0feabcbc2b6850cd369ed181f
Author: Jens Maurer <Jens.Maurer@gmx.net>
Date:   Tue Jan 17 23:16:33 2023 +0100

    [over.over] Missed edit for P0847R7

    P0847R7 (Deducing this) was approved at the October, 2021 meeting
    and applied with commit ee5117e100bbe9b7adb3510b2d7bb6d4d150f810,
    missing this change.

commit 2228f1c619fcd19c61ae6a4378f03f6ee938e55a
Author: Jonathan Wakely <cxx@kayari.org>
Date:   Mon Jan 16 12:11:47 2023 +0000

    [unord.map.overview] Remove stray template-head on non-template

commit b9d35e813c007f3514015017e1ce09d936b5e2cc
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Mon Jan 23 01:43:54 2023 +0800

    [reverse.iter.conv] Remove unclear explicit comments

    I don't know what explicit refers to here, it seems to be more appropriate to remove.
    People who disagree with me are also welcome.

commit b5d9d4f5c5a14a059a8af75428707a0fc14b4c12
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Tue Jan 24 17:20:59 2023 +0800

    [move.sentinel] Use "std::move" in example for correctness (#6043)

commit a009995257307b1ed8894718b70c917f4c25094b
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Thu Jan 26 02:06:35 2023 +0800

    [iterator.synopsis] Fix inconsistent template constraint

commit 388eff69768d3ba97c095de98e9972685f2e3579
Author: Jens Maurer <Jens.Maurer@gmx.net>
Date:   Fri Jan 27 14:30:39 2023 +0100

    [version.syn] Fix value of __cpp_lib_constexpr_bitset

    Paper P2417R2 was approved in July 2022, but commit
    75518ffdc476cbc239918466588d963fc97a8013 did not set
    the feature-test to the approriate value.

commit 9020f7480b2cd0f3c0857b93cab4dbcf44a24edc
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Sun Feb 5 23:30:36 2023 +0800

    [format.range.fmtmap] Fix undefined type name

commit a096b08e6a2ee5544fd753aefd9469673e4864dd
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Tue Jan 31 10:53:18 2023 +0800

    [const.iterators.iterator] Add \expos comment for concept

commit 9ce105b48e34c0e08947ac073694faa6600716ec
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Fri Feb 10 14:52:42 2023 +0800

    [iostream.cons] Add std:: qualified for move

commit 6d836080a380d0f828de30e6449985b5b503d874
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Mon Mar 6 18:28:32 2023 +0000

    [dcl.pre] Add missing markup that makes "fails" a definition.

    This change was missed from the application of CWG2518.

    Also fixes the indexing of "static_assert" (which is a keyword, not a
    grammar production).

commit 9357ba63abeb27152ac7d03db4ba9a274cf2f922
Author: timsong-cpp <rs2740@gmail.com>
Date:   Sun Feb 26 19:52:46 2023 -0600

    [expected.object.eq] Fix typo

commit 586f4ed7fbafeee5b91fcb6c2950008dfffbeec0
Author: Alisdair Meredith <alisdairm@me.com>
Date:   Tue Mar 7 10:34:50 2023 -0500

    [cpp.pre] Fix grammar for #elifdef

    This fix is editorial as it corrects a mis-application of the original
    paper, https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2334r1.pdf.

    Note that the corresponding use of this grammar in [cpp.cond]p13
    assumes the correct grammar, making the intent equally clear.

commit 64ef8b32a5b3ac60e8ac1f28ccb008c704cc25f4
Author: Barry Revzin <barry.revzin@gmail.com>
Date:   Sun Mar 12 10:11:24 2023 -0500

    [expr.prim.req.compound] Move compound requirement example from inner to outer bullet (#6159)

    Example 1 from [expr.prim.req.compound] is currently attached to the
    inner bullet point, but should be attached to the outer one.

commit 5a974f72f43928258a6264155f8932bebb3fea30
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Sun Mar 12 23:17:02 2023 +0800

    [util.smartptr.atomic.general] Simplify example code (#6077)

    Removes the redundant explicit construction of the return value,
    and uses an explicit return type instead of "auto" for clarity.

commit 1912644b1bf60e0c8fc8d53ccbee0488244b1fd3
Author: A. Jiang <de34@live.cn>
Date:   Mon Mar 13 00:02:02 2023 +0800

    [specialized.algorithms.general] Remove possibly wrong note (#6157)

commit 40cfc37319ae4e6204a2237ad6e143fac6911df6
Author: Blackteahamburger <blackteahamburger@outlook.com>
Date:   Mon Mar 13 02:23:01 2023 +0800

    [allocator.requirements.general] Fix SimpleAllocator example (#6152)

    The example now meets the requirements and is minimal.
    Previously, some == comparisons that should work were ambiguous.

commit f131b37fbf412bf2b69690914c2030b3ad702e55
Author: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
Date:   Sun Mar 12 14:27:09 2023 -0400

    [library.general,tab:thread.summary] Update references to renamed Clause (#6149)

commit 71c72b23250d4e3f8c960c345721ba5e6a52f3c1
Author: Giuseppe D'Angelo <dangelog@users.noreply.github.com>
Date:   Sun Mar 12 23:29:23 2023 +0100

    [range.split] Fix invalid conversion in example (#6041)

    Replaces an illegal implicit conversion from a range to string_view
    in the example with an explicit one.

    After P2499R0, it is no longer possible to implicitly construct a
    string_view from a range (like the ones produced by views::split).

commit b1f3246af2a6af4f2b81be9b296feb08ad40962b
Author: Jonathan Wakely <cxx@kayari.org>
Date:   Thu Mar 2 12:58:40 2023 +0000

    Consistent comma after e.g. and i.e. (again)

commit 29c0c3d61be7875e9be08a19d7612a7a2c628ef6
Author: Alex Riegler <53669754+alexriegler@users.noreply.github.com>
Date:   Sun Mar 12 19:59:06 2023 -0500

    [tab:iostreams.summary] Add missing header in summary table (#6079)

    Also reorder the headers into order of appearance,
    which is how the "C library files" headers are ordered.

commit 16dfc43257e15582d7461280b2c896c471e6e431
Author: Mark de Wever <koraq@xs4all.nl>
Date:   Mon Mar 13 02:06:04 2023 +0100

    [time.syn] Use "ymwd" parameter name consistently (#6029)

commit 6298c4b6ad03946ea5a547d375762d5f029cf195
Author: Alisdair Meredith <alisdairm@me.com>
Date:   Tue Mar 7 22:23:05 2023 -0500

    [depr.template.template] Add cross-ref to core language

    Add a cross reference to the core language paragraph that
    contains the deprecation notice, [temp.names] (p6).

commit d9f8705de8aaa61112250d211e7891e91b411dbe
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Sat Dec 31 00:57:08 2022 +0800

    [range.take.overview, range.drop.overview] Remove redundant ranges:: qualifier

commit dcac5eaf993a190a1bb1335217779bd9ef13a38e
Author: Alisdair Meredith <alisdairm@me.com>
Date:   Tue Mar 14 10:46:30 2023 -0400

    [span.iterators] Fix cross-reference to container iterators (#6183)

    The current cross-reference is to [containers.requirements], which
    is the whole containers requirements clause, including not just
    general containers, but also allocator-aware, reversible, sequence,
    associative, and unodered associative containers.  It seems very
    unlikely that the cross-reference expects to be the intersection
    of all of those.

    Rather, the reference seems to intend just the [containers.reqmts]
    subclause, which adds just two useful constraints: random access
    iterators should support the 3-way comparison operator, and the
    interoperabiity of container iterators and const_iterators.

commit 39c1510d443b647c46de3e84d49a21d442154795
Author: Jens Maurer <Jens.Maurer@gmx.net>
Date:   Tue Mar 14 16:12:22 2023 +0100

    [stmt] Fix cross-references for condition

commit 22a3b44cd6d5b0017cb57d8767d9dfc2094735c8
Author: morinmorin <mimomorin@gmail.com>
Date:   Wed Mar 15 01:45:28 2023 +0900

    [projected, alg.req.ind.{move, copy}, range.as.rvalue.overview] Article "an", not "a" (#6186)

    The subsequent identifier is naturally pronounced with a leading vowel.

commit ae8ec6f016e0efcb37104a96f0b0677b850fdd0f
Author: Alisdair Meredith <alisdairm@me.com>
Date:   Thu Mar 16 11:13:43 2023 -0400

    [container.reqmts] Fix cross-references to contiguous container

    This edit deserves describing in detail, to establish that it
    is purely editorial.

    As part of the mission to clean up tables in the standard,
    the general container requirements were split into 5 more
    focused leaf nodes.  Due to its location in the original
    text, the definition for a contiguous container fell into
    the subclause for reversible containers, to which it is
    entirely unrelated.  There is no requirement that a
    contiguous container be reversible, only that it has the
    correct category for its iterators.

    Meanwhile, all 3 of the existing cross-references point
    to the wrong leaf node, that simply provides a key to
    the identifiers used throughout the specification of this
    clause.

    The fix has two parts.  First move the definition of
    contiguous container, and a container with special
    iterators, into the [container.reqmts] clause where it
    best belongs.  This move is appended to the end so that
    there can be no ambiguity that any existing text could
    be confused with requirements only on contiguous
    containers after the edit.  The other part is to fix up
    the three cross-references to point to [container.reqmts]
    rather than its sibling that has no information on
    contiguous containers.

    A grep of the .tex source files confirms that these
    three references (array,basic_string, and vector) are
    the only current uses of contiguous container, even
    though basic_stacktrace would also meet the requirements.

commit f24d86dcb1d597dc65cd10e56e80d23e331a9f1b
Author: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
Date:   Sat Mar 18 20:41:27 2023 -0400

    [range.subrange.general, range.adaptors] Use "present only if" (#6146)