N4972 Editors’ Report:
Programming Languages — C++

Date: 2023-12-18

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, and special thanks to Johel Ernesto Guerrero Peña for providing in-depth review of many of the draft motion applications.

New papers

Motions incorporated into working draft

Notes on motions

All motions were applied cleanly, and the following additional changes applied for the sake of integration:

The feature test macro __cpp_lib_span has been modified both LWG Poll 3 and LWG Poll 10, and is now set to a common, updated value (202311L).

The linear algebra paper P1673R13 moved by LWG Poll 19 adds a substantial amount of material, and numerous minor issues were discovered during application, many of which have been fixed immediately, and some will be addressed in future editorial work. One particular issue, which is not new and also affects the random number and special maths functions, is how to relate variables in code and mathematical variables in a mathematical expression.

Core working group polls

CWG Poll 1: Accept as a Defect Report and apply the proposed resolution of all issues in P3046R0 (Core Language Working Group "ready" Issues for the November, 2023 meeting) to the C++ Working Paper.

CWG Poll 2: Accept as a Defect Report and apply the changes in P2308R1 (Template parameter initialization) to the C++ Working Paper.

CWG Poll 3: Apply the changes in P2662R3 (Pack Indexing) to the C++ Working Paper.

CWG Poll 4: Apply the changes in P2864R2 (Remove Deprecated Arithmetic Conversion on Enumerations From C++26) to the C++ Working Paper.

CWG Poll 5 was withdrawn.

Library working group polls

LWG Poll 1: Apply the changes for all Ready and Tentatively Ready issues in P3040R0 (C++ Standard Library Issues to be moved in Kona, Nov. 2023) to the C++ working paper.

LWG Poll 2: Apply the changes in P0543R3 (Saturation arithmetic) to the C++ working paper.

LWG Poll 3: Apply the changes in P2407R5 (Freestanding Library: Partial Classes) to the C++ working paper.

LWG Poll 4: Apply the changes in P2546R5 (Debugging Support) to the C++ working paper.

LWG Poll 5: Accept as a Defect Report and apply the changes in P2905R2 (Runtime format strings) to the C++ working paper.

LWG Poll 6: Apply the changes in P2918R2 (Runtime format strings II) to the C++ working paper.

