diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index de1ebdac1e..a2dcca1077 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -68,7 +68,7 @@ jobs: - name: upload PDF if: matrix.cfg.os == 'ubuntu-22.04' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: draft-snapshot path: source/std.pdf diff --git a/papers/n4945.html b/papers/n4945.html index e8335900cf..7ead1e9a9d 100644 --- a/papers/n4945.html +++ b/papers/n4945.html @@ -136,7 +136,7 @@

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

-

Date: 2022-03-22

+

Date: 2023-03-22

Thomas Köppe (editor, Google DeepMind)
Jens Maurer (co-editor)
diff --git a/papers/n4945.md b/papers/n4945.md index fd012dadb6..2be432983d 100644 --- a/papers/n4945.md +++ b/papers/n4945.md @@ -1,6 +1,6 @@ # N4945 Editors' Report -- Programming Languages -- C++ -Date: 2022-03-22 +Date: 2023-03-22 Thomas Köppe (editor, Google DeepMind) Jens Maurer (co-editor) diff --git a/papers/n4951.html b/papers/n4951.html new file mode 100644 index 0000000000..ab5636e4d9 --- /dev/null +++ b/papers/n4951.html @@ -0,0 +1,447 @@ + + + + + +N4951 + + +

N4951 Editors’ Report:
Programming Languages — C++

+ +

Date: 2023-05-10

+ +

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.

+ +

New papers

+ + + +

Editorial changes

+ +

There have not been any motions from WG21 since the last working draft. This +revision incorporates all the changes requested by the editorial review +committee in preparation of the Draft International Standard (DIS) ballot, +as well as other editorial changes.

+ +

Minor editorial changes

+ +

