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

Date: 2023-08-14

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. In a small number of cases, the approved wording was based on an older draft and needed reconciliation with intervening changes, but it was clear how to do this.

Core working group polls

CWG Poll 1: Accept as Defect Reports and apply the proposed resolutions of all issues in P2922R0 (Core Language Working Group "ready" Issues for the June, 2023 meeting) to the C++ Working Paper.

CWG Poll 2: Accept as a Defect Report and apply the changes in P2621R2 (UB? In my Lexer?) to the C++26 Working Paper.

CWG Poll 3: Accept as a Defect Report and apply the changes in P1854R4 (Making non-encodable string literals ill-formed) to the C++26 Working Paper.

CWG Poll 4: Apply the changes in P2361R6 (Unevaluated strings) to the C++26 Working Paper.

CWG Poll 5: Apply the changes in P2558R2 (Add @, $, and ` to the basic character set) to the C++26 Working Paper.

CWG Poll 6: Apply the changes in P2738R1 (constexpr cast from void*: towards constexpr type-erasure) to the C++26 Working Paper.

CWG Poll 7: Accept as a Defect Report and apply the changes in P2915R0 (Proposed resolution for CWG1223) to the C++26 Working Paper.

CWG Poll 8: Accept as a Defect Report and apply the changes in P2552R3 (On the ignorability of standard attributes) to the C++26 Working Paper.

CWG Poll 9: Accept as a Defect Report and apply the changes in P2752R3 (Static storage for braced initializers) to the C++26 Working Paper.

CWG Poll 10: Apply the changes in P2741R3 (User-generated static_assert messages) to the C++26 Working Paper.

CWG Poll 11: Apply the changes in P2169R4 (A nice placeholder with no name) to the C++26 Working Paper.

Library working group polls

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

LWG Poll 2: Apply the changes in P2497R0 (Testing for success or failure of <charconv> functions) to the C++ working paper.

LWG Poll 3: Apply the changes in P2592R3 (Hashing support for std::chrono value classes) to the C++ working paper.

LWG Poll 4: Apply the changes in P2587R3 (to_string or not to_string) to the C++ working paper.

LWG Poll 5: Apply the changes in P2562R1 (constexpr Stable Sorting) to the C++ working paper.

LWG Poll 6: Apply the changes in P2545R4 (Read-Copy Update (RCU)) to the C++ working paper.

LWG Poll 7: Apply the changes in P2530R3 (Hazard Pointers for C++26) to the C++ working paper.

LWG Poll 8: Apply the changes in P2538R1 (ADL-proof std::projected) to the C++ working paper.

LWG Poll 9: Apply the changes in P2495R3 (Interfacing stringstreams with string_view) to the C++ working paper.

LWG Poll 10: Apply the changes in P2510R3 (Formatting pointers) to the C++ working paper.

LWG Poll 11: Apply the changes in P2198R7 (Freestanding Feature-Test Macros and Implementation-Defined Extensions) to the C++ working paper.

LWG Poll 12: Apply the changes in P2338R4 (Freestanding Library: Character primitives and the C library) to the C++ working paper.

LWG Poll 13: Apply the changes in P2013R5 (Freestanding Language: Optional ::operator new) to the C++ working paper.

LWG Poll 14: Apply the changes in P0493R4 (Atomic maximum/minimum) to the C++ working paper.

LWG Poll 15: Apply the changes in P2363R5 (Extending associative containers with the remaining heterogeneous overloads) to the C++ working paper.

LWG Poll 16: Apply the changes in P1901R2 (Enabling the Use of weak_ptr as Keys in Unordered Associative Containers) to the C++ working paper.

LWG Poll 17: Apply the changes in P1885R12 (Naming Text Encodings to Demystify Them) to the C++ working paper.

LWG Poll 18: Apply the changes in P0792R14 (function_ref: a type-erased callable reference) to the C++ working paper.

LWG Poll 19: Apply the changes in P2874R2 (Mandating Annex D) to the C++ working paper.

LWG Poll 20: Apply the changes in P2757R3 (Type checking format args) to the C++ working paper.

LWG Poll 21: Apply the changes in P2637R3 (Member visit) to the C++ working paper.

LWG Poll 22: Apply the changes in P2641R4 (Checking if a union alternative is active) to the C++ working paper.

LWG Poll 23: Apply the changes in P1759R6 (Native handles and file streams) to the C++ working paper.

LWG Poll 24: Apply the changes in P2697R1 (Interfacing bitset with string_view) to the C++ working paper.

LWG Poll 25: Apply the changes in P1383R2 (More constexpr for <cmath> and <complex>) to the C++ working paper.

LWG Poll 26: Apply the changes in P2734R0 (Adding the new 2022 SI prefixes) to the C++ working paper.

LWG Poll 27: Apply the changes in P2548R6 (copyable_function) to the C++ working paper.

LWG Poll 28: Apply the changes in P2714R1 (Bind front and back to NTTP callables) to the C++ working paper.

LWG Poll 29: Apply the changes in P2630R4 (submdspan) to the C++ working paper.

Editorial changes

Noteworthy changes

Some Unicode examples of the new formatting facilities had been missing from the last few working drafts (but are present in the C++23 DIS) because they needed some bespoke handling. This has now been integrated into the main branch, and the examples now appear correctly in the working draft. (The examples are generated with LuaTeX. As a side effect, the typeface used in existing diagrams has been changed to match the one used for the main body text. We have also explored switching the typesetting engine for the main document from eTeX to LuaTeX. This is possible in principle, but results in slightly lower typographic quality at the moment, so we are holding off on this and will revisit this change in the future.)

The title of the working draft has been changed to "Working Draft, Programming Languages — C++", to match the official title of the standard more closely.

Minor editorial changes

A log of editorial fixes made to the working draft since N4950 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 abb81facf56f82a7487b3f64ae337ce2802c4bf3
Author: Jens Maurer <Jens.Maurer@gmx.net>
Date:   Fri May 12 09:38:16 2023 +0200

    [intro.execution] Fix bad function call in example

commit 42f21d84fb374b11d44c0b367bda649636128b6a
Author: Andrew Rogers <adr26__github@nunsway.co.uk>
Date:   Wed Apr 19 01:03:57 2023 +0100

    [dcl.init.aggr] Add missing apostrophe

commit 4514233a48954d0fd0669236cc986640e33feb04
Author: lprv <100177227+lprv@users.noreply.github.com>
Date:   Fri May 12 23:14:43 2023 +0200

    [basic.compound] Fix cross-reference for 'incomplete type' (#6210)

commit 4fac9f97a2c25d39a01f75cf198d0783bfa8deda
Author: Jonathan Wakely <cxx@kayari.org>
Date:   Tue May 16 17:01:51 2023 +0100

    [strings], [unord.req.general], [stringbuf.members]: Fix xrefs to [container.requirements.general]

    All the references for "qualifies as an input iterator" and "qualifies
    as an allocator" are supposed to be to [container.reqmts] p69 which
    begins:

    > The behavior of certain container member functions and deduction
    > guides depends on whether types qualify as input iterators or
    > allocators.

    The reference in [string.require] for obtaining an allocator should be
    to [container.reqmts] p64.

    The reference in [string.require] Note 2 should be to
    [container.requirements.pre] p3.

    Fixes #6184

commit 1be4801ac1f90aca9a8f5804a48e8bcd082f5bb9
Author: lprv <100177227+lprv@users.noreply.github.com>
Date:   Thu Jun 1 20:57:05 2023 +0200

    [lib] Refer to exposition-only function templates as templates, not functions (#6265)

     * [tuple.apply]/1, /4
     * [expected.object.assign]/1
     * [iterator.cust.swap]/2
     * [specialized.algorithms.general]/3

commit c0685a584ea51d3e47381478a750729da3202b37
Author: Géry Ogam <gery.ogam@gmail.com>
Date:   Tue Jun 13 18:21:59 2023 +0200

    [basic.lval] Reword the misused term ‘classifications’ (#4913)

commit ae4cba4dc8ee2437f39a451268ad6bc924076da0
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Tue Jun 20 13:29:38 2023 +0100

    [cover-wd] A more appropriate title, and better line spacing

commit 7e7afe0965e4e16ff651167212ea05ed9c0ef788
Author: Eisenwave <me@eisenwave.net>
Date:   Thu Jul 6 12:45:54 2023 +0200

    [expr.mul] Add missing commas (#6366)

commit 384d36a0d30e6a8050e23f7193db40fb56ff4f06
Author: Jonathan Wakely <cxx@kayari.org>
Date:   Thu Jul 6 20:45:10 2023 +0100

    [filebuf.virtuals] fix "if width if less than zero" typo

commit 964015779245341d64d93bbd0d1e11f050b32e70
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Mon Jul 10 18:53:10 2023 +0800

    [time.duration.cons] Fix duplicate definition in example (#6372)

commit e6c2f8fb0d5ad6cda3e2d3da63bd5d5e434635b4
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Tue Jul 18 23:16:59 2023 +0100

    [diff.cpp23.expr] Fix environment ("example" should be "codeblock")

commit 2109f579cc6749d19ddf9cf892e8aec4762ba344
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Fri Jul 21 16:21:54 2023 +0100

    [locale.general] Add cross-references to class synopsis

commit c2e05a4080e8c79bcc9971054ca6fb6ae9b3e722
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Fri Jul 21 17:05:10 2023 +0100

    [functional.syn] Tweak cross-references in class synopsis

commit 8334cc876d29595f0f2796a6de42acae937d8377
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Fri Jul 21 23:29:54 2023 +0100

    [functional.syn, func.wrap.move] Hyphenate "move-only wrapper"

commit 7fb62d5f50bfbfc159df4ca0af932ee82d26bc41
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Fri Jul 21 18:13:28 2023 +0100

    [version.syn] Rename smart_pointer_owner_equality to smart_ptr_owner_equality

    For consistency: the use of "ptr" is already prevailing.

commit 56a6b7fe068726ace9196366c968cc679653cc04
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Wed May 17 23:27:22 2023 +0800

    <ranges> Add missing colon for the Effects: Equivalent to return format

commit a34d2e08bda9b1314ecec1b608745a88a678d664
Author: vasama <git@vasama.org>
Date:   Wed Jun 7 11:01:02 2023 +0300

    [expr.pre] Clarify note on pointer subtraction

commit 96f695aea7589a62e5ebb55a18a40f985f7d89ce
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Tue Jun 13 09:18:01 2023 +0300

    [basic.def.odr] Restructure requirements in p14-p15

commit ebba9f316ddd8c120608447b00ea32bf3926a18d
Author: Jonathan Wakely <cxx@kayari.org>
Date:   Sun Jul 23 02:29:17 2023 +0100

    [func.wrap.func.general, func.wrap.move.class] Remove redundant declaration (#6273)

    We don't need to repeat the declarations of the incomplete primary
    template, they are already present in the <functional> synopsis.

commit e6bd946d953b76e908a8e853d93834572c125d59
Author: Richard Smith <richard@metafoo.co.uk>
Date:   Fri Jul 14 13:31:47 2023 -0700

    [basic.scope.scope] Avoid hard-to-read except...unless construction.

    Factor out a name for the "unless" condition to avoid the double-negative.

commit 3769c701daf9ae38f8db054670106abca7c03d32
Author: Roger Orr <rogero@howzatt.co.uk>
Date:   Tue Jul 18 23:54:34 2023 +0100

    [dcl.ambig.res] fix double declaration of 'y' in example

commit 0bf51a3bc5c24b070265412c32e53a0060d73eef
Author: Christian Trott <crtrott@sandia.gov>
Date:   Sat Jul 22 19:33:41 2023 -0600

    [mdspan.layout.stride.cons] Fix missed rename of template parameter (#6385)

    "LayoutStrideMapping" should say "StridedLayoutMapping".

commit f8feaa6e5bc8e6d28e00c06a3de305f80f395913
Author: Eelis van der Weegen <eelis@eelis.net>
Date:   Fri Jul 21 11:43:39 2023 +0200

    [version.syn] Fix header references.

commit 872bda08678d1aeecfc555f26920cec28a2ad497
Author: lprv <100177227+lprv@users.noreply.github.com>
Date:   Thu Jun 1 14:59:00 2023 +0000

    [basic.stc.dynamic.allocation] Remove redundant 'address of' from a note

commit 880531fad125c4b806300151ddcb961a7f44a181
Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
Date:   Sat Jul 22 21:49:38 2023 -0400

    [flat.{,multi}{map,set}.cons]: zip_view should be views::zip (#6373)

    We don't expect to use CTAD on `ranges::zip_view(args...)`;
    what we expect is `views::zip`.

commit a417ade53722d944481baac575292874c1bcc79a
Author: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
Date:   Sat Jul 22 21:50:37 2023 -0400

    [range.enumerate.overview] Add cross reference to [range.adaptor.object] (#6219)

commit 7f100cc67b0bb263e2f438238e87555347ae45c0
Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
Date:   Sun Jul 23 17:50:27 2023 +0800

    [input.output] Fix the "Effects: Equivalent to" format (#6402)

commit 9334219bd95a85e86b20c8a712397f9f23f0f7a8
Author: Jens Maurer <Jens.Maurer@gmx.net>
Date:   Sun Jul 23 06:59:28 2023 +0200

    [class.copy.assign] Remove note obsoleted by CWG2586

commit 503b4b261061bdd2481e1e4f1153481a0a75ecee
Author: Jens Maurer <Jens.Maurer@gmx.net>
Date:   Sun Jul 23 08:29:10 2023 +0200

    [dcl.fct.def.default] Highlight different references in defaulted assignments

commit a567088b0ab8ca62f0ff5a7b4746337ac3f6df9b
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Mon Jul 24 12:45:57 2023 +0100

    [assets] Move separate assets into "assets" subdirectory

commit 7e2cc3ba6a30a693a96bbc37c4d8428d92ce1fa8
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Fri Aug 19 17:03:37 2022 +0100

    [assets] Unicode examples

commit 589af92ce99b91444a3e6155cb64f8009918e885
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Sun Aug 28 02:09:47 2022 +0100

    [format.string.{std,escaped}, macros] Add missing examples

commit f61a2c8a847e846ba1167c876b0fc1532ab433d7
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Mon Jul 24 21:27:00 2023 +0100

    [format.string.escape] Fix mis{sing,escaped} braces

    This was an oversight in the application of
    https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2713r0.html
    in e38ea31d46ca2964c4f9169f049e2f15e2cd5957.

commit 3b2a8ee11725eb485df89dec40a7e0fc965debb2
Author: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
Date:   Fri Jul 21 12:46:48 2023 -0400

    [func.wrap.ref.class] change deduction guide to match its detailed specifications

commit d5160c6ff6c09fc0c52b5b11676c03ff179f4554
Author: Thomas Köppe <tkoeppe@google.com>
Date:   Sun Jul 23 02:51:25 2023 +0100

    [mdspan.submdspan.extents] Factor out common result expression

commit 84cf8ef63a479a3fda05a219dd26ab4b8c6a8e32
Author: Jakub Mazurkiewicz <mazkuba3@gmail.com>
Date:   Tue Jul 25 01:06:49 2023 +0200

    [mdspan.mdspan.cons] `OtherIndexType` is not a parameter pack; missing _v (#6263)

commit a636f553369825bc37ac0d95c171a00c526af499
Author: lprv <100177227+lprv@users.noreply.github.com>
Date:   Mon Jul 24 16:16:14 2023 +0000

    [intro.object] Fix cross-references for library implicit object creation

commit d09a77e09a5210c50994b89d999f3cbdfcc9a436
Author: Jonathan Wakely <cxx@kayari.org>
Date:   Wed May 17 18:51:00 2023 +0100

    [re.results.general, string.cons] Fix references to container reqmts

    [re.results.general] should refer to [container.alloc.reqmts] for an
    allocator-aware container, [strings.cons] should refer to sequence
    container requirements.

commit dd32b7eeb21e0ca8be7aae1996814a2ffda0ed83
Author: Jonathan Wakely <cxx@kayari.org>
Date:   Thu May 18 12:54:12 2023 +0100

    [container.gen.reqmts] Adjust subclause names and stable tags

    There are no more cross-references to [container.gen.reqmts] or
    [container.requirements.general], so this doesn't affect anything else.

commit a0e6740cda724c192ea14979e2fa92e9f38cf242
Author: Janet Cobb <git@randomcat.org>
Date:   Mon Jul 24 12:09:44 2023 -0400

    [basic.fundamental] Clarify that table of minimum integral type widths applies only to standard integral types

commit 3a2586ccb4112f32f08643f7fcafab0b6b7956e2
Author: Joshua Berne <berne@notadragon.com>
Date:   Fri Jul 28 15:31:51 2023 -0400

    [dcl.attr.grammar] Fix typo "appeartain" -> "appertain" (#6420)

commit 00b4bb25e7b881cc53dca91dd44ef87c9696b19c
Author: Jan Schultke <me@eisenwave.net>
Date:   Sun Aug 13 22:35:57 2023 +0200

    [over.ics.list] Fix missing std:: in example (#6453)

commit cf7d5820d2ab8352d96462c647b735dc575cc1cb
Author: Alisdair Meredith <alisdairm@me.com>
Date:   Tue Aug 15 00:12:21 2023 +0200

    [depr.static.constexpr] Cross-reference core clauses for deprecated feature (#6448)

commit 1353359777de653346dd05ed117bba3627b6c7ca
Author: Jens Maurer <Jens.Maurer@gmx.net>
Date:   Tue Jan 24 18:51:02 2023 +0100

    [class.mem.general] Clarify class completeness

commit 77d1b66193d5324b121979474d0e35645bbcfb1c
Author: A. Jiang <de34@live.cn>
Date:   Tue Aug 1 13:39:55 2023 +0800

    [memory.syn] Remove redundant freestanding mark for members

    Making `allocator_arg_t` shown like `from_range_t` in [ranges.syn].

commit bf304328b603d96b9da5dc38dfeb04057c67cc53
Author: A. Jiang <de34@live.cn>
Date:   Tue Aug 1 13:42:07 2023 +0800

    [ranges.syn] Remove redundant freestanding mark for members

commit d347b328e058bb4b357a2b7b4733c923fca6fd98
Author: Jan Schultke <me@eisenwave.net>
Date:   Tue Aug 15 00:42:54 2023 +0200

    [temp.over] itemize parts of long paragraph (#6443)

commit e34a8e15e1de7eab0980af328765957c6118fc04
Author: Jan Schultke <me@eisenwave.net>
Date:   Tue Aug 15 00:45:43 2023 +0200

    [meta.unary.prop] itemize long sentence (#6436)