LWG Poll 7: Accept as a Defect Report and apply the changes in P2909R4 (Fix formatting of code units as integers (Dude, where's my char?)) to the C++ working paper.

LWG Poll 8: Apply the changes in P0952R2 (A new specification for std::generate_canonical) to the C++ working paper.

LWG Poll 9: Apply the changes in P2447R6 (std::span over an initializer list) to the C++ working paper.

LWG Poll 10: Apply the changes in P2821R5 (span.at()) to the C++ working paper.

LWG Poll 11: Apply the changes in P2868R3 (Remove Deprecated std::allocator Typedef From C++26) to the C++ working paper.

LWG Poll 12: Apply the changes in P2870R3 (Remove basic_string::reserve() From C++26) to the C++ working paper.

LWG Poll 13: Apply the changes in P2871R3 (Remove Deprecated Unicode Conversion Facets from C++26) to the C++ working paper.

LWG Poll 14: Apply the changes in P2819R2 (Add tuple protocol to complex) to the C++ working paper.

LWG Poll 15: Apply the changes in P2937R0 (Freestanding: Remove strtok) to the C++ working paper.

LWG Poll 16: Apply the changes in P2833R2 (Freestanding Library: inout expected span) to the C++ working paper.

LWG Poll 17: Accept as a Defect Report and apply the changes in P2836R1 (std::basic_const_iterator should follow its underlying type's convertibility) to the C++ working paper.

LWG Poll 18: Apply the changes in P2264R7 (Make assert() macro user friendly for C and C++) to the C++ working paper.

LWG Poll 19: Apply the changes in P1673R13 (A free function linear algebra interface based on the BLAS) to the C++ working paper.

Comments on the Draft International Standard

This report includes our final dispositions on the Draft International Standard (DIS) ballot comments for C++23 from national bodies and the ISO secretariat. Some of them only apply to the published standard document and not the working draft, and the corresponding edits do not appear in the working draft commit history. All comments on the ballot were editorial.

Editorial changes

Major editorial changes

A number of editorial changes were made in response to requests from the ISO secretariat during the publication of C++23. We list just a few noteworthy ones.

Minor editorial changes

A log of editorial fixes made to the working draft since N4964 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 a27ede64fef7fda551d480e5a1cf1b9a73832574
Author: S. B. Tam <cpplearner@outlook.com>
Date:   Tue Oct 24 20:55:27 2023 +0800

    [span.cons] Add `std::` for `data(arr)` (#6632)

commit 84c526ebbda74553bf935f35f5594b8d5591bce5
Author: Casey Carter <Casey@Carter.net>
Date:   Mon Oct 30 14:22:57 2023 -0700

    [format.formatter.spec] Add missing include to example (#6636)

    The example code refers to `std::string` directly so it should `#include<string>`.

commit 4a6f2e3f4791c44b8c8f32a75d0bebac4a7b6a9e
Author: Jens Maurer <Jens.Maurer@gmx.net>
Date:   Thu Nov 2 00:53:04 2023 +0100

    [intro.refs] Move nicknames for standards to relevant subclauses

commit dc6eed02986d9c3c6827c710adb577ba0809f939
Author: Krystian Stasiowski <sdkrystian@gmail.com>
Date:   Tue Nov 7 04:32:19 2023 -0500

    [dcl.dcl, over.best.ics, temp.param, class.union.anon] Remove mentions of "storage class" (#3906)

commit 17c09925b2423c596196d3f88a61ff7b4052ef7a
Author: Krystian Stasiowski <sdkrystian@gmail.com>
Date:   Tue Nov 7 01:16:28 2023 -0500

    [class.conv.fct] Fix reference to 'ref-qualifier-seq'

commit 90720a35b0c3d65488d9dc9ecea682c271f43d52
Author: A. Jiang <de34@live.cn>
Date:   Mon Oct 30 09:34:01 2023 +0800

    [queue.syn] Show `formatter` specializations in the synopsis

commit e43aa89a4882f8080fb10c843cdb25c9740b65c7
Author: A. Jiang <de34@live.cn>
Date:   Mon Oct 30 09:36:24 2023 +0800

    [stack.syn] Show the `formatter` specialization in the synopsis

commit 80a8748fd401cfceee804bc96d2bfc518726d2e7
Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
Date:   Thu Oct 12 18:24:21 2023 -0400

    [class.copy.assign] Remove a superfluous note.

    Alternatively we could have added the word "non-object"; or changed
    it to say "An overloaded assignment operator must be a member function";
    but it doesn't seem like it needs to be here at all.

commit c9c69dc54052badeb9b80458027371438d886763
Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
Date:   Thu Oct 12 18:58:39 2023 -0400

    [class.copy.assign] Add some missing "non-object"s

commit 2b5fc2936f12f73e975dbb9f34d3790fe0aa708f
Author: Matt Bentley <mattreecebentley@gmail.com>
Date:   Wed Nov 8 14:56:22 2023 +1300

    [sequence.reqmts] Remove misleading, oversimplified informative text

commit 11334c71244a046f0c29b01dfd79b35f6fea8cc4
Author: Eisenwave <me@eisenwave.net>
Date:   Fri Sep 1 09:29:01 2023 +0200

    [class.copy.elision] improve reference and replace informal term

commit 4feefb62e0419bb52c678389163729959785d44a
Author: Jan Schultke <me@eisenwave.net>
Date:   Wed Nov 8 02:59:01 2023 +0100

    [mem.res.pool.options] Change "field" to "member" (#6479)

commit a700e3b87b00d2673b3cded0a61201d09dfc051a
Author: S. B. Tam <cpplearner@outlook.com>
Date:   Wed Nov 8 10:01:46 2023 +0800

     [version.syn] Bump value of __cpp_lib_constexpr_complex (#6421)

    P1383R2 "More constexpr for <cmath> and <complex>" modifies two headers;
    both __cpp_lib_constexpr_cmath and __cpp_lib_constexpr_complex should be updated.

    This aligns with existing practice in SD6.

commit e9fb04e1c1e67bfb07bf3c61145b9d63a0f0adcf
Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
Date:   Tue Sep 27 15:36:08 2022 -0400

    [dcl.enum] Enumerators don't have "initializers"

commit bc3cb41a36dfff0d2358f4e294be9636590e680e
Author: Krystian Stasiowski <sdkrystian@gmail.com>
Date:   Tue Nov 7 21:08:15 2023 -0500

    [dcl.name] Turn informative wording into note (#3964)

commit 82b2ba6f6245e717cb002a9a836117a918aab36a
Author: Patrick Johnston <gcupcakekid@gmail.com>
Date:   Wed Nov 8 02:10:58 2023 +0000

    [streambuf.general] Remove incorrect "abstract"

    The referenced class template `basic_streambuf` is not abstract.

commit bbaa4a497e03d944fc38279db4d8c47eed7831d9
Author: Jan Schultke <me@eisenwave.net>
Date:   Thu Oct 12 20:51:57 2023 +0200

    [basic.lval] turn reference paragraph into note

commit a03b8b70d6666b67d27c801b68d41683e987e929
Author: Alisdair Meredith <alisdairm@me.com>
Date:   Thu Oct 5 15:27:29 2023 -0400

    [temp.param] Introduce term to xref structural type

    The current cross-references to [temp.param] appear confusing,
    as the structural type definition is buried a couple of pages
    below.  Also, this change looks clearer in the source.

commit 71ee18ab8cd9efca0d8afa1f6e639cb02610a52b
Author: Alisdair Meredith <alisdairm@me.com>
Date:   Tue Nov 7 16:18:40 2023 -1000

    [basic.types.general] Introduce term to xref implicit-lifetime type (#6591)

commit 21454c7ebf67a1a723b61c32901a842c684e6b94
Author: Language Lawyer <language.lawyer@gmail.com>
Date:   Wed Aug 23 01:35:22 2023 +0500

    [intro.races] Make reading atomic objects nondeterministic

commit df26017a6bfd74d794345ea9313eae1efacbf7c9
Author: Jan Schultke <me@eisenwave.net>
Date:   Wed Nov 8 03:31:10 2023 +0100

    [diff.dcl] Replace 'field initializers' with 'member initializers' (#6482)

commit cc69fc0dd6b1a2fdc834bade578acb84cc7d2cfa
Author: A. Jiang <de34@live.cn>
Date:   Wed Nov 8 10:54:52 2023 +0800

    [intro.races] Remove inappropriate uses of "shall" (#6457)

commit 60e280391a06b8d27f778a56310b0827109623aa
Author: Eisenwave <me@eisenwave.net>
Date:   Thu Aug 31 00:19:24 2023 +0200

    [cmath.syn] fix misaligned parameter lists

commit 646bfb2a060e3c7f490f6c4672ee93a0cbaf6d0d
Author: Alisdair Meredith <alisdairm@me.com>
Date:   Wed Nov 8 05:59:28 2023 -1000

    [container.alloc.reqmts] Better xrefs for allocator-aware containers

    There are now more allocator-aware containers in the standard
    than when this subclause was first written, so ensure we have
    call outs to all relevent subclauses.

    The current wording for 'basic_stacktrace' also shows how
    containers can properly call out the allocator-aware container
    requirements, now that they have their own, titled subclause.

commit 62e33ca8a0a55764227e6a67c1f554783ffefe40
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Thu Nov 9 00:01:38 2023 +0800

    [time.zone.leap.overview] Fix example (#6383)

commit 07ae51af31587ac533b1b39c95777ecb725dcab0
Author: A. Jiang <de34@live.cn>
Date:   Wed Jan 25 18:22:53 2023 +0800

    [expr.prim.req.general] Correct the IFNDR example

commit f3059744c84f561f8ead4c5d117bc1160c43b7e2
Author: Jonathan Wakely <cxx@kayari.org>
Date:   Wed Nov 8 23:52:44 2023 +0000

    [defns.character.container] Improve note to entry (#6644)

commit 8b38857b22f6518a41e506e4c9b2e9a1792a0fbd
Author: A. Jiang <de34@live.cn>
Date:   Tue Oct 10 09:40:20 2023 +0800

    [iterator.requirements.general] Clarify non-forward iterator

commit fbb1a6ebbd1f78e644df2dbcb3ce31250410779e
Author: onihusube <44743040+onihusube@users.noreply.github.com>
Date:   Fri Nov 10 08:36:12 2023 +0900

    [execpol.unseq] Fix missing \itemdescr (#5931)

commit 10e2799f5d524dd941d424dfd08927c77a6b87f1
Author: Alisdair Meredith <alisdairm@me.com>
Date:   Fri Feb 17 10:47:28 2023 -0500

    [pairs.pair] Consistent wording for assignment

    Apply a consistent pattern to how we specify assigning members in assignment operators.

commit 78300aa38c23f1356dca8e786205e5aaf7769d01
Author: Barry Revzin <barry.revzin@gmail.com>
Date:   Thu Nov 9 14:45:17 2023 -1000

    [class.compare] Don't introduce `V` for the return value (#6035)

    In both cases, I'm not sure introducing `V` helps much - just requires name lookup for `V`. If we just say "the return value" in every case, I think that's clearer.

commit 838cb0649b1f4061e960772aee3563cedb20b108
Author: Michael Florian Hava <mfh@live.at>
Date:   Thu Nov 9 13:51:58 2023 -1000

    [basic.extended.fp] Replaced usage of 'mantissa' with 'significand'
    according to SO/IEC/IEEE 60559:2008

commit ce5ef1b5334f1fc756d40e40ec300257b0ff99d9
Author: Michael Florian Hava <mfh@live.at>
Date:   Thu Nov 9 13:57:32 2023 -1000

    [numeric.limits.members] Replaced usage of 'mantissa' with 'significand' according to
    SO/IEC/IEEE 60559:2008

commit 3e1f377a9dc3bece7acd2dddb7237065504db65c
Author: Brian Bi <bbi5291@gmail.com>
Date:   Thu Nov 9 16:00:22 2023 -1000

    [macros, styles] Add \hypertarget to headings (#6516)

    This allows forming URLs with a stable label as a fragment and
    have PDF viewers jump to the corresponding (sub)clause.

    For example: std.pdf#basic.life

commit 60f7bb72cdd36e9d359fa7aea84a5b836079a0ed
Author: Eisenwave <me@eisenwave.net>
Date:   Thu Jul 6 13:41:56 2023 +0200

    [namespace.std] convert (a) and (b) notation to items

commit f48f316c42c6cb67058d9f9106852154497b4516
Author: Jan Schultke <me@eisenwave.net>
Date:   Fri Nov 10 06:57:17 2023 +0100

    [atomics.order] Use "recommended practice" (#6380)

commit 1ec1d9e6fa98734b3edf20f6c2217a4482f78103
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Fri Nov 10 16:59:21 2023 +0800

    [meta.{unary.prop.query,trans.arr] Use `static_assert` instead of `assert` in example

commit bd8f4540720e52dab9187a62c5598e735aeacfdd
Author: Eisenwave <me@eisenwave.net>
Date:   Sat Aug 19 15:57:39 2023 +0200

    [expr.sizeof] use constexpr member in example

commit b1f922a126dcda78acb4bae055843e7a7321fe1d
Author: Eisenwave <me@eisenwave.net>
Date:   Wed Aug 23 13:42:39 2023 +0200

    [basic.def.odr] Fix hyphenation of "{copy,move} assignment"

commit 54e465a17adfcba56a57ff2fefe43ec898725efb
Author: Eisenwave <me@eisenwave.net>
Date:   Wed Aug 23 13:43:46 2023 +0200

    [res.on.arguments] Fix hyphenation of "move assignment"

commit 3c5b5b0c58d0440233d992e1a0791a449936f203
Author: Eisenwave <me@eisenwave.net>
Date:   Wed Aug 23 13:44:40 2023 +0200

    [futures.{unique,shared}.future] Fix hyphenation of "{copy,move} assignment"

commit 9483cb7cf6973689ad563d30778d8da2dff42a8d
Author: Jonathan Wakely <cxx@kayari.org>
Date:   Wed Nov 8 22:57:57 2023 +0000

    [string.capacity] Remove parentheses from "reserve()"

    It's very confusing to talk about `reserve()` when describing a call to
    `reserve(size_type)`, given that the overload `reserve()` also exists.

commit 2a9f28670a0df6e239d9b335bdb014f20f577732
Author: lprv <100177227+lprv@users.noreply.github.com>
Date:   Mon Jul 24 16:19:01 2023 +0000

    [dcl.meaning.general] Use 'declarator-id' instead of 'name'

commit d8b72f0ceb36b3537ef576ab216d588642e332ab
Author: lprv <100177227+lprv@users.noreply.github.com>
Date:   Tue Jul 25 18:26:03 2023 +0000

    [module.global.frag] Simplify wording

    Also make variable order consistent across bullets.

commit f0c172c5604b47c3ecc7b64669aad660df403624
Author: Oliver Rosten <oliver.rosten@gmail.com>
Date:   Fri Nov 10 18:12:06 2023 +0000

    [algorithms] Change stable label "mismatch" to "alg.mismatch" (#6653)

commit d97603a90d2fcfeec2caf4371ca9e6c8f562842a
Author: A. Jiang <de34@live.cn>
Date:   Sat Nov 11 03:21:17 2023 +0800

    [forward.iterators] Use "Cpp17" requirement (#6612)

commit f474227b69d10350999a5fc63503725421a89954
Author: Geng Cheng <xmcgcg@qq.com>
Date:   Sat Nov 11 10:25:39 2023 +0800

    [stringstream.general] Add missing template argument "Allocator" (#6560)

commit f5fdfe453e5a1e0370f2cb28bfc2dfeecab6370e
Author: Alisdair Meredith <alisdairm@me.com>
Date:   Wed Nov 8 15:12:16 2023 -1000

    [diff.cpp20.library] Add missing new headers for C++23

commit 38dfe3db0f08bd09a2b445ba82e83f7caae28d94
Author: A. Jiang <de34@live.cn>
Date:   Thu Nov 9 11:00:44 2023 +0800

    [dcl.init.ref] Clarify "related type"

    "Related type" is not a term, "reference-related type" is clearer.

commit 979983929bb592c02c9ae3e52f1c676dd5ae06fe
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Tue Nov 14 02:27:01 2023 +0800

    [range.cartesian.view] Don't name unused template parameter (#6177)

commit ecbeb5ad4e4c0ac1d0cdb5e8dd01daab8df8d62e
Author: Alisdair Meredith <alisdairm@me.com>
Date:   Tue Nov 14 14:27:27 2023 -0500

    [diff.cpp23.library] Entry for new headers in C++26 (#6648)

commit eb7f0bcbff2af109643089ef36dfe67040a27f4a
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Mon Nov 13 01:12:50 2023 -1000

    [intro.defs, macros] Add cross-references among definitions

    Fixes ISO/CS 017 (C++23 DIS).

commit 706880e4ed855ae76d503c70adfb0015bbfb3df0
Author: Lewis Baker <lewissbaker@users.noreply.github.com>
Date:   Thu Nov 16 10:36:25 2023 +1030

    [allocator.requirements.general] Fix missing ellipsis (#6695)

commit 5c0103c0a656cbcd725780388b0879e992a1b21a
Author: Jonathan Wakely <cxx@kayari.org>
Date:   Thu Nov 16 15:38:47 2023 +0000

    [stacktrace.format], [stacktrace.basic.hash] change rSec3 to rSec2

    These should not be nested below std::basic_stacktrace because they
    apply to both std::stacktrace_entry and std::basic_stacktrace.

commit a6ad6083ab75901cb41b5bc8d034c0b322433457
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Tue Dec 5 23:42:23 2023 +0000

    [std, styles] Adjust table captions as per ISO request

    ISO has asked for captions to be bold and table numbers to be
    separated by a dash.

commit f519ea4aa97592703ba5bbe9164242d946723721
Author: Jens Maurer <Jens.Maurer@gmx.net>
Date:   Thu Dec 7 01:00:53 2023 +0100

    [intro.refs, time.format] Update references from ISO 8601:2004 to ISO 8601-1:2019 (#6720)

commit 37956fb3685c2c279bd6b4b701964b20913d0c79
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Wed Dec 6 19:01:29 2023 +0000

    [syntax] Change "italic" to "italic, sans-serif"

    We changed the grammar non-terminal font to sans-serif,
    so we should update the description.

commit 4eed7a0f1e44c45554f8a210af34fd6e1ea19596
Author: Jens Maurer <Jens.Maurer@gmx.net>
Date:   Thu Dec 7 22:13:35 2023 +0100

    [intro.abstract] Actually use the phrase 'unspecified/undefined behavior'

    Fixes ISO/CS 011 (C++23 DIS).

commit f8a6138da1e431779ac43a893faa32f3f0cad7d0
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Thu Dec 7 12:45:11 2023 +0000

    [intro.defs] Fix introductory text according to ISO rules.

    In principle, "symbols and abbreviated terms" can be listed in a
    standard, and can be listed in a separate clause or in a combined
    clause 3 "Terms, definitions, symbols and abbreviated terms", we do
    not actually need symbol definitions. In any case, the introductory
    text would never mention "symbols".

commit 9961cd4f16aca645c77d6927526ea71f635a2932
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Thu Dec 7 00:01:48 2023 +0000

    [introduction] A minimal "Introduction" clause

    This clause explains our conventions regarding stable labels and
    choice of fonts.

commit 9041b27206388fecd03073bb913185ac738c6dca
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Mon Dec 18 00:57:45 2023 +0000

    [optional.monaic] Restore wording effected by LWG3973.

    Both LWG3973 (Motion 1) and P2407R5 (Motion 3) modified this wording:
    LWG3973 changes "value()" to "*val" to address ADL concerns, and
    P2407R5 changed "value()" to "**this" to be freestanding. In light of
    the former, the latter should also use "*val".

    Independently, additional problems have been discovered with LWG3973,
    but those will be addressed by a future LWG issue.

commit 2b1867a3404562c4261722e0a913cbcbf5a0a476
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Sun Dec 17 23:10:44 2023 +0000

    [version.syn] New feature test macro __cpp_lib_freestanding_numeric

    This macro indicates that freestanding support for "saturation
    arithmetic" is available, which was added in motion LWG-2 (via
    P0543R3). This reverts the previous change
    148e03a16d53ff8cffd219384df37efad5fd386d, which I had made subsequent
    to motion LWG-3 (P2407R5), on advice of LWG. A separate macro is
    preferable to mixing both headers under "algorithm".

commit fa54f9e7306b3d0abb21a82b5cc951711c96161f
Author: Jonathan Wakely <cxx@kayari.org>
Date:   Wed Dec 13 11:03:18 2023 +0000

    [range.access.general] Use consistent "In addition to being available ..." form

    Elsewhere we say "the header" or "any of the headers", e.g. [meta.trans.other],
    [tuple.helper], etc.

commit 8c611593555b93a45a13543ad265d8cfaf646932
Author: Cassio Neri <cassio.neri@gmail.com>
Date:   Mon Nov 27 19:47:29 2023 +0000

    [expected.general] Fix description of expected<T, E> (issue #6714.)

commit 12565ed5ea083761b25df3c8325989f95fa04898
Author: Po-yao Chang <poyaoc97@gmail.com>
Date:   Wed Nov 22 23:02:49 2023 +0800

    [class.eq] Fix the return value of a defaulted == operator function