A log of editorial fixes made to the working draft since N4944 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 b8512a1c292adee71c1145d3c61e32d48dcb8daa
+Author: morinmorin <mimomorin@gmail.com>
+Date:   Wed Mar 15 01:45:28 2023 +0900
+
+    [container.requirements.general] Move exposition-only concept
+
+    The exposition-only concept container-compatible-range is defined
+    in the subclause for allocator-aware containers, that does not
+    actually use it.  This requirement is used throughout the subclause
+    for a variety of contains, so relocate the definition into the
+    leading subclause that provides a key to definitions used throughout
+    the containers subclauses.
+
+commit 6e7fd98b684a92405934de981abf01414a67ddbd
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Thu Mar 23 14:21:22 2023 +0000
+
+    [version.syn] bump value of __cpp_lib_allocate_at_least
+
+    This is requested for the Tentatively Ready LWG issue 3887.
+
+    Fixes #6202
+
+commit a0403a9407e6520b6bbf0e818d9db8ac1282f4e1
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sat Mar 11 20:40:30 2023 +0000
+
+    [module.interface] Fix outdated example
+
+commit 2c7e87d447d65684c74890074999c60bb45712ab
+Author: Christian Trott <crtrott@sandia.gov>
+Date:   Fri Mar 24 09:32:22 2023 -0700
+
+    [mdspan.layout.left.cons] extents() should be other.extents() (#6069)
+
+    The precondition was erroneously referring to the not yet
+    constructed extents instead of other.extents().
+
+    Note that the extents of the to be constructed layout will be
+    initialized with other.extents - i.e. after construction they will
+    return the same value for the fwd-prod-of-extents etc.
+
+commit 1b0fe66324f2d5e7861397d7f537243833418cde
+Author: Jakub Mazurkiewicz <mazkuba3@gmail.com>
+Date:   Fri Mar 24 17:33:09 2023 +0100
+
+    [range.cartesian.view] Add missing views:: qualifier (#6059)
+
+commit 562af663363337848bcb34a8f5ba37641fb0560e
+Author: Alisdair Meredith <alisdairm@me.com>
+Date:   Mon Mar 27 17:06:50 2023 -0400
+
+    [over.literal] Cross-reference deprecated grammar (#6209)
+
+    The core convention is to retain deprecated wording in the
+    core clauses, but always make a reference to Annex D
+    where a feature, or parts of a feature, are deprecated.
+
+commit ac47f9cb768760f0abd7a57cbf3074ad5eebf011
+Author: Alisdair Meredith <alisdairm@me.com>
+Date:   Mon Mar 27 17:09:44 2023 -0400
+
+    [container.reqmts] Move requirements to the right place (#6199)
+
+    As part of the replacement of the container requirements tables with text,
+    several paragraphs of general container requirements were buried
+    in the new subsections for more specific requirements such as
+    reversible containers or allocator-aware containers.
+
+    This seems to have happened when general container requirements
+    followed one of the container requirements tables that are now expressed
+    as text. This change carefully restores text to the general container requirements
+    clause, in the original order they appeared in C++20.
+
+commit bb65fc8e22b8e056cfbeb45ba65c6f37bf355182
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Tue Mar 28 21:04:20 2023 +0200
+
+    [dcl.decl.general] Fix cross-references
+
+    "templated function" is defined in [temp.pre], but avoid having
+    two cross-references to the same place in the same paragraph by
+    dropping the cross-reference for the definition of the grammar
+    non-terminal "requires-clause".
+
+commit 8c99598b60f0a059b37c7e1fd82480aaf32169a5
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Wed Mar 29 10:47:27 2023 +0100
+
+    [class.member.lookup] Also change "N" to "M" in note.
+
+    This change should have been part of the resolution of CWG2642 (via
+    CWG Motion 1), but was accidentally omitted there.
+
+commit 8e2d6ee92f372d9526c01a8fb601da9921c94b2a
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Wed Mar 29 16:08:57 2023 +0100
+
+    [stacktrace.format] Use full typename "basic_stacktrace<Allocator>".
+
+commit 70b2f7b6bf0d7fe3d87d9438459f766fdd83b08c
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Wed Mar 29 17:31:24 2023 +0100
+
+    [indirectcallable.indirectinvocable] Remove stray "&".
+
+    This was an error in the application of P2609R3.
+
+commit 08581e85636794384029de729a641975bb13260c
+Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
+Date:   Sun Apr 16 05:18:24 2023 -0400
+
+    [alg.unique] fix typo: namepace -> namespace
+
+commit 1a2e97de0517bb9ee1715a9664fa2861fa025cda
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Mon Apr 17 14:31:05 2023 +0800
+
+    [range.repeat.iterator] Remove redundant period (#6234)
+
+commit 44ff7aa92ba7f716abe96c29876b2ea145a22c66
+Author: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
+Date:   Fri Apr 21 18:56:31 2023 +0330
+
+    [check.yml] update version of "upload" action (#6231)
+
+    Update the `actions/upload-artifact` action to version 3.
+
+commit 413b147b0f48ea87606e0b7fbc107c8316b98fc3
+Author: Detlef Riekenberg <wine.dev@web.de>
+Date:   Thu Apr 27 04:00:32 2023 +0200
+
+    [compliance, headers.cpp.fs] Fix subclause name for cstddef (#6227)
+
+commit 82ecf4355a016847ffcf778abfcf1fe96d02fc79
+Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
+Date:   Sun Apr 30 07:56:10 2023 -0400
+
+    [flat.map.modifiers] Fix erroneous "try_emplace_hint" (#6238)
+
+    The hint-taking operation is instead an overload of try_emplace.
+
+commit 9568c66abd12eadd696b9f16bb4884908e2aad66
+Author: Daniel Krügler <daniel.kruegler@gmail.com>
+Date:   Sun Apr 30 13:57:23 2023 +0200
+
+    [ranges] Remove "inline" from variable templates (#6218)
+
+commit bdd25a63a8a84a1183ebc125dac132d0572f67fd
+Author: Alisdair Meredith <alisdairm@me.com>
+Date:   Sun Apr 30 08:02:42 2023 -0400
+
+    [iterator.concept.winc] Improve implementation-defined text (#6228)
+
+commit 057da6c79e35cc4cdebaa5a6096738f273c6c2e8
+Author: tocic <tocic@protonmail.ch>
+Date:   Wed Sep 28 13:14:14 2022 +0300
+
+    [back, macros] Fix inconsistent hyphenation of "cross-reference"
+
+commit d1e109e43d7625f4a4ebb6a045fc68a275fca611
+Author: tocic <tocic@protonmail.ch>
+Date:   Wed Sep 28 13:19:36 2022 +0300
+
+    [std] Fix inconsistent hyphenation of "multidimensional"
+
+commit bf9edb92183b34421dd6e02474f2ac943fd7cea3
+Author: tocic <tocic@protonmail.ch>
+Date:   Fri Apr 7 13:56:59 2023 +0300
+
+    [diff.cpp17.temp] Fix inconsistent hyphenation of "well-formed"
+
+commit 62cd54aedecb8bf152e80b1aced64d80e0b8bff6
+Author: tocic <tocic@protonmail.ch>
+Date:   Fri Apr 7 13:57:28 2023 +0300
+
+    [diff.cpp17.depr] Fix inconsistent hyphenation of "well-defined"
+
+commit 57ad77984fd2e07c90b1bb8ca34125452688031a
+Author: tocic <tocic@protonmail.ch>
+Date:   Fri Apr 7 13:51:09 2023 +0300
+
+    [fs.path.type.cvt] Fix inconsistent hyphenation of "error-prone"
+
+commit e16a651b7d6f490e9ffe003c9ca382970c478c1d
+Author: tocic <tocic@protonmail.ch>
+Date:   Fri Apr 7 13:45:39 2023 +0300
+
+    [filesystems] Fix inconsistent hyphenation of "subdirectory"
+
+commit f52423c2a4d60d0ad653a3c8e2895037df016db0
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 30 14:07:51 2023 +0100
+
+    [format.string.std] Clarify how an integer is interpreted
+
+commit 62d7d5a2e51d63d676cc93bfe69d4d55ea635983
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 30 14:15:35 2023 +0100
+
+    [class.{default,copy}.ctor] Use new term "constexpr-suitable".
+
+    As of CWG2602 (ce7d8b0360e1509de6f7fd073d0a091238b1326f), the term
+    "constexpr-suitable" replaces the previous phrase "satisfy the
+    requirements for a constexpr function".
+
+commit 696ddeb2b28b48efaffa93b881ff667d85d0a457
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 30 14:22:32 2023 +0100
+
+    [time.duration.general] Use new term "constexpr-suitable".
+
+commit 79aef51943810dcf14654490fb6101bbc9e4a0f9
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 30 14:23:05 2023 +0100
+
+    [pairs.pair, variant.ctor, tuple.cnstr] Use new term "constexpr-suitable".
+
+commit b6903b6fe23d06e23191e672ae287f0de0de472c
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Mon May 1 09:47:08 2023 +0200
+
+    [cpp.predefined] Add __cpp_auto_cast
+
+commit 8f946881355fbbe031a325168078b2925e029bba
+Author: xmh0511 <970252187@qq.com>
+Date:   Tue May 2 01:31:02 2023 +0800
+
+    [temp.variadic] Change "init-capture pack" to "init-capture pack declaration"
+
+commit b81e4be37c5f7a4d374546a72bfc82c96601aee2
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Fri May 5 12:01:05 2023 +0100
+
+    [container.alloc.reqmts] Fix incorrect change of \mandates to \expects
+
+    This was incorrectly changed from a \mandates to an \expects when
+    93ff092d1cd2b335f372b9546365b3d495caf2d8 replaced the requirements
+    tables.
+
+commit 7003252f4db8b388dd097790b374ffed3be1ff56
+Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
+Date:   Sun May 7 16:27:19 2023 -0400
+
+    [flat.map.cons] Close an angle bracket (#6245)
+
+commit e7492cef7f930089e009913bff6ac30f41d6165e
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 6 02:47:07 2023 +0100
+
+    [format] Fix presentation of whitespace; use \caret
+
+commit f8f5b8b564a785297a43b6b823b521e5adc79fb9
+Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
+Date:   Mon May 8 14:30:31 2023 -0400
+
+    [flat.map.modifiers] "Arg..." should be "Args..." (#6249)
+
+commit 02545c761c7f6c9e336c6badf8660b2baf4ac627
+Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
+Date:   Tue May 9 13:25:42 2023 -0400
+
+    [flat.set.modifiers] `(first, last)` should be `rg` (#6246)
+
+    Restore consistency with [flat.map.modifiers]/13, which already uses `ranges::distance(rg)`.
+
+ + diff --git a/papers/n4951.md b/papers/n4951.md new file mode 100644 index 0000000000..01e7a0651d --- /dev/null +++ b/papers/n4951.md @@ -0,0 +1,306 @@ +# N4951 Editors' Report -- Programming Languages -- C++ + +Date: 2023-05-10 + +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](https://github.com/cplusplus/draft/wiki/How-to-submit-an-editorial-issue) +and to those who have provided pull requests with fixes. + +## New papers + + * [N4950](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4950.pdf) is the + current and final working draft for C++23. It replaces + [N4944](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4944.pdf), and it + forms the basis of the Draft International Standard for C++23. + * N4951 is this Editors' Report. + * The next working draft will be for C++26. + +### Editorial changes + +There have not been any motions from WG21 since the last working draft. This +revision incorporates all the changes requested by the editorial review +committee in preparation of the Draft International Standard (DIS) ballot, +as well as other editorial changes. + +### Minor editorial changes + +A log of editorial fixes made to the working draft since N4944 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](https://github.com/cplusplus/draft/compare/n4944...n4950). + + commit b8512a1c292adee71c1145d3c61e32d48dcb8daa + Author: morinmorin + Date: Wed Mar 15 01:45:28 2023 +0900 + + [container.requirements.general] Move exposition-only concept + + The exposition-only concept container-compatible-range is defined + in the subclause for allocator-aware containers, that does not + actually use it. This requirement is used throughout the subclause + for a variety of contains, so relocate the definition into the + leading subclause that provides a key to definitions used throughout + the containers subclauses. + + commit 6e7fd98b684a92405934de981abf01414a67ddbd + Author: Jonathan Wakely + Date: Thu Mar 23 14:21:22 2023 +0000 + + [version.syn] bump value of __cpp_lib_allocate_at_least + + This is requested for the Tentatively Ready LWG issue 3887. + + Fixes #6202 + + commit a0403a9407e6520b6bbf0e818d9db8ac1282f4e1 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sat Mar 11 20:40:30 2023 +0000 + + [module.interface] Fix outdated example + + commit 2c7e87d447d65684c74890074999c60bb45712ab + Author: Christian Trott + Date: Fri Mar 24 09:32:22 2023 -0700 + + [mdspan.layout.left.cons] extents() should be other.extents() (#6069) + + The precondition was erroneously referring to the not yet + constructed extents instead of other.extents(). + + Note that the extents of the to be constructed layout will be + initialized with other.extents - i.e. after construction they will + return the same value for the fwd-prod-of-extents etc. + + commit 1b0fe66324f2d5e7861397d7f537243833418cde + Author: Jakub Mazurkiewicz + Date: Fri Mar 24 17:33:09 2023 +0100 + + [range.cartesian.view] Add missing views:: qualifier (#6059) + + commit 562af663363337848bcb34a8f5ba37641fb0560e + Author: Alisdair Meredith + Date: Mon Mar 27 17:06:50 2023 -0400 + + [over.literal] Cross-reference deprecated grammar (#6209) + + The core convention is to retain deprecated wording in the + core clauses, but always make a reference to Annex D + where a feature, or parts of a feature, are deprecated. + + commit ac47f9cb768760f0abd7a57cbf3074ad5eebf011 + Author: Alisdair Meredith + Date: Mon Mar 27 17:09:44 2023 -0400 + + [container.reqmts] Move requirements to the right place (#6199) + + As part of the replacement of the container requirements tables with text, + several paragraphs of general container requirements were buried + in the new subsections for more specific requirements such as + reversible containers or allocator-aware containers. + + This seems to have happened when general container requirements + followed one of the container requirements tables that are now expressed + as text. This change carefully restores text to the general container requirements + clause, in the original order they appeared in C++20. + + commit bb65fc8e22b8e056cfbeb45ba65c6f37bf355182 + Author: Jens Maurer + Date: Tue Mar 28 21:04:20 2023 +0200 + + [dcl.decl.general] Fix cross-references + + "templated function" is defined in [temp.pre], but avoid having + two cross-references to the same place in the same paragraph by + dropping the cross-reference for the definition of the grammar + non-terminal "requires-clause". + + commit 8c99598b60f0a059b37c7e1fd82480aaf32169a5 + Author: Thomas Köppe + Date: Wed Mar 29 10:47:27 2023 +0100 + + [class.member.lookup] Also change "N" to "M" in note. + + This change should have been part of the resolution of CWG2642 (via + CWG Motion 1), but was accidentally omitted there. + + commit 8e2d6ee92f372d9526c01a8fb601da9921c94b2a + Author: Thomas Köppe + Date: Wed Mar 29 16:08:57 2023 +0100 + + [stacktrace.format] Use full typename "basic_stacktrace". + + commit 70b2f7b6bf0d7fe3d87d9438459f766fdd83b08c + Author: Thomas Köppe + Date: Wed Mar 29 17:31:24 2023 +0100 + + [indirectcallable.indirectinvocable] Remove stray "&". + + This was an error in the application of P2609R3. + + commit 08581e85636794384029de729a641975bb13260c + Author: Arthur O'Dwyer + Date: Sun Apr 16 05:18:24 2023 -0400 + + [alg.unique] fix typo: namepace -> namespace + + commit 1a2e97de0517bb9ee1715a9664fa2861fa025cda + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Mon Apr 17 14:31:05 2023 +0800 + + [range.repeat.iterator] Remove redundant period (#6234) + + commit 44ff7aa92ba7f716abe96c29876b2ea145a22c66 + Author: Mohammed Keyvanzadeh + Date: Fri Apr 21 18:56:31 2023 +0330 + + [check.yml] update version of "upload" action (#6231) + + Update the `actions/upload-artifact` action to version 3. + + commit 413b147b0f48ea87606e0b7fbc107c8316b98fc3 + Author: Detlef Riekenberg + Date: Thu Apr 27 04:00:32 2023 +0200 + + [compliance, headers.cpp.fs] Fix subclause name for cstddef (#6227) + + commit 82ecf4355a016847ffcf778abfcf1fe96d02fc79 + Author: Arthur O'Dwyer + Date: Sun Apr 30 07:56:10 2023 -0400 + + [flat.map.modifiers] Fix erroneous "try_emplace_hint" (#6238) + + The hint-taking operation is instead an overload of try_emplace. + + commit 9568c66abd12eadd696b9f16bb4884908e2aad66 + Author: Daniel Krügler + Date: Sun Apr 30 13:57:23 2023 +0200 + + [ranges] Remove "inline" from variable templates (#6218) + + commit bdd25a63a8a84a1183ebc125dac132d0572f67fd + Author: Alisdair Meredith + Date: Sun Apr 30 08:02:42 2023 -0400 + + [iterator.concept.winc] Improve implementation-defined text (#6228) + + commit 057da6c79e35cc4cdebaa5a6096738f273c6c2e8 + Author: tocic + Date: Wed Sep 28 13:14:14 2022 +0300 + + [back, macros] Fix inconsistent hyphenation of "cross-reference" + + commit d1e109e43d7625f4a4ebb6a045fc68a275fca611 + Author: tocic + Date: Wed Sep 28 13:19:36 2022 +0300 + + [std] Fix inconsistent hyphenation of "multidimensional" + + commit bf9edb92183b34421dd6e02474f2ac943fd7cea3 + Author: tocic + Date: Fri Apr 7 13:56:59 2023 +0300 + + [diff.cpp17.temp] Fix inconsistent hyphenation of "well-formed" + + commit 62cd54aedecb8bf152e80b1aced64d80e0b8bff6 + Author: tocic + Date: Fri Apr 7 13:57:28 2023 +0300 + + [diff.cpp17.depr] Fix inconsistent hyphenation of "well-defined" + + commit 57ad77984fd2e07c90b1bb8ca34125452688031a + Author: tocic + Date: Fri Apr 7 13:51:09 2023 +0300 + + [fs.path.type.cvt] Fix inconsistent hyphenation of "error-prone" + + commit e16a651b7d6f490e9ffe003c9ca382970c478c1d + Author: tocic + Date: Fri Apr 7 13:45:39 2023 +0300 + + [filesystems] Fix inconsistent hyphenation of "subdirectory" + + commit f52423c2a4d60d0ad653a3c8e2895037df016db0 + Author: Thomas Köppe + Date: Sun Apr 30 14:07:51 2023 +0100 + + [format.string.std] Clarify how an integer is interpreted + + commit 62d7d5a2e51d63d676cc93bfe69d4d55ea635983 + Author: Thomas Köppe + Date: Sun Apr 30 14:15:35 2023 +0100 + + [class.{default,copy}.ctor] Use new term "constexpr-suitable". + + As of CWG2602 (ce7d8b0360e1509de6f7fd073d0a091238b1326f), the term + "constexpr-suitable" replaces the previous phrase "satisfy the + requirements for a constexpr function". + + commit 696ddeb2b28b48efaffa93b881ff667d85d0a457 + Author: Thomas Köppe + Date: Sun Apr 30 14:22:32 2023 +0100 + + [time.duration.general] Use new term "constexpr-suitable". + + commit 79aef51943810dcf14654490fb6101bbc9e4a0f9 + Author: Thomas Köppe + Date: Sun Apr 30 14:23:05 2023 +0100 + + [pairs.pair, variant.ctor, tuple.cnstr] Use new term "constexpr-suitable". + + commit b6903b6fe23d06e23191e672ae287f0de0de472c + Author: Jens Maurer + Date: Mon May 1 09:47:08 2023 +0200 + + [cpp.predefined] Add __cpp_auto_cast + + commit 8f946881355fbbe031a325168078b2925e029bba + Author: xmh0511 <970252187@qq.com> + Date: Tue May 2 01:31:02 2023 +0800 + + [temp.variadic] Change "init-capture pack" to "init-capture pack declaration" + + commit b81e4be37c5f7a4d374546a72bfc82c96601aee2 + Author: Jonathan Wakely + Date: Fri May 5 12:01:05 2023 +0100 + + [container.alloc.reqmts] Fix incorrect change of \mandates to \expects + + This was incorrectly changed from a \mandates to an \expects when + 93ff092d1cd2b335f372b9546365b3d495caf2d8 replaced the requirements + tables. + + commit 7003252f4db8b388dd097790b374ffed3be1ff56 + Author: Arthur O'Dwyer + Date: Sun May 7 16:27:19 2023 -0400 + + [flat.map.cons] Close an angle bracket (#6245) + + commit e7492cef7f930089e009913bff6ac30f41d6165e + Author: Thomas Köppe + Date: Sat May 6 02:47:07 2023 +0100 + + [format] Fix presentation of whitespace; use \caret + + commit f8f5b8b564a785297a43b6b823b521e5adc79fb9 + Author: Arthur O'Dwyer + Date: Mon May 8 14:30:31 2023 -0400 + + [flat.map.modifiers] "Arg..." should be "Args..." (#6249) + + commit 02545c761c7f6c9e336c6badf8660b2baf4ac627 + Author: Arthur O'Dwyer + Date: Tue May 9 13:25:42 2023 -0400 + + [flat.set.modifiers] `(first, last)` should be `rg` (#6246) + + Restore consistency with [flat.map.modifiers]/13, which already uses `ranges::distance(rg)`. diff --git a/papers/wd-index.md b/papers/wd-index.md index f81e361401..abcbe32842 100644 --- a/papers/wd-index.md +++ b/papers/wd-index.md @@ -44,3 +44,4 @@ * [N4917](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4917.pdf) 2022-07 C++ Working Draft * [N4928](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4928.pdf) 2022-11 C++ Working Draft * [N4944](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4944.pdf) 2023-02 C++ Working Draft + * [N4950](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4950.pdf) 2023-05 C++ Working Draft diff --git a/source/algorithms.tex b/source/algorithms.tex index ad8add5227..ed1d8d1cf0 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -5934,7 +5934,7 @@ \pnum \expects -For the overloads in namepace \tcode{std}, +For the overloads in namespace \tcode{std}, \tcode{pred} is an equivalence relation and the type of \tcode{*first} meets the \oldconcept{MoveAssignable} requirements (\tref{cpp17.moveassignable}). diff --git a/source/back.tex b/source/back.tex index 0ebe82f03b..055fb32146 100644 --- a/source/back.tex +++ b/source/back.tex @@ -45,7 +45,7 @@ \chapter{Bibliography} \renewcommand{\glossitem}[4]{\hangpara{4em}{1}\realglossitem{#1}{#2}{#3}{#4}} \clearpage -\renewcommand{\glossaryname}{Cross references} +\renewcommand{\glossaryname}{Cross-references} \renewcommand{\preglossaryhook}{Each clause and subclause label is listed below along with the corresponding clause or subclause number and page number, in alphabetical order by label.\\} \twocolglossary @@ -57,7 +57,7 @@ \chapter{Bibliography} \clearpage \input{xrefdelta} -\renewcommand{\glossaryname}{Cross references from ISO \CppXX{}} +\renewcommand{\glossaryname}{Cross-references from ISO \CppXX{}} \renewcommand{\preglossaryhook}{All clause and subclause labels from ISO \CppXX{} (ISO/IEC 14882:2020, \doccite{Programming Languages --- \Cpp{}}) are present in this document, with the exceptions described below.\\} diff --git a/source/basic.tex b/source/basic.tex index 0b6b3f78d0..cb8225617f 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -320,7 +320,7 @@ the type of that object shall not be an incomplete type\iref{term.incomplete.type}, an abstract class type\iref{class.abstract}, or -a (possibly multi-dimensional) array thereof. +a (possibly multidimensional) array thereof. \rSec1[basic.def.odr]{One-definition rule}% \indextext{object!definition}% @@ -1618,7 +1618,7 @@ which shall not be an invalid set, are included in the result. \begin{note} Overload resolution will discard those -that cannot convert to the type specified by $N$\iref{temp.over}. +that cannot convert to the type specified by $M$\iref{temp.over}. \end{note} \pnum @@ -3362,7 +3362,7 @@ object or reference. A variable is said to have \defnadj{vacuous}{initialization} if it is default-initialized and, -if it is of class type or a (possibly multi-dimensional) array thereof, +if it is of class type or a (possibly multidimensional) array thereof, that class type has a trivial default constructor. The lifetime of an object of type \tcode{T} begins when: \begin{itemize} diff --git a/source/classes.tex b/source/classes.tex index fcabddde7d..8735ff7c11 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -699,7 +699,7 @@ The type of a non-static data member shall not be an incomplete type\iref{term.incomplete.type}, an abstract class type\iref{class.abstract}, -or a (possibly multi-dimensional) array thereof. +or a (possibly multidimensional) array thereof. \begin{note} In particular, a class \tcode{C} cannot contain a non-static member of class \tcode{C}, @@ -1313,8 +1313,8 @@ \grammarterm{compound-statement}. If that user-written default constructor would be ill-formed, the program is ill-formed. -If that user-written default constructor would satisfy the requirements -of a constexpr function\iref{dcl.constexpr}, the implicitly-defined +If that user-written default constructor would be constexpr-suitable\iref{dcl.constexpr}, +the implicitly-defined default constructor is \keyword{constexpr}. Before the defaulted default constructor for a class is implicitly defined, @@ -1601,8 +1601,8 @@ The copy/move constructor is implicitly defined even if the implementation elided its odr-use\iref{term.odr.use,class.temporary}. \end{note} -If an implicitly-defined\iref{dcl.fct.def.default} constructor would satisfy the requirements of a -constexpr function\iref{dcl.constexpr}, the implicitly-defined +If an implicitly-defined\iref{dcl.fct.def.default} constructor would be constexpr-suitable\iref{dcl.constexpr}, +the implicitly-defined constructor is \keyword{constexpr}. \pnum diff --git a/source/compatibility.tex b/source/compatibility.tex index 2bf0b9f233..0bdb90b9cc 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -812,7 +812,7 @@ int main() { A a; f < a; // ill-formed; previously well-formed - (f) < a; // still well formed + (f) < a; // still well-formed } \end{codeblock} @@ -1077,7 +1077,7 @@ The result of a call to this member function is not reliable in the presence of multiple threads and weak pointers. The member function \tcode{use_count} is similarly unreliable, but has a clearer contract in such cases, and remains -available for well defined use in single-threaded cases. +available for well-defined use in single-threaded cases. \effect A valid \CppXVII{} program that calls \tcode{unique} on a \tcode{shared_ptr} object may fail to compile. diff --git a/source/config.tex b/source/config.tex index a7e44b8931..d764e25075 100644 --- a/source/config.tex +++ b/source/config.tex @@ -1,9 +1,9 @@ %!TEX root = std.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{N4944} -\newcommand{\prevdocno}{N4928} -\newcommand{\cppver}{202002L} +\newcommand{\docno}{N4950} +\newcommand{\prevdocno}{N4944} +\newcommand{\cppver}{202302L} %% Release date \newcommand{\reldate}{\today} diff --git a/source/containers.tex b/source/containers.tex index 0cd3b6ce60..c2b3a424fa 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -95,6 +95,14 @@ \tcode{rv} denotes a non-const rvalue of type \tcode{X}. \end{itemize} +\pnum +The following exposition-only concept is used in the definition of containers: +\begin{codeblock} +template +concept @\defexposconcept{container-compatible-range}@ = // \expos + ranges::@\libconcept{input_range}@ && @\libconcept{convertible_to}@, T>; +\end{codeblock} + \rSec3[container.reqmts]{Containers} % Local command to index names as members of all containers. @@ -628,6 +636,57 @@ with value \tcode{a.end()} before the swap will have value \tcode{b.end()} after the swap. +\pnum +Unless otherwise specified (see~\ref{associative.reqmts.except}, \ref{unord.req.except}, \ref{deque.modifiers}, and +\ref{vector.modifiers}) +all container types defined in this Clause meet +the following additional requirements: + +\begin{itemize} +\item +If an exception is thrown by an +\tcode{insert()} or \tcode{emplace()} +function while inserting a single element, that +function has no effects. +\item +If an exception is thrown by a +\tcode{push_back()}, +\tcode{push_front()}, +\tcode{emplace_back()}, or \tcode{emplace_front()} +function, that function has no effects. +\item +No +\tcode{erase()}, +\tcode{clear()}, +\tcode{pop_back()} +or +\tcode{pop_front()} +function throws an exception. +\item +No copy constructor or assignment operator of a returned iterator +throws an exception. +\item +No +\tcode{swap()} +function throws an exception. +\item +No +\tcode{swap()} +function invalidates any references, +pointers, or iterators referring to the elements +of the containers being swapped. +\begin{note} +The \tcode{end()} iterator does not refer to any element, so it can be invalidated. +\end{note} +\end{itemize} + +\pnum +Unless otherwise specified (either explicitly or by defining a +function in terms of other functions), invoking a container member +function or passing a container as an argument to a library function +shall not invalidate iterators to, or change the values of, objects +within that container. + \pnum A \defnadj{contiguous}{container} is a container @@ -636,6 +695,24 @@ \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} and model \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}. +\pnum +The behavior of certain container member functions and deduction guides +depends on whether types qualify as input iterators or allocators. +The extent to which an implementation determines that a type cannot be an input +iterator is unspecified, except that as a minimum integral types shall not qualify +as input iterators. +Likewise, the extent to which an implementation determines that a type cannot be +an allocator is unspecified, except that as a minimum a type \tcode{A} shall not qualify +as an allocator unless it meets both of the following conditions: + +\begin{itemize} +\item The \grammarterm{qualified-id} \tcode{A::value_type} +is valid and denotes a type\iref{temp.deduct}. + +\item The expression \tcode{declval().allocate(size_t\{\})} +is well-formed when treated as an unevaluated operand. +\end{itemize} + \rSec3[container.rev.reqmts]{Reversible container requirements} % Local command to index names as members of all containers. @@ -766,56 +843,6 @@ Constant. \end{itemdescr} -\pnum -Unless otherwise specified (see~\ref{associative.reqmts.except}, \ref{unord.req.except}, \ref{deque.modifiers}, and -\ref{vector.modifiers}) -all container types defined in this Clause meet -the following additional requirements: - -\begin{itemize} -\item -If an exception is thrown by an -\tcode{insert()} or \tcode{emplace()} -function while inserting a single element, that -function has no effects. -\item -If an exception is thrown by a -\tcode{push_back()}, -\tcode{push_front()}, -\tcode{emplace_back()}, or \tcode{emplace_front()} -function, that function has no effects. -\item -No -\tcode{erase()}, -\tcode{clear()}, -\tcode{pop_back()} -or -\tcode{pop_front()} -function throws an exception. -\item -No copy constructor or assignment operator of a returned iterator -throws an exception. -\item -No -\tcode{swap()} -function throws an exception. -\item -No -\tcode{swap()} -function invalidates any references, -pointers, or iterators referring to the elements -of the containers being swapped. -\begin{note} -The \tcode{end()} iterator does not refer to any element, so it can be invalidated. -\end{note} -\end{itemize} - -\pnum -Unless otherwise specified (either explicitly or by defining a -function in terms of other functions), invoking a container member -function or passing a container as an argument to a library function -shall not invalidate iterators to, or change the values of, objects -within that container. \rSec3[container.opt.reqmts]{Optional container requirements} @@ -951,14 +978,6 @@ but specialized allocators can choose a different definition. \end{note} -\pnum -The following exposition-only concept is used in the definition of containers: -\begin{codeblock} -template -concept @\defexposconcept{container-compatible-range}@ = // \expos - ranges::@\libconcept{input_range}@ && @\libconcept{convertible_to}@, T>; -\end{codeblock} - \pnum In this subclause, \begin{itemize} @@ -1012,7 +1031,7 @@ \tcode{A} \pnum -\expects +\mandates \tcode{allocator_type::value_type} is the same as \tcode{X::value_type}. \end{itemdescr} @@ -1192,23 +1211,6 @@ Constant. \end{itemdescr} -\pnum -The behavior of certain container member functions and deduction guides -depends on whether types qualify as input iterators or allocators. -The extent to which an implementation determines that a type cannot be an input -iterator is unspecified, except that as a minimum integral types shall not qualify -as input iterators. -Likewise, the extent to which an implementation determines that a type cannot be -an allocator is unspecified, except that as a minimum a type \tcode{A} shall not qualify -as an allocator unless it meets both of the following conditions: - -\begin{itemize} -\item The \grammarterm{qualified-id} \tcode{A::value_type} -is valid and denotes a type\iref{temp.deduct}. - -\item The expression \tcode{declval().allocate(size_t\{\})} -is well-formed when treated as an unevaluated operand. -\end{itemize} \rSec2[container.requirements.dataraces]{Container data races} @@ -15195,7 +15197,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{uses_allocator_v} is \tcode{true} and \tcode{uses_allocator_v} is \tcode{true}. \pnum @@ -15332,7 +15334,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{is_constructible_v, Arg...>} is \tcode{true}. +\tcode{is_constructible_v, Args...>} is \tcode{true}. \pnum \effects @@ -15621,7 +15623,7 @@ \end{codeblock} for the first two overloads or \begin{codeblock} -try_emplace_hint(hint, std::forward(k), std::forward(obj)) +try_emplace(hint, std::forward(k), std::forward(obj)) \end{codeblock} for the last two overloads. @@ -15672,11 +15674,11 @@ assigns \tcode{std::forward<\linebreak M>(obj)} to \tcode{e.second}. Otherwise, equivalent to \begin{codeblock} -try_emplace(std::forward(k), std::forward(obj)) +try_emplace(std::forward(k), std::forward(obj)) \end{codeblock} for the first overload or \begin{codeblock} -try_emplace_hint(hint, std::forward(k), std::forward(obj)) +try_emplace(hint, std::forward(k), std::forward(obj)) \end{codeblock} for the second overload. @@ -16953,7 +16955,7 @@ \pnum \complexity $N$ + $M \log M$, where $N$ is \tcode{size()} before the operation and $M$ -is \tcode{distance(first, last)}. +is \tcode{ranges::distance(rg)}. \pnum \remarks @@ -19442,7 +19444,7 @@ If \tcode{extents_type::rank() > 0} is \tcode{true}, then for all $r$ in the range $[0, \tcode{extents_type::rank()})$, \tcode{other.stride($r$)} equals -\tcode{extents().\exposid{fwd-prod-of-extents}($r$)}, and +\tcode{other.extents().\exposid{fwd-prod-of-extents}($r$)}, and \item \tcode{other.required_span_size()} is representable as a value of type \tcode{index_type}\iref{basic.fundamental}. @@ -19700,7 +19702,7 @@ If \tcode{extents_type::rank() > 0} is \tcode{true}, then for all $r$ in the range $[0, \tcode{extents_type::rank()})$, \tcode{other.stride($r$)} equals -\tcode{extents().\exposid{rev-prod-of-extents}($r$)}. +\tcode{other.extents().\exposid{rev-prod-of-extents}($r$)}. \item \tcode{other.required_span_size()} is representable as a value of type \tcode{index_type}\iref{basic.fundamental}. diff --git a/source/declarations.tex b/source/declarations.tex index e2e6054442..06c3caad99 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -2165,10 +2165,10 @@ \end{note} \pnum -The optional \grammarterm{requires-clause}\iref{temp.pre} in an +The optional \grammarterm{requires-clause} in an \grammarterm{init-declarator} or \grammarterm{member-declarator} shall be present only if the declarator declares a -templated function\iref{dcl.fct}. +templated function\iref{temp.pre}. % \indextext{trailing requires-clause@trailing \gterm{requires-clause}|see{\gterm{requires-clause}, trailing}}% When present after a declarator, the \grammarterm{requires-clause} @@ -2228,6 +2228,7 @@ \end{bnf} \begin{bnf} +\microtypesetup{protrusion=false}\obeyspaces \nontermdef{ptr-operator}\br \terminal{*} \opt{attribute-specifier-seq} \opt{cv-qualifier-seq}\br \terminal{\&} \opt{attribute-specifier-seq}\br @@ -5147,7 +5148,7 @@ \end{example} \pnum -When initializing a multi-dimensional array, +When initializing a multidimensional array, the \grammarterm{initializer-clause}{s} initialize the elements with the last (rightmost) index of the array @@ -8446,6 +8447,7 @@ \end{bnf} \begin{bnf} +\microtypesetup{protrusion=false}\obeyspaces \nontermdef{balanced-token}\br \terminal{(} \opt{balanced-token-seq} \terminal{)}\br \terminal{[} \opt{balanced-token-seq} \terminal{]}\br diff --git a/source/diagnostics.tex b/source/diagnostics.tex index a7ec160262..be48fa0244 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -2438,7 +2438,7 @@ \fmtgrammarterm{format-spec} is empty. \pnum -A \tcode{basic_stacktrace} object \tcode{s} is formatted as if by +A \tcode{basic_stacktrace} object \tcode{s} is formatted as if by copying \tcode{to_string(s)} through the output iterator of the context. \end{itemdescr} diff --git a/source/expressions.tex b/source/expressions.tex index bd1c566664..8026d15967 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -279,7 +279,7 @@ \pnum Unless otherwise indicated\iref{dcl.type.decltype}, a prvalue shall always have complete type or the \keyword{void} type; -if it has a class type or (possibly multi-dimensional) array of class type, +if it has a class type or (possibly multidimensional) array of class type, that class shall not be an abstract class\iref{class.abstract}. A glvalue shall not have type \cv{}~\keyword{void}. \begin{note} @@ -2769,6 +2769,7 @@ \end{bnf} \begin{bnf} +\microtypesetup{protrusion=false}\obeyspaces \nontermdef{requirement-body}\br \terminal{\{} requirement-seq \terminal{\}} \end{bnf} @@ -5834,7 +5835,7 @@ If the type is complete and if, for an array delete expression only, the operand is a pointer to a class type with a -non-trivial destructor or a (possibly multi-dimensional) array thereof, +non-trivial destructor or a (possibly multidimensional) array thereof, the function with a parameter of type \tcode{std::size_t} is selected. \item Otherwise, it is unspecified @@ -7655,13 +7656,17 @@ void splash(Swim& swam) { static_assert(swam.phelps() == 28); // OK static_assert((&swam)->phelps() == 28); // OK + Swim* pswam = &swam; static_assert(pswam->phelps() == 28); // error: lvalue-to-rvalue conversion on a pointer // not usable in constant expressions + static_assert(how_many(swam) == 28); // OK static_assert(Swim().lochte() == 12); // OK + static_assert(swam.lochte() == 12); // error: invoking virtual function on reference // with constexpr-unknown dynamic type + static_assert(swam.coughlin == 12); // error: lvalue-to-rvalue conversion on an object // not usable in constant expressions } @@ -7678,9 +7683,9 @@ An object \tcode{a} is said to have \defnadj{constant}{destruction} if: \begin{itemize} \item - it is not of class type nor (possibly multi-dimensional) array thereof, or + it is not of class type nor (possibly multidimensional) array thereof, or \item - it is of class type or (possibly multi-dimensional) array thereof, + it is of class type or (possibly multidimensional) array thereof, that class type has a constexpr destructor, and for a hypothetical expression $E$ whose only effect is to destroy \tcode{a}, diff --git a/source/future.tex b/source/future.tex index f417b2b506..3b75e30c7e 100644 --- a/source/future.tex +++ b/source/future.tex @@ -2697,7 +2697,7 @@ \rSec2[depr.atomics.volatile]{Volatile access} \pnum -If an atomic specialization has one of the following overloads, +If an \tcode{atomic}\iref{atomics.types.generic} specialization has one of the following overloads, then that overload participates in overload resolution even if \tcode{atomic::is_always_lock_free} is \tcode{false}: \begin{codeblock} diff --git a/source/iostreams.tex b/source/iostreams.tex index 16a6d97b9a..f8d884ff15 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -13610,8 +13610,8 @@ \begin{note} This results in behavior identical to other C and \Cpp{} standard library functions that perform file operations using ordinary character -strings to identify paths. Changing this behavior would be surprising and error -prone. +strings to identify paths. Changing this behavior would be surprising and +error-prone. \end{note} \item \keyword{wchar_t}: The encoding is the native wide encoding. The method of conversion is unspecified. @@ -15237,12 +15237,12 @@ \tcode{update_existing} & Overwrite the existing file if it is older than the replacement file. \\ \capsep -\ohdrx{2}{Option group controlling \tcode{copy} function effects for sub-directories} \\ \rowsep +\ohdrx{2}{Option group controlling \tcode{copy} function effects for subdirectories} \\ \rowsep \lhdr{Constant} & \rhdr{Meaning} \\ \capsep \tcode{none} & - (Default) Do not copy sub-directories. \\ \rowsep + (Default) Do not copy subdirectories. \\ \rowsep \tcode{recursive} & - Recursively copy sub-directories and their contents. \\ \capsep + Recursively copy subdirectories and their contents. \\ \capsep \ohdrx{2}{Option group controlling \tcode{copy} function effects for symbolic links} \\ \rowsep \lhdr{Constant} & \rhdr{Meaning} \\ \capsep @@ -15998,7 +15998,7 @@ for each file in a directory or in an \impldef{type of a directory-like file} directory-like file type. \begin{note} -For iteration into sub-directories, see class \tcode{recursive_directory_iterator}\iref{fs.class.rec.dir.itr}. +For iteration into subdirectories, see class \tcode{recursive_directory_iterator}\iref{fs.class.rec.dir.itr}. \end{note} \begin{codeblock} @@ -16236,7 +16236,7 @@ An object of type \tcode{recursive_directory_iterator} provides an iterator for a sequence of \tcode{directory_entry} elements representing the files in a directory or in an \impldef{type of a directory-like file} directory-like file -type, and its sub-directories. +type, and its subdirectories. \begin{codeblock} namespace std::filesystem { diff --git a/source/iterators.tex b/source/iterators.tex index 3b404f8c70..d4f5e240ae 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -1390,7 +1390,7 @@ \pnum A type \tcode{I} is an \defnadj{integer-class}{type} -if it is in a set of \impldef{integer-class type} types +if it is in a set of \impldef{set of integer-class types} types that behave as integer types do, as defined below. \begin{note} An integer-class type is not necessarily a class type. @@ -2441,29 +2441,29 @@ concept @\deflibconcept{indirectly_unary_invocable}@ = @\libconcept{indirectly_readable}@ && @\libconcept{copy_constructible}@ && - @\libconcept{invocable}@> && + @\libconcept{invocable}@> && @\libconcept{invocable}@> && @\libconcept{invocable}@> && @\libconcept{common_reference_with}@< - invoke_result_t>, + invoke_result_t>, invoke_result_t>>; template concept @\deflibconcept{indirectly_regular_unary_invocable}@ = @\libconcept{indirectly_readable}@ && @\libconcept{copy_constructible}@ && - @\libconcept{regular_invocable}@> && + @\libconcept{regular_invocable}@> && @\libconcept{regular_invocable}@> && @\libconcept{regular_invocable}@> && @\libconcept{common_reference_with}@< - invoke_result_t>, + invoke_result_t>, invoke_result_t>>; template concept @\deflibconcept{indirect_unary_predicate}@ = @\libconcept{indirectly_readable}@ && @\libconcept{copy_constructible}@ && - @\libconcept{predicate}@> && + @\libconcept{predicate}@> && @\libconcept{predicate}@> && @\libconcept{predicate}@>; @@ -2471,9 +2471,9 @@ concept @\deflibconcept{indirect_binary_predicate}@ = @\libconcept{indirectly_readable}@ && @\libconcept{indirectly_readable}@ && @\libconcept{copy_constructible}@ && - @\libconcept{predicate}@, @\exposid{indirect-value-t}@> && - @\libconcept{predicate}@, iter_reference_t> && - @\libconcept{predicate}@, @\exposid{indirect-value-t}@> && + @\libconcept{predicate}@, @\exposidnc{indirect-value-t}@> && + @\libconcept{predicate}@, iter_reference_t> && + @\libconcept{predicate}@, @\exposidnc{indirect-value-t}@> && @\libconcept{predicate}@, iter_reference_t> && @\libconcept{predicate}@, iter_common_reference_t>; @@ -2481,9 +2481,9 @@ concept @\deflibconcept{indirect_equivalence_relation}@ = @\libconcept{indirectly_readable}@ && @\libconcept{indirectly_readable}@ && @\libconcept{copy_constructible}@ && - @\libconcept{equivalence_relation}@, @\exposid{indirect-value-t}@> && - @\libconcept{equivalence_relation}@, iter_reference_t> && - @\libconcept{equivalence_relation}@, @\exposid{indirect-value-t}@&> && + @\libconcept{equivalence_relation}@, @\exposidnc{indirect-value-t}@> && + @\libconcept{equivalence_relation}@, iter_reference_t> && + @\libconcept{equivalence_relation}@, @\exposidnc{indirect-value-t}@> && @\libconcept{equivalence_relation}@, iter_reference_t> && @\libconcept{equivalence_relation}@, iter_common_reference_t>; @@ -2491,9 +2491,9 @@ concept @\deflibconcept{indirect_strict_weak_order}@ = @\libconcept{indirectly_readable}@ && @\libconcept{indirectly_readable}@ && @\libconcept{copy_constructible}@ && - @\libconcept{strict_weak_order}@, @\exposid{indirect-value-t}@> && - @\libconcept{strict_weak_order}@, iter_reference_t> && - @\libconcept{strict_weak_order}@, @\exposid{indirect-value-t}@> && + @\libconcept{strict_weak_order}@, @\exposidnc{indirect-value-t}@> && + @\libconcept{strict_weak_order}@, iter_reference_t> && + @\libconcept{strict_weak_order}@, @\exposidnc{indirect-value-t}@> && @\libconcept{strict_weak_order}@, iter_reference_t> && @\libconcept{strict_weak_order}@, iter_common_reference_t>; } diff --git a/source/layout.tex b/source/layout.tex index 65c53124f9..b74849dd00 100644 --- a/source/layout.tex +++ b/source/layout.tex @@ -21,7 +21,9 @@ %%-------------------------------------------------- %% If there is insufficient stretchable vertical space on a page, %% TeX will not properly consider penalties for a good page break, -%% even if \raggedbottom (default) is in effect. +%% even if \raggedbottom (default for oneside, not for twoside) +%% is in effect. +\raggedbottom \addtolength{\topskip}{0pt plus 20pt} %%-------------------------------------------------- diff --git a/source/lex.tex b/source/lex.tex index 022a2ac9ad..a253a50bae 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -692,6 +692,7 @@ \indextext{header!name|(}% \begin{bnf} +\microtypesetup{protrusion=false}\obeyspaces \nontermdef{header-name}\br \terminal{<} h-char-sequence \terminal{>}\br \terminal{"} q-char-sequence \terminal{"} diff --git a/source/lib-intro.tex b/source/lib-intro.tex index e64f55a063..f5039472b1 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1439,7 +1439,7 @@ include at least the headers shown in \tref{headers.cpp.fs}. \begin{libsumtab}{\Cpp{} headers for freestanding implementations}{headers.cpp.fs} -\ref{support.types} & Types & \tcode{} \\ \rowsep +\ref{support.types} & Common definitions & \tcode{} \\ \rowsep \ref{support.limits} & Implementation properties & \tcode{}, \tcode{}, \tcode{}, \tcode{} \\ \rowsep \ref{cstdint.syn} & Integer types & \tcode{} \\ \rowsep diff --git a/source/macros.tex b/source/macros.tex index a615cfabb0..13a4203294 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -61,7 +61,7 @@ \def\stopindexescape#1\doneindexescape{} %%-------------------------------------------------- -%% Cross references. +%% Cross-references. %%-------------------------------------------------- \newcommand{\addxref}[1]{% \glossary[xrefindex]{\indexescape{#1}}{(\ref{\indexescape{#1}})}% @@ -175,7 +175,7 @@ % This command uses the "cooked" \indeximpldef command to emit index % entries; thus they only work for simple index entries that do not contain % special indexing instructions. -\newcommand{\impldef}[1]{\indeximpldef{#1}implementation-defined} +\newcommand{\impldef}[1]{\indeximpldef{#1}imple\-men\-ta\-tion-defined} % \impldefplain passes the argument directly to the index, allowing you to % use special indexing instructions (!, @, |). \newcommand{\impldefplain}[1]{\index[impldefindex]{#1}implementation-defined} @@ -219,7 +219,7 @@ % General code style %%-------------------------------------------------- \newcommand{\CodeStyle}{\ttfamily} -\newcommand{\CodeStylex}[1]{\texttt{#1}} +\newcommand{\CodeStylex}[1]{\texttt{\protect\frenchspacing #1}} \definecolor{grammar-gray}{gray}{0.2} @@ -358,7 +358,7 @@ \newcommand{\ctype}{\Fundesc{Type}} \newcommand{\templalias}{\Fundesc{Alias template}} -%% Cross reference +%% Cross-reference \newcommand{\xref}{\textsc{See also:}\space} \newcommand{\xrefc}[1]{\xref{} ISO C #1} diff --git a/source/meta.tex b/source/meta.tex index 917869e651..7a31e4e60e 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -1792,7 +1792,7 @@ \indexlibraryglobal{remove_all_extents}% \tcode{template\br struct remove_all_extents;} & - If \tcode{T} is ``multi-dimensional array of \tcode{U}'', the resulting member + If \tcode{T} is ``multidimensional array of \tcode{U}'', the resulting member typedef \tcode{type} denotes \tcode{U}, otherwise \tcode{T}. \\ \end{libreqtab2a} diff --git a/source/modules.tex b/source/modules.tex index f38503d39e..78825dd401 100644 --- a/source/modules.tex +++ b/source/modules.tex @@ -382,9 +382,10 @@ \begin{example} \begin{codeblock} export module M; +int g; export namespace N { int x; // OK - static_assert(1 == 1); // error: does not declare a name + using ::g; // error: \tcode{::g} has module linkage } \end{codeblock} \end{example} diff --git a/source/overloading.tex b/source/overloading.tex index b9f47ea50b..d0698b19ea 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -3954,7 +3954,7 @@ The \grammarterm{ud-suffix} of the \grammarterm{user-defined-string-literal} or the \grammarterm{identifier} in a \grammarterm{literal-operator-id} is called a \defnx{literal suffix identifier}{literal!suffix identifier}. -The first form of \grammarterm{literal-operator-id} is deprecated. +The first form of \grammarterm{literal-operator-id} is deprecated\iref{depr.lit}. Some literal suffix identifiers are reserved for future standardization; see~\ref{usrlit.suffix}. A declaration whose \grammarterm{literal-operator-id} uses such a literal suffix identifier is ill-formed, no diagnostic required. diff --git a/source/preprocessor.tex b/source/preprocessor.tex index 5ad072c5c1..0093ee7c8f 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -1808,6 +1808,7 @@ \defnxname{cpp_alias_templates} & \tcode{200704L} \\ \rowsep \defnxname{cpp_aligned_new} & \tcode{201606L} \\ \rowsep \defnxname{cpp_attributes} & \tcode{200809L} \\ \rowsep +\defnxname{cpp_auto_cast} & \tcode{202110L} \\ \rowsep \defnxname{cpp_binary_literals} & \tcode{201304L} \\ \rowsep \defnxname{cpp_capture_star_this} & \tcode{201603L} \\ \rowsep \defnxname{cpp_char8_t} & \tcode{202207L} \\ \rowsep diff --git a/source/ranges.tex b/source/ranges.tex index 03c4ea1eaf..851ed0248e 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -474,7 +474,7 @@ namespace views { template - inline constexpr @\unspecnc@ adjacent = @\unspecnc@; // freestanding + constexpr @\unspecnc@ adjacent = @\unspecnc@; // freestanding inline constexpr auto @\libmember{pairwise}{views}@ = adjacent<2>; // freestanding } @@ -485,7 +485,7 @@ namespace views { template - inline constexpr @\unspecnc@ adjacent_transform = @\unspecnc@; // freestanding + constexpr @\unspecnc@ adjacent_transform = @\unspecnc@; // freestanding inline constexpr auto @\libmember{pairwise_transform}{views}@ = adjacent_transform<2>; // freestanding } @@ -1584,7 +1584,7 @@ \begin{itemdecl} template - inline constexpr bool @\exposidnc{is-initializer-list}@ = @\seebelow@; // \expos + constexpr bool @\exposidnc{is-initializer-list}@ = @\seebelow@; // \expos \end{itemdecl} \begin{itemdescr} @@ -3763,7 +3763,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return x.\exposid{current_} == y.\exposid{current_};}. +Equivalent to: \tcode{return x.\exposid{current_} == y.\exposid{current_};} \end{itemdescr} \indexlibrarymember{operator<=>}{repeat_view::\exposid{iterator}}% @@ -3774,7 +3774,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return x.\exposid{current_} <=> y.\exposid{current_};}. +Equivalent to: \tcode{return x.\exposid{current_} <=> y.\exposid{current_};} \end{itemdescr} \indexlibrarymember{operator+}{repeat_view::\exposid{iterator}}% @@ -9544,11 +9544,9 @@ return @\exposid{sentinel}@(ranges::end(@\exposid{base_}@)); } - constexpr auto size() - requires @\libconcept{sized_range}@ + constexpr auto size() requires @\libconcept{sized_range}@ { return ranges::size(@\exposid{base_}@); } - constexpr auto size() const - requires @\libconcept{sized_range}@ + constexpr auto size() const requires @\libconcept{sized_range}@ { return ranges::size(@\exposid{base_}@); } constexpr V base() const & requires @\libconcept{copy_constructible}@ { return @\exposid{base_}@; } @@ -10873,7 +10871,7 @@ Otherwise, if \tcode{(\libconcept{derived_from} \&\& ...)} is \tcode{true}, -\tcode{itera\-tor_category} denotes \tcode{bidirectional_iterator_tag}. +\tcode{iterator\-_category} denotes \tcode{bidirectional_iterator_tag}. \item Otherwise, if \tcode{(\libconcept{derived_from} \&\& ...)} @@ -15045,7 +15043,7 @@ }; template - cartesian_product_view(Vs&&...) -> cartesian_product_view...>; + cartesian_product_view(Vs&&...) -> cartesian_product_view...>; } \end{codeblock} @@ -15110,7 +15108,7 @@ \tcode{false} otherwise; and \item \tcode{\exposid{begin-or-first-end}(rng)} be expression-equivalent to -\tcode{\exposid{is-empty} ? ranges::begin(rng) : \exposid{cartesian-common-arg-end}(rng)} +\tcode{\exposid{is-empty} ? ranges::begin(rng) : \brk{}\exposid{cartesian-common-arg-end}(rng)} if \tcode{rng} is the first underlying range and \tcode{ranges::begin(rng)} otherwise. \end{itemize} diff --git a/source/std.tex b/source/std.tex index b58362bcb1..ee39c38fa8 100644 --- a/source/std.tex +++ b/source/std.tex @@ -74,6 +74,7 @@ \pdfstringdefDisableCommands{\def\textbf#1{#1}} \pdfstringdefDisableCommands{\def\raisebox#1{}} \pdfstringdefDisableCommands{\def\hspace#1{}} +\pdfstringdefDisableCommands{\def\frenchspacing{}} %%-------------------------------------------------- %% add special hyphenation rules diff --git a/source/support.tex b/source/support.tex index 1d23489e88..60320199c9 100644 --- a/source/support.tex +++ b/source/support.tex @@ -553,7 +553,7 @@ #define @\defnlibxname{cpp_lib_addressof_constexpr}@ 201603L // also in \libheader{memory} #define @\defnlibxname{cpp_lib_algorithm_iterator_requirements}@ 202207L // also in \libheader{algorithm}, \libheader{numeric}, \libheader{memory} -#define @\defnlibxname{cpp_lib_allocate_at_least}@ 202106L // also in \libheader{memory} +#define @\defnlibxname{cpp_lib_allocate_at_least}@ 202302L // also in \libheader{memory} #define @\defnlibxname{cpp_lib_allocator_traits_is_always_equal}@ 201411L // also in \libheader{memory}, \libheader{scoped_allocator}, \libheader{string}, \libheader{deque}, \libheader{forward_list}, \libheader{list}, \libheader{vector}, // \libheader{map}, \libheader{set}, \libheader{unordered_map}, \libheader{unordered_set} @@ -4949,7 +4949,7 @@ \pnum The name \tcode{compare_strong_order_fallback} denotes a customization point object\iref{customization.point.object}. -Given subexpressions \tcode{E} and {F}, +Given subexpressions \tcode{E} and \tcode{F}, the expression \tcode{compare_strong_order_fallback(E, F)} is expression-equivalent\iref{defns.expression.equivalent} to: \begin{itemize} diff --git a/source/templates.tex b/source/templates.tex index 613c87eb19..edac0e2650 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -402,7 +402,7 @@ all base classes and non-static data members are public and non-mutable and \item the types of all bases classes and non-static data members are -structural types or (possibly multi-dimensional) array thereof. +structural types or (possibly multidimensional) array thereof. \end{itemize} \end{itemize} @@ -2831,7 +2831,7 @@ designating the variable introduced by the $i^\text{th}$ \grammarterm{init-capture} that resulted from instantiation of -the \grammarterm{init-capture} pack. +the \grammarterm{init-capture} pack declaration. \end{itemize} When $N$ is zero, the instantiation of a pack expansion does not alter the syntactic interpretation of the enclosing construct, diff --git a/source/time.tex b/source/time.tex index ccfce44fbf..ef7289cb8f 100644 --- a/source/time.tex +++ b/source/time.tex @@ -1282,7 +1282,7 @@ The defaulted copy constructor of duration shall be a constexpr function if and only if the required initialization of the member \tcode{rep_} for copy and move, respectively, would -satisfy the requirements for a constexpr function. +be constexpr-suitable\iref{dcl.constexpr}. \pnum \begin{example} diff --git a/source/utilities.tex b/source/utilities.tex index 6bd360c47f..1b40eb3974 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -779,8 +779,8 @@ \pnum The defaulted move and copy constructor, respectively, of \tcode{pair} is a constexpr function if and only if all required element-wise -initializations for move and copy, respectively, would satisfy the -requirements for a constexpr function. +initializations for move and copy, respectively, +would be constexpr-suitable\iref{dcl.constexpr}. \pnum If \tcode{(is_trivially_destructible_v \&\& is_trivially_destructible_v)} @@ -1749,8 +1749,8 @@ The defaulted move and copy constructor, respectively, of \tcode{tuple} is a constexpr function if and only if all required element-wise initializations for move and copy, respectively, -would satisfy the requirements for a constexpr function. The -defaulted move and copy constructor of \tcode{tuple<>} are +would be constexpr-suitable\iref{dcl.constexpr}. +The defaulted move and copy constructor of \tcode{tuple<>} are constexpr functions. \pnum @@ -5066,8 +5066,8 @@ \pnum \remarks This function is \keyword{constexpr} if and only if the -value-initialization of the alternative type $\tcode{T}_0$ would satisfy the -requirements for a constexpr function. +value-initialization of the alternative type $\tcode{T}_0$ +would be constexpr-suitable\iref{dcl.constexpr}. The exception specification is equivalent to \tcode{is_nothrow_default_constructible_v<$\tcode{T}_0$>}. \begin{note} @@ -14610,13 +14610,13 @@ // \ref{format.range}, formatting of ranges // \ref{format.range.fmtkind}, variable template \tcode{format_kind} - enum class range_format { - disabled, - map, - set, - sequence, - string, - debug_string + enum class @\libglobal{range_format}@ { + @\libmember{disabled}{range_format}@, + @\libmember{map}{range_format}@, + @\libmember{set}{range_format}@, + @\libmember{sequence}{range_format}@, + @\libmember{string}{range_format}@, + @\libmember{debug_string}{range_format}@ }; template @@ -14859,7 +14859,7 @@ \end{ncbnf} \pnum -Field widths are specified in defnadj{field width}{units}; +Field widths are specified in \defnadj{field width}{units}; the number of column positions required to display a sequence of characters in a terminal. The \defnadj{minimum}{field width} @@ -14907,7 +14907,7 @@ string s1 = format("{:6}", 'x'); // value of \tcode{s1} is \tcode{"x\ \ \ \ \ "} string s2 = format("{:*<6}", 'x'); // value of \tcode{s2} is \tcode{"x*****"} string s3 = format("{:*>6}", 'x'); // value of \tcode{s3} is \tcode{"*****x"} -string s4 = format("{:*^6}", 'x'); // value of \tcode{s4} is \tcode{"**x***"} +string s4 = format("{:*@\caret{}@6}", 'x'); // value of \tcode{s4} is \tcode{"**x***"} string s5 = format("{:6d}", c); // value of \tcode{s5} is \tcode{"\ \ \ 120"} string s6 = format("{:6}", true); // value of \tcode{s6} is \tcode{"true\ \ "} string s7 = format("{:*<6.3}", "123456"); // value of \tcode{s7} is \tcode{"123***"} @@ -15052,7 +15052,7 @@ string s1 = format("{:+06d}", c); // value of \tcode{s1} is \tcode{"+00120"} string s2 = format("{:#06x}", 0xa); // value of \tcode{s2} is \tcode{"0x000a"} string s3 = format("{:<06}", -42); // value of \tcode{s3} is \tcode{"-42\ \ \ "} (\tcode{0} has no effect) -string s4 = format("{:06}", inf); // value of \tcode{s4} is \tcode{" inf"} (\tcode{0} has no effect) +string s4 = format("{:06}", inf); // value of \tcode{s4} is \tcode{"\ \ \ inf"} (\tcode{0} has no effect) \end{codeblock} \end{example} @@ -15073,8 +15073,8 @@ \pnum % FIXME: What if it's an arg-id? If \fmtgrammarterm{positive-integer} is used in a -\fmtgrammarterm{width} option, the value of the decimal integer -is used as the value of the option. +\fmtgrammarterm{width} option, the value of the \fmtgrammarterm{positive-integer} +is interpreted as a decimal integer and used as the value of the option. \pnum For the purposes of width computation, @@ -16136,7 +16136,7 @@ %% FIXME: their Unicode characters are not available in our font (Latin Modern). \begin{example} \begin{codeblock} -string s0 = format("[{}]", "h\tllo"); // \tcode{s0} has value: \tcode{[h llo]} +string s0 = format("[{}]", "h\tllo"); // \tcode{s0} has value: \tcode{[h\ \ \ \ llo]} string s1 = format("[{:?}]", "h\tllo"); // \tcode{s1} has value: \tcode{["h\textbackslash tllo"]} string s3 = format("[{:?}, {:?}]", '\'', '"'); // \tcode{s3} has value: \tcode{['\textbackslash '', '"']}