diff --git a/papers/n4965.html b/papers/n4965.html new file mode 100644 index 0000000000..de693b4372 --- /dev/null +++ b/papers/n4965.html @@ -0,0 +1,658 @@ + + + + + +Codestin Search App + + +

N4965 Editors’ Report — Programming Languages — C++

+ +

Date: 2023-10-15

+ +

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

+ + + +

Comments on the Draft International Standard

+ +

This report includes a snapshot of our 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

+ +

There have not been any motions from WG21 since the last working draft. This +revision incorporates all the changes resulting from the DIS ballot comments for +C++23, in as far as they apply to the current working draft, as well as other +editorial changes.

+ +

Minor editorial changes

+ +

A log of editorial fixes made to the working draft since N4958 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 a4b1ffd9e65188ae19c29dffd2db42cb1558cee2
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Tue Aug 15 01:18:00 2023 +0200
+
+    [except.terminate] add comma after introductory phrase (#6446)
+
+commit aa8a5315136feb1af9084a2a914ba19cd8758a74
+Author: Salvage <29021710+Saalvage@users.noreply.github.com>
+Date:   Sun May 28 18:59:26 2023 +0200
+
+    [flat.multiset.defn] Fix minor errors and inconsistencies
+
+    [flat.set.defn] and [flat.multiset.defn] are now formatted identically.
+    Additionally removed erroenous template parameters in two deduction guides.
+
+commit d3ac7d4c1c74df5d5b375f4c0260345be18b0b0b
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Wed Aug 16 16:21:40 2023 +0200
+
+    [conv.ptr, conv.mem] Remove redundant text on null pointer comparisons (#6411)
+
+commit b55ad4cb65b53bb6b6e60064938537f07d63bfb3
+Author: Alisdair Meredith <alisdairm@me.com>
+Date:   Thu Aug 17 00:32:21 2023 +0200
+
+    [algorithms.parallel.defns] New paragraph for example (#6447)
+
+    Making the example a sibling to the preceding paragraph
+    rather than part of it resets its list numbering, which is less
+    confusing than continuing numbering.
+
+commit be07cd4e87c693fb9749c1e5e7c07ee0cf9e0084
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Aug 2 01:28:29 2023 +0800
+
+    [diagnostics] Exposition-only formatting for members
+
+commit 7b7dedba78c8ae860db78feb3149acdf34ebb551
+Author: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
+Date:   Thu Aug 17 21:04:37 2023 +0200
+
+    [time.general] Add a reference to time.hash in the summary
+
+    [time.general] has a library summary with references to the various
+    subclauses; [time.hash] was missing, add it.
+
+commit 1e9e54ef536870ea01e6b016e4219e57df0c099b
+Author: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
+Date:   Thu Aug 17 21:07:27 2023 +0200
+
+    [time.hash] Fix a typo in the code for zoned_time
+
+    The `m` was supposed to be a `,` to separate the template arguments.
+
+commit a272b7cd04dc0be488250a0c6aaead160e778774
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Fri Aug 18 12:11:24 2023 +0800
+
+    [iterator.concept.readable] Add missing \expos for indirectly-readable-impl
+
+    Also adjust horizontal whitespace in related comments.
+
+commit 846dc84ac222e5f4a26373899a2cbd683f83991c
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Sun Aug 20 16:56:55 2023 +0200
+
+    [diff.cpp20.utilities] Hyphenate bit-fields (#6481)
+
+commit 433baff775b00c2b72d0d81d792c24617c2ace06
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Sun Aug 20 20:56:34 2023 +0200
+
+    [tuple.swap] Improve 'call x with y' wording (#6478)
+
+commit 1c22d62180901069128b21daa2773d40566bd983
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Mon Aug 21 08:31:10 2023 +0200
+
+    [lex.phases] Add cross-reference to [cpp.include] (#6485)
+
+commit a54e71ed55a590214f2f33f4b1b900263a5f0b0d
+Author: Eelis van der Weegen <eelis@eelis.net>
+Date:   Fri Aug 25 18:05:32 2023 +0200
+
+    [rand.device] Remove stray \textit.
+
+    Fixes #6513.
+
+commit 9a0b5d767ed6ef038adc129856c0c0623f552abe
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Mon Aug 28 14:51:28 2023 +0200
+
+    [vector.data],[array.members] Clarify boolean condition (#6526)
+
+commit 8845a3778dbbd078c83a66ac09ae07e6357ec3e5
+Author: Eisenwave <me@eisenwave.net>
+Date:   Mon Aug 28 15:33:11 2023 +0200
+
+    [expr.call] add further forward references
+
+commit 837d6c979124200f1e06bc582079a60767c2756b
+Author: Daniel Krügler <daniel.kruegler@gmail.com>
+Date:   Sat Aug 26 18:35:55 2023 +0200
+
+    [atomics] Reword preconditions on memory_order values in a positive form
+
+commit 55b87300ce414fc5aa761838f217a957c797e9bf
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Aug 29 13:12:09 2023 +0100
+
+    [format.string.std] Fix example
+
+commit 61c089e934c1df406580eeb488dd5cee0900a7b1
+Author: A. Jiang <de34@live.cn>
+Date:   Sat Jul 29 01:36:15 2023 +0800
+
+    [intro.object] Fix alignment in example
+
+    Makes the storage in the example properly aligned,
+    and explicitly states size assumption.
+
+commit 90d56dbe810e707d90322a3d16256e122e915eca
+Author: Eisenwave <me@eisenwave.net>
+Date:   Sat Aug 19 15:51:27 2023 +0200
+
+    [expr.sizeof] turn identifier into a grammarterm
+
+commit f52ffc9054913f3f9a4c5dc6973f6c5c3e7f1096
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Wed Aug 30 08:56:33 2023 +0200
+
+    [class.access.general] Fix improper \keyword{private} (#6532)
+
+commit d02a12a70c53974442f3e3ca4a75227783ea39d7
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Wed Aug 30 19:54:36 2023 +0200
+
+    [lex.string] Mark "narrow string literal" as a definition (#6533)
+
+commit 31154dccdbe33aadb91d43cc03884f2d1aa5dbc0
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Sat Sep 2 09:08:17 2023 +0200
+
+    [class.local] Add comma after introductory phrase (#6545)
+
+commit f9d08b09ffd8f68a32cbb480d54ab517e425d519
+Author: Joshua Berne <berne@notadragon.com>
+Date:   Sat Sep 2 12:56:57 2023 -0400
+
+    [diff.cpp20.thread] Add hyphen for "ill-formed" (#6550)
+
+commit 9130806ceb4a9476153eb7544b4509b713cce3e0
+Author: Eisenwave <me@eisenwave.net>
+Date:   Wed Aug 30 14:01:06 2023 +0200
+
+    [fs.path.member] fix empty() == true
+
+commit ae4ae54b293c28d782902b955af8abae5229fc6d
+Author: Eisenwave <me@eisenwave.net>
+Date:   Wed Aug 30 14:01:49 2023 +0200
+
+    [fs.path.modifiers] fix empty() == true
+
+commit ab4185710a64b303e6d302ac43c543849d79c5a8
+Author: Eisenwave <me@eisenwave.net>
+Date:   Wed Aug 30 14:06:30 2023 +0200
+
+    [fs.filesystem.error.members] fix missing 'is true'
+
+commit 86b18720b37dadefe6c753ac2aec478b8f87593d
+Author: Alisdair Meredith <alisdairm@me.com>
+Date:   Tue Sep 5 16:19:25 2023 -0400
+
+    [basic.types.general] Apply Oxford comma consistently (#6554)
+
+commit 16c8ce5db2173a098a91e552dcfa3544c67e544f
+Author: Eelis <github.com@contacts.eelis.net>
+Date:   Fri Sep 8 08:05:36 2023 +0200
+
+    [mdspan.submdspan.extents] Format equations as math (#6530)
+
+commit 3bdb5e7b2b947ecd9fbb42029899ec098b51c51c
+Author: Casey Carter <Casey@Carter.net>
+Date:   Wed Sep 13 00:24:17 2023 -0700
+
+    [mdspan.layout.stride.cons] Fix cross-reference (#6565)
+
+commit 536653b854e293af569156864ea6aa407c90e011
+Author: Casey Carter <Casey@Carter.net>
+Date:   Mon Sep 11 10:36:39 2023 -0700
+
+    [mdspan.extents.cons] require conversions to index_type to be nonnegative
+
+    "nonnegative" is meaningless for a value of some arbitrary type which we've only required to be convertible to the integral type `index_type`, so this wording clearly intends to constrain the result of the conversion.
+
+commit 5c7841b1530dc02dbf7feacd5e154b777632dc36
+Author: Casey Carter <Casey@Carter.net>
+Date:   Mon Sep 11 16:56:47 2023 -0700
+
+    [mdspan.layout.stride.cons] Convert to integral type before comparing to 0
+
+    `s[i]` is an lvalue of a type that we can only convert to `index_type`; clearly the wording intends that the result of the conversion should be `> 0`.
+
+commit 24659bd716808538fb7066103a396e785e4f0099
+Author: Casey Carter <Casey@Carter.net>
+Date:   Mon Sep 11 16:59:56 2023 -0700
+
+    [mdspan.layout.stride.expo] Convert to integral type to perform math
+
+    [mdspan.layout.stride.cons] uses either a span or array of a type which we can only convert to `index_type` as the second argument to the exposition-only `REQUIRED-SPAN-SIZE`. We must perform that conversion before doing math with the result.
+
+commit 81c3897d34ccd32d4ccdbe3c74091ba1db458533
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Wed Oct 4 00:22:33 2023 +0800
+
+    [const.iterators.ops] Add missing \pnum and replace returns with effects (#6581)
+
+commit 34cf81ebc821377eb3969002e4669bf5e08f479f
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Wed Oct 4 02:59:42 2023 +0800
+
+    [common.iter.const] Add missing period for Returns (#6584)
+
+commit 22537613dd844670ee9fb9d5afcf19f89c26fd26
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Tue Sep 26 07:21:52 2023 +0200
+
+    [temp.over.link] Fix phrasing and cross-reference introduced by P1787R6
+
+commit 1398617dfd99dd3383e801abee6ce58629439f3a
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Wed Oct 4 17:48:32 2023 +0200
+
+    [tab:headers.cpp] Add <hazard_pointer> (#6586)
+
+commit 78635c91ac910e9c0953e1784eec648a214eb5ad
+Author: Casey Carter <Casey@Carter.net>
+Date:   Wed Oct 4 14:44:18 2023 -0700
+
+    [string.cons] Remove erroneous paragraph break (#6587)
+
+commit a2e820424e089806191a40d43df2360906902d86
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Tue Sep 19 13:36:52 2023 +0100
+
+    [range.utility.conv.to] Add terminating condition for first bullet
+
+    We currently fail to say what happens if the first bullet is true, but
+    then none of its sub-bullets is true.
+
+commit 9369ba13509cd5d2c9e862b7ad02f109c204a585
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Tue Sep 19 16:19:50 2023 +0100
+
+    [version.syn] Put feature test macros in alphabetical order
+
+commit 1430209dbf6edda0827207166770c4d964cf0598
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Oct 6 15:53:39 2023 +0200
+
+    [time.format] Make reference to ISO 8601 more precise
+
+    Fixes ISO/CS 003 (C++23 DIS).
+
+commit 7ed9cbfef44d15b798af83223f5d3b62927652a5
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Oct 6 15:14:44 2023 +0200
+
+    [intro.refs] Fix title of ISO/IEC 9899:2018
+
+    Fixes ISO/CS 004 (C++23 DIS).
+
+commit 258290ecc9d6e4d615b29173fd520df1f66a3292
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Oct 6 01:21:01 2023 +0200
+
+    [annex] Fix table numbering in annexes
+
+    Fixes ISO/CS 029 (C++23 DIS).
+
+commit c39f5b014540820b4ea2061805a92c417e43ca0d
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Oct 6 14:59:03 2023 +0200
+
+    [lex.name] Add cross-reference to Annex E
+
+    Fixes ISO/CS 030 (C++23 DIS).
+
+commit b5d6409bf5132d653bc13a3ce8f76c556d5d6fc9
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sat Oct 7 22:50:53 2023 +0200
+
+    [defns.component] Remove unwarranted italics
+
+    Fixes ISO/CS 018 (C++23 DIS).
+
+commit 722bd4f167badc5bb5dddde9b0d00f91c2ef1644
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Oct 6 13:24:16 2023 +0200
+
+    [util.smartptr.shared.cmp] Fix missing right parenthesis
+
+    Fixes NB JP 025 (C++23 DIS).
+
+commit 24b090f5c63bf99d4cdcea8989d885f2d23c00e7
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Oct 6 13:20:03 2023 +0200
+
+    [unique.ptr.runtime.modifiers] Fix placement of 'constexpr'
+
+    Fixes NB JP 024 (C++23 DIS).
+
+commit 400521547f60196f6dfa7857bdcc907698991df8
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sat Oct 7 11:11:15 2023 +0200
+
+    [expr.const] Amend comments in example
+
+    Fixes NB JP 023 (C++23 DIS).
+
+commit 812e64a65699bb01203fbedcc7d9d5ea004a5007
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sat Oct 7 22:32:16 2023 +0200
+
+    [expr.prim.lambda.general] Add example for parsing ambiguity
+
+    Fixes NB JP 021 (C++23 DIS).
+
+commit bd7f9a9e640bfcd204cabecf1cc4953b7138554e
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sat Oct 7 10:38:29 2023 +0200
+
+    [intro.scope] Clarify 'they'
+
+    Fixes ISO/CS 034 (C++23 DIS).
+
+commit dc597fa561a795c100a36f46376d6ddd0cf93a31
+Author: Alisdair Meredith <alisdairm@me.com>
+Date:   Mon Oct 9 12:02:19 2023 -0400
+
+    [expr.prim.lambda.closure] Insert an extra \pnum (#6594)
+
+commit d81c17120e5a527f779b965ba8fd1ce66cfc24ef
+Author: Alisdair Meredith <alisdairm@me.com>
+Date:   Mon Oct 9 12:03:25 2023 -0400
+
+    [obj.lifetime] Dehyphenate trivially-copyable (#6592)
+
+commit d29b1fc1c22018b1a83cee910ebdbb4520d2c960
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sun Oct 8 09:52:42 2023 +0200
+
+    [lex.charset] Add reference to the Unicode Standard
+
+commit e128de19470877fbf8f0335b8c0e2a1700f2e320
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sun Oct 8 11:52:06 2023 +0200
+
+    [lex.charset] Clarify normative reference to Unicode for UTF-x
+
+    Fixes ISO/CS 008 (C++23 DIS).
+
+commit 4d603c640dd47c71f84bbce55416302efab8b298
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Oct 10 23:55:22 2023 +0100
+
+    [intro.defs] Remove inappropriate paragraph.
+
+    Only specific, fixed wording is allowed in Clause 3.
+
+    Fixes ISO/CS 009 (C++23 DIS).
+
+commit 7d4fa2432b58a2ef6a2062812ec00ccde4443acf
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Wed Oct 11 01:04:35 2023 +0200
+
+    [intro.defs] Remove unused definitions
+
+    The terms "arbitrary-positional stream", "repositional stream",
+    and "iostream class templates" are removed.
+
+    Fixes ISO/CS 011 and ISO/CS 16 (C++23 DIS).
+
+commit 4c76193e3d310ea5a18679ab86a54074fe1635e9
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Wed Oct 11 00:14:53 2023 +0100
+
+    [defns.impl.limits] Use singular
+
+    Fixes ISO/CS 015 (C++23 DIS).
+
+commit f672ecf38d2aec6ccf184d1a36bc4e83809afab0
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Wed Oct 11 00:46:29 2023 +0100
+
+    [std] Replace "C Standard" with "ISO/IEC 9899:2018".
+
+    Fixes ISO/CS 035 (C++23 DIS).
+
+commit 2d6182932954732f71a28d90ec1f1b23838ccc67
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Wed Oct 11 01:13:46 2023 +0100
+
+    [intro.{r,d}efs] Make "C standard library" a defined term
+
+    Partially fixes ISO/CS-002 (C++23 DIS).
+
+commit 4676f765f696774807688c3adfdc2eb03905a827
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sun Oct 8 12:30:18 2023 +0200
+
+    [type.traits] Add references to tables
+
+    Fixes ISO/CS 001 (C++23 DIS).
+
+commit 583391e28f34d6e0a17f67f77e04ba4f924c1d13
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat Oct 14 20:42:50 2023 +0100
+
+    [intro.defs, dcl.init.list] Move definition of direct-non-list-init
+
+    Partially fixes ISO/CS-11 (C++23 DIS).
+
+commit 4a8e84ede8a927a7ebe7fa16a086041db437d57c
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat Oct 14 20:58:52 2023 +0100
+
+    [xrefdelta] Remove mention of removals that are now already in C++23
+
+ + diff --git a/papers/n4965.md b/papers/n4965.md new file mode 100644 index 0000000000..fabff56da6 --- /dev/null +++ b/papers/n4965.md @@ -0,0 +1,515 @@ +# N4965 Editors' Report -- Programming Languages -- C++ + +Date: 2023-10-15 + +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 + + * [N4964](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4964.pdf) is the + current working draft for C++26. It replaces + [N4958](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4958.pdf). + * N4965 is this Editors' Report. + +## Comments on the Draft International Standard + +This report includes a snapshot of our 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. + +* **ISO/CS 01:** Accepted. We added references to the tables. +* **ISO/CS 02:** _in progress_ +* **ISO/CS 03:** Accepted. We are now referring to a specific element, and keeping the dated reference. +* **ISO/CS 04:** Accepted. +* **ISO/CS 05:** Rejected: We do not understand the justification "Since there is no specific element referenced this reference shall be undated." The Drafting Directives seem to make a clear case for when undated (10.4) and dated (10.5) references are appropriate, and we firmly fall into the case where an undated reference is inappropriate ("if it will be possible to use all future changes of the referenced document" is defintely not the case). Reference to a specific element does not seem to be required in order to permit the use of a dated reference. Even the House Style seems to permit dated references when necessary: "When referring to the whole document, use an undated document number unless it is necessary that the user refers to a specific edition". +* **ISO/CS 06:** Rejected: Moot by comment 05. +* **ISO/CS 07:** Rejected: Moot by comment 05. +* **ISO/CS 08:** Accepted. We reworded the reference to the Unicode standard to make the normative nature more obvious. +* **ISO/CS 09:** Accepted. +* **ISO/CS 10:** Rejected: We find domains valuable here, since the terms often sound like plain English words, but have rather domain-specific meaning, and the domain establishes important context to aid understandability. +* **ISO/CS 11:** Accepted with modifications: four unused definitions are removed. The remaining term, "unspecified behavior" is retained, since it captures a variety of patterns which are not lexically spelled "behavior" but are neatly covered by this umbrella term. +* **ISO/CS 12:** Accepted with modifications: we have italicized the cross-references. However, for the formal grammar terms that we display in italic sans font, please see the discussion on comment 32. +* **ISO/CS 13:** Rejected: The token "CE" is not an acronym, but a meta variable (like "x" or "y". It is typeset distinctly. The name is evocative of its use. +* **ISO/CS 14:** Accepted. +* **ISO/CS 15:** Accepted. +* **ISO/CS 16:** Rejected: The wording is correct as written. However, this is also mooted by comment 11, which deletes the wording in question. +* **ISO/CS 17:** Accepted. +* **ISO/CS 18:** Accepted. +* **ISO/CS 19:** Accepted. +* **CA 20:** n/a, comment was filed erroneously +* **JP 21:** Accepted. We added an example. +* **JP 22:** Rejected: No consensus for change; any attributes of a lambda-declarator are considered to be attached to the synthesized function call operator or operator template (i.e. the member function of the closure type), not the closure type itself. +* **JP 23:** Accepted with modifications: The example is written as intended. The comments in the example have been amended to clarify the exposition. +* **JP 24:** Accepted. +* **JP 25:** Accepted. +* **JP 26:** Rejected: No concensus for change; the example deliberately introduces a facility to aid comprehension. +* **JP 27:** Rejected: No concensus for change; the example deliberately introduces a facility to aid comprehension. +* **JP 28:** Rejected: No concensus for change; the example deliberately introduces a facility to aid comprehension. +* **ISO/CS 29:** Accepted. +* **ISO/CS 30:** Accepted. We added a note that refers to the annex. +* **ISO/CS 31:** Accepted. We had previously used foreword wording from an older document. +* **ISO/CS 32:** Rejected (to be discussed), along with comment 12. +* **ISO/CS 33:** Rejected: We have an approved SC22 ballot to permit the use of paragraph numbers. (We also have a proposal for the JDMT to add such a permission to the Drafting Directives.) +* **ISO/CS 34:** Accepted. Reworded to clarify. +* **ISO/CS 35:** Accepted. +* **ISO/CS 36:** Accepted the notes and tables captioning changes. Rejected the UK English spelling: The document defines many terms that must be spelled the same way by conforming implementations and by users of those implementations, and these terms use US English spelling. It would be confusing for the document text to use UK English spelling when describing these terms. (This is the same disposition as for a similar comment on the DIS ballot of 14882:2017.) +* **ISO/CS 37:** _in progress_ +* **ISO/CS 38:** Accepted with modifications: We will review the presentation of cross-references in Clause 3. However, the use of italics in Clause 3 is not a regular "emphasis/definition" in body font, but rather a grammar production, which we typeset distinctly. Please also see the discussion regarding comment 32. +* **ISO/CS 39:** _in progress_ +* **ISO/CS 40:** Accepted. The logic that processed the notes was erroneous and failed to handle subclauses with more than 9 notes; this has been fixed. + +## Editorial changes + +There have not been any motions from WG21 since the last working draft. This +revision incorporates all the changes resulting from the DIS ballot comments for +C++23, in as far as they apply to the current working draft, as well as other +editorial changes. + +### Minor editorial changes + +A log of editorial fixes made to the working draft since N4958 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/n4958...n4964). + + commit a4b1ffd9e65188ae19c29dffd2db42cb1558cee2 + Author: Jan Schultke + Date: Tue Aug 15 01:18:00 2023 +0200 + + [except.terminate] add comma after introductory phrase (#6446) + + commit aa8a5315136feb1af9084a2a914ba19cd8758a74 + Author: Salvage <29021710+Saalvage@users.noreply.github.com> + Date: Sun May 28 18:59:26 2023 +0200 + + [flat.multiset.defn] Fix minor errors and inconsistencies + + [flat.set.defn] and [flat.multiset.defn] are now formatted identically. + Additionally removed erroenous template parameters in two deduction guides. + + commit d3ac7d4c1c74df5d5b375f4c0260345be18b0b0b + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Wed Aug 16 16:21:40 2023 +0200 + + [conv.ptr, conv.mem] Remove redundant text on null pointer comparisons (#6411) + + commit b55ad4cb65b53bb6b6e60064938537f07d63bfb3 + Author: Alisdair Meredith + Date: Thu Aug 17 00:32:21 2023 +0200 + + [algorithms.parallel.defns] New paragraph for example (#6447) + + Making the example a sibling to the preceding paragraph + rather than part of it resets its list numbering, which is less + confusing than continuing numbering. + + commit be07cd4e87c693fb9749c1e5e7c07ee0cf9e0084 + Author: A. Jiang + Date: Wed Aug 2 01:28:29 2023 +0800 + + [diagnostics] Exposition-only formatting for members + + commit 7b7dedba78c8ae860db78feb3149acdf34ebb551 + Author: Giuseppe D'Angelo + Date: Thu Aug 17 21:04:37 2023 +0200 + + [time.general] Add a reference to time.hash in the summary + + [time.general] has a library summary with references to the various + subclauses; [time.hash] was missing, add it. + + commit 1e9e54ef536870ea01e6b016e4219e57df0c099b + Author: Giuseppe D'Angelo + Date: Thu Aug 17 21:07:27 2023 +0200 + + [time.hash] Fix a typo in the code for zoned_time + + The `m` was supposed to be a `,` to separate the template arguments. + + commit a272b7cd04dc0be488250a0c6aaead160e778774 + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Fri Aug 18 12:11:24 2023 +0800 + + [iterator.concept.readable] Add missing \expos for indirectly-readable-impl + + Also adjust horizontal whitespace in related comments. + + commit 846dc84ac222e5f4a26373899a2cbd683f83991c + Author: Jan Schultke + Date: Sun Aug 20 16:56:55 2023 +0200 + + [diff.cpp20.utilities] Hyphenate bit-fields (#6481) + + commit 433baff775b00c2b72d0d81d792c24617c2ace06 + Author: Jan Schultke + Date: Sun Aug 20 20:56:34 2023 +0200 + + [tuple.swap] Improve 'call x with y' wording (#6478) + + commit 1c22d62180901069128b21daa2773d40566bd983 + Author: Jan Schultke + Date: Mon Aug 21 08:31:10 2023 +0200 + + [lex.phases] Add cross-reference to [cpp.include] (#6485) + + commit a54e71ed55a590214f2f33f4b1b900263a5f0b0d + Author: Eelis van der Weegen + Date: Fri Aug 25 18:05:32 2023 +0200 + + [rand.device] Remove stray \textit. + + Fixes #6513. + + commit 9a0b5d767ed6ef038adc129856c0c0623f552abe + Author: Jan Schultke + Date: Mon Aug 28 14:51:28 2023 +0200 + + [vector.data],[array.members] Clarify boolean condition (#6526) + + commit 8845a3778dbbd078c83a66ac09ae07e6357ec3e5 + Author: Eisenwave + Date: Mon Aug 28 15:33:11 2023 +0200 + + [expr.call] add further forward references + + commit 837d6c979124200f1e06bc582079a60767c2756b + Author: Daniel Krügler + Date: Sat Aug 26 18:35:55 2023 +0200 + + [atomics] Reword preconditions on memory_order values in a positive form + + commit 55b87300ce414fc5aa761838f217a957c797e9bf + Author: Thomas Köppe + Date: Tue Aug 29 13:12:09 2023 +0100 + + [format.string.std] Fix example + + commit 61c089e934c1df406580eeb488dd5cee0900a7b1 + Author: A. Jiang + Date: Sat Jul 29 01:36:15 2023 +0800 + + [intro.object] Fix alignment in example + + Makes the storage in the example properly aligned, + and explicitly states size assumption. + + commit 90d56dbe810e707d90322a3d16256e122e915eca + Author: Eisenwave + Date: Sat Aug 19 15:51:27 2023 +0200 + + [expr.sizeof] turn identifier into a grammarterm + + commit f52ffc9054913f3f9a4c5dc6973f6c5c3e7f1096 + Author: Jan Schultke + Date: Wed Aug 30 08:56:33 2023 +0200 + + [class.access.general] Fix improper \keyword{private} (#6532) + + commit d02a12a70c53974442f3e3ca4a75227783ea39d7 + Author: Jan Schultke + Date: Wed Aug 30 19:54:36 2023 +0200 + + [lex.string] Mark "narrow string literal" as a definition (#6533) + + commit 31154dccdbe33aadb91d43cc03884f2d1aa5dbc0 + Author: Jan Schultke + Date: Sat Sep 2 09:08:17 2023 +0200 + + [class.local] Add comma after introductory phrase (#6545) + + commit f9d08b09ffd8f68a32cbb480d54ab517e425d519 + Author: Joshua Berne + Date: Sat Sep 2 12:56:57 2023 -0400 + + [diff.cpp20.thread] Add hyphen for "ill-formed" (#6550) + + commit 9130806ceb4a9476153eb7544b4509b713cce3e0 + Author: Eisenwave + Date: Wed Aug 30 14:01:06 2023 +0200 + + [fs.path.member] fix empty() == true + + commit ae4ae54b293c28d782902b955af8abae5229fc6d + Author: Eisenwave + Date: Wed Aug 30 14:01:49 2023 +0200 + + [fs.path.modifiers] fix empty() == true + + commit ab4185710a64b303e6d302ac43c543849d79c5a8 + Author: Eisenwave + Date: Wed Aug 30 14:06:30 2023 +0200 + + [fs.filesystem.error.members] fix missing 'is true' + + commit 86b18720b37dadefe6c753ac2aec478b8f87593d + Author: Alisdair Meredith + Date: Tue Sep 5 16:19:25 2023 -0400 + + [basic.types.general] Apply Oxford comma consistently (#6554) + + commit 16c8ce5db2173a098a91e552dcfa3544c67e544f + Author: Eelis + Date: Fri Sep 8 08:05:36 2023 +0200 + + [mdspan.submdspan.extents] Format equations as math (#6530) + + commit 3bdb5e7b2b947ecd9fbb42029899ec098b51c51c + Author: Casey Carter + Date: Wed Sep 13 00:24:17 2023 -0700 + + [mdspan.layout.stride.cons] Fix cross-reference (#6565) + + commit 536653b854e293af569156864ea6aa407c90e011 + Author: Casey Carter + Date: Mon Sep 11 10:36:39 2023 -0700 + + [mdspan.extents.cons] require conversions to index_type to be nonnegative + + "nonnegative" is meaningless for a value of some arbitrary type which we've only required to be convertible to the integral type `index_type`, so this wording clearly intends to constrain the result of the conversion. + + commit 5c7841b1530dc02dbf7feacd5e154b777632dc36 + Author: Casey Carter + Date: Mon Sep 11 16:56:47 2023 -0700 + + [mdspan.layout.stride.cons] Convert to integral type before comparing to 0 + + `s[i]` is an lvalue of a type that we can only convert to `index_type`; clearly the wording intends that the result of the conversion should be `> 0`. + + commit 24659bd716808538fb7066103a396e785e4f0099 + Author: Casey Carter + Date: Mon Sep 11 16:59:56 2023 -0700 + + [mdspan.layout.stride.expo] Convert to integral type to perform math + + [mdspan.layout.stride.cons] uses either a span or array of a type which we can only convert to `index_type` as the second argument to the exposition-only `REQUIRED-SPAN-SIZE`. We must perform that conversion before doing math with the result. + + commit 81c3897d34ccd32d4ccdbe3c74091ba1db458533 + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Wed Oct 4 00:22:33 2023 +0800 + + [const.iterators.ops] Add missing \pnum and replace returns with effects (#6581) + + commit 34cf81ebc821377eb3969002e4669bf5e08f479f + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Wed Oct 4 02:59:42 2023 +0800 + + [common.iter.const] Add missing period for Returns (#6584) + + commit 22537613dd844670ee9fb9d5afcf19f89c26fd26 + Author: Jens Maurer + Date: Tue Sep 26 07:21:52 2023 +0200 + + [temp.over.link] Fix phrasing and cross-reference introduced by P1787R6 + + commit 1398617dfd99dd3383e801abee6ce58629439f3a + Author: Jens Maurer + Date: Wed Oct 4 17:48:32 2023 +0200 + + [tab:headers.cpp] Add (#6586) + + commit 78635c91ac910e9c0953e1784eec648a214eb5ad + Author: Casey Carter + Date: Wed Oct 4 14:44:18 2023 -0700 + + [string.cons] Remove erroneous paragraph break (#6587) + + commit a2e820424e089806191a40d43df2360906902d86 + Author: Jonathan Wakely + Date: Tue Sep 19 13:36:52 2023 +0100 + + [range.utility.conv.to] Add terminating condition for first bullet + + We currently fail to say what happens if the first bullet is true, but + then none of its sub-bullets is true. + + commit 9369ba13509cd5d2c9e862b7ad02f109c204a585 + Author: Jonathan Wakely + Date: Tue Sep 19 16:19:50 2023 +0100 + + [version.syn] Put feature test macros in alphabetical order + + commit 1430209dbf6edda0827207166770c4d964cf0598 + Author: Jens Maurer + Date: Fri Oct 6 15:53:39 2023 +0200 + + [time.format] Make reference to ISO 8601 more precise + + Fixes ISO/CS 003 (C++23 DIS). + + commit 7ed9cbfef44d15b798af83223f5d3b62927652a5 + Author: Jens Maurer + Date: Fri Oct 6 15:14:44 2023 +0200 + + [intro.refs] Fix title of ISO/IEC 9899:2018 + + Fixes ISO/CS 004 (C++23 DIS). + + commit 258290ecc9d6e4d615b29173fd520df1f66a3292 + Author: Jens Maurer + Date: Fri Oct 6 01:21:01 2023 +0200 + + [annex] Fix table numbering in annexes + + Fixes ISO/CS 029 (C++23 DIS). + + commit c39f5b014540820b4ea2061805a92c417e43ca0d + Author: Jens Maurer + Date: Fri Oct 6 14:59:03 2023 +0200 + + [lex.name] Add cross-reference to Annex E + + Fixes ISO/CS 030 (C++23 DIS). + + commit b5d6409bf5132d653bc13a3ce8f76c556d5d6fc9 + Author: Jens Maurer + Date: Sat Oct 7 22:50:53 2023 +0200 + + [defns.component] Remove unwarranted italics + + Fixes ISO/CS 018 (C++23 DIS). + + commit 722bd4f167badc5bb5dddde9b0d00f91c2ef1644 + Author: Jens Maurer + Date: Fri Oct 6 13:24:16 2023 +0200 + + [util.smartptr.shared.cmp] Fix missing right parenthesis + + Fixes NB JP 025 (C++23 DIS). + + commit 24b090f5c63bf99d4cdcea8989d885f2d23c00e7 + Author: Jens Maurer + Date: Fri Oct 6 13:20:03 2023 +0200 + + [unique.ptr.runtime.modifiers] Fix placement of 'constexpr' + + Fixes NB JP 024 (C++23 DIS). + + commit 400521547f60196f6dfa7857bdcc907698991df8 + Author: Jens Maurer + Date: Sat Oct 7 11:11:15 2023 +0200 + + [expr.const] Amend comments in example + + Fixes NB JP 023 (C++23 DIS). + + commit 812e64a65699bb01203fbedcc7d9d5ea004a5007 + Author: Jens Maurer + Date: Sat Oct 7 22:32:16 2023 +0200 + + [expr.prim.lambda.general] Add example for parsing ambiguity + + Fixes NB JP 021 (C++23 DIS). + + commit bd7f9a9e640bfcd204cabecf1cc4953b7138554e + Author: Jens Maurer + Date: Sat Oct 7 10:38:29 2023 +0200 + + [intro.scope] Clarify 'they' + + Fixes ISO/CS 034 (C++23 DIS). + + commit dc597fa561a795c100a36f46376d6ddd0cf93a31 + Author: Alisdair Meredith + Date: Mon Oct 9 12:02:19 2023 -0400 + + [expr.prim.lambda.closure] Insert an extra \pnum (#6594) + + commit d81c17120e5a527f779b965ba8fd1ce66cfc24ef + Author: Alisdair Meredith + Date: Mon Oct 9 12:03:25 2023 -0400 + + [obj.lifetime] Dehyphenate trivially-copyable (#6592) + + commit d29b1fc1c22018b1a83cee910ebdbb4520d2c960 + Author: Jens Maurer + Date: Sun Oct 8 09:52:42 2023 +0200 + + [lex.charset] Add reference to the Unicode Standard + + commit e128de19470877fbf8f0335b8c0e2a1700f2e320 + Author: Jens Maurer + Date: Sun Oct 8 11:52:06 2023 +0200 + + [lex.charset] Clarify normative reference to Unicode for UTF-x + + Fixes ISO/CS 008 (C++23 DIS). + + commit 4d603c640dd47c71f84bbce55416302efab8b298 + Author: Thomas Köppe + Date: Tue Oct 10 23:55:22 2023 +0100 + + [intro.defs] Remove inappropriate paragraph. + + Only specific, fixed wording is allowed in Clause 3. + + Fixes ISO/CS 009 (C++23 DIS). + + commit 7d4fa2432b58a2ef6a2062812ec00ccde4443acf + Author: Jens Maurer + Date: Wed Oct 11 01:04:35 2023 +0200 + + [intro.defs] Remove unused definitions + + The terms "arbitrary-positional stream", "repositional stream", + and "iostream class templates" are removed. + + Fixes ISO/CS 011 and ISO/CS 16 (C++23 DIS). + + commit 4c76193e3d310ea5a18679ab86a54074fe1635e9 + Author: Thomas Köppe + Date: Wed Oct 11 00:14:53 2023 +0100 + + [defns.impl.limits] Use singular + + Fixes ISO/CS 015 (C++23 DIS). + + commit f672ecf38d2aec6ccf184d1a36bc4e83809afab0 + Author: Thomas Köppe + Date: Wed Oct 11 00:46:29 2023 +0100 + + [std] Replace "C Standard" with "ISO/IEC 9899:2018". + + Fixes ISO/CS 035 (C++23 DIS). + + commit 2d6182932954732f71a28d90ec1f1b23838ccc67 + Author: Thomas Köppe + Date: Wed Oct 11 01:13:46 2023 +0100 + + [intro.{r,d}efs] Make "C standard library" a defined term + + Partially fixes ISO/CS-002 (C++23 DIS). + + commit 4676f765f696774807688c3adfdc2eb03905a827 + Author: Jens Maurer + Date: Sun Oct 8 12:30:18 2023 +0200 + + [type.traits] Add references to tables + + Fixes ISO/CS 001 (C++23 DIS). + + commit 583391e28f34d6e0a17f67f77e04ba4f924c1d13 + Author: Thomas Köppe + Date: Sat Oct 14 20:42:50 2023 +0100 + + [intro.defs, dcl.init.list] Move definition of direct-non-list-init + + Partially fixes ISO/CS-11 (C++23 DIS). + + commit 4a8e84ede8a927a7ebe7fa16a086041db437d57c + Author: Thomas Köppe + Date: Sat Oct 14 20:58:52 2023 +0100 + + [xrefdelta] Remove mention of removals that are now already in C++23 diff --git a/papers/wd-index.md b/papers/wd-index.md index df0daff8e8..c7e0741fd5 100644 --- a/papers/wd-index.md +++ b/papers/wd-index.md @@ -46,3 +46,4 @@ * [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 * [N4958](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4958.pdf) 2023-08 C++ Working Draft + * [N4964](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4964.pdf) 2023-10 C++ Working Draft diff --git a/source/algorithms.tex b/source/algorithms.tex index b583ba13af..5fe7ecfb5e 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -312,6 +312,8 @@ \end{note} \end{itemize} These functions are herein called \defn{element access functions}. + +\pnum \begin{example} The \tcode{sort} function may invoke the following element access functions: \begin{itemize} diff --git a/source/basic.tex b/source/basic.tex index 62ae3796ac..65947ad304 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -3207,6 +3207,8 @@ \end{note} \begin{example} \begin{codeblock} +// assumes that \tcode{sizeof(int)} is equal to 4 + template struct AlignedUnion { alignas(T...) unsigned char data[max(sizeof(T)...)]; @@ -3221,7 +3223,7 @@ struct A { unsigned char a[32]; }; struct B { unsigned char b[16]; }; -A a; +alignas(int) A a; B *b = new (a.a + 8) B; // \tcode{a.a} provides storage for \tcode{*b} int *p = new (b->b + 4) int; // \tcode{b->b} provides storage for \tcode{*p} // \tcode{a.a} does not provide storage for \tcode{*p} (directly), @@ -4726,9 +4728,8 @@ \defn{value}, which is one discrete element of an \impldef{values of a trivially copyable type} set of values. \begin{footnote} -The -intent is that the memory model of \Cpp{} is compatible -with that of ISO/IEC 9899 Programming Language C. +The intent is that the memory model of \Cpp{} is compatible +with that of the C programming language. \end{footnote} \pnum @@ -4825,12 +4826,12 @@ types are collectively called \defnadjx{trivially copyable}{types}{type}. \label{term.trivial.type}% Scalar types, trivial class types\iref{class.prop}, -arrays of such types and cv-qualified versions of these +arrays of such types, and cv-qualified versions of these types are collectively called \defnadjx{trivial}{types}{type}. \label{term.standard.layout.type}% Scalar types, standard-layout class -types\iref{class.prop}, arrays of such types and +types\iref{class.prop}, arrays of such types, and cv-qualified versions of these types are collectively called \defnadjx{standard-layout}{types}{type}. Scalar types, implicit-lifetime class types\iref{class.prop}, @@ -5274,7 +5275,7 @@ should be chosen to increase compatibility and interoperability with the interchange types \tcode{_Float16}, \tcode{_Float32}, \tcode{_Float64}, and \tcode{_Float128} -defined in ISO/IEC TS 18661-3 and with future versions of the C standard. +defined in ISO/IEC TS 18661-3 and with future versions of \IsoCUndated{}. \rSec2[basic.compound]{Compound types} diff --git a/source/classes.tex b/source/classes.tex index d0235a3f3c..bfb2b24787 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -3358,7 +3358,7 @@ \pnum \indextext{nested class!local class}% -If class \tcode{X} is a local class a nested class \tcode{Y} may be +If class \tcode{X} is a local class, a nested class \tcode{Y} may be declared in class \tcode{X} and later defined in the definition of class \tcode{X} or be later defined in the same scope as the definition of class \tcode{X}. @@ -4229,9 +4229,7 @@ \indextext{access control!default}% Members of a class defined with the keyword \keyword{class} -are -\keyword{private} -by default. +are private by default. Members of a class defined with the keywords \keyword{struct} or \keyword{union} are public by default. diff --git a/source/compatibility.tex b/source/compatibility.tex index 6c6028419a..185dc4f835 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -281,7 +281,7 @@ that do not support iteration when const-qualified and that are not copyable. \effect -Valid \CppXX{} code that passes bit fields to formatting functions +Valid \CppXX{} code that passes bit-fields to formatting functions may become ill-formed. For example: \begin{codeblock} @@ -365,7 +365,7 @@ struct D : private B { void f(std::set>& s) { - s.erase(*this); // ill formed; previously well-formed + s.erase(*this); // ill-formed; previously well-formed } }; \end{codeblock} diff --git a/source/config.tex b/source/config.tex index 8b24727467..40e1c26954 100644 --- a/source/config.tex +++ b/source/config.tex @@ -1,8 +1,8 @@ %!TEX root = std.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{N4958} -\newcommand{\prevdocno}{N4950} +\newcommand{\docno}{N4964} +\newcommand{\prevdocno}{N4958} \newcommand{\cppver}{202302L} %% Release date diff --git a/source/containers.tex b/source/containers.tex index 21abef6cad..00e07cefd0 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -6331,7 +6331,7 @@ \pnum \returns A pointer such that \range{data()}{data() + size()} is a valid range. For a -non-empty array, \tcode{data()} \tcode{==} \tcode{addressof(front())}. +non-empty array, \tcode{data() == addressof(front())} is \keyword{true}. \end{itemdescr} \indexlibrarymember{array}{fill}% @@ -9068,7 +9068,7 @@ \pnum \returns A pointer such that \range{data()}{data() + size()} is a valid range. For a -non-empty vector, \tcode{data()} \tcode{==} \tcode{addressof(front())}. +non-empty vector, \tcode{data() == addressof(front())} is \keyword{true}. \pnum \complexity @@ -17129,8 +17129,8 @@ friend void swap(flat_set& x, flat_set& y) noexcept { x.swap(y); } private: - container_type @\exposid{c}@; // \expos - key_compare @\exposid{compare}@; // \expos + container_type @\exposidnc{c}@; // \expos + key_compare @\exposidnc{compare}@; // \expos }; template> @@ -17629,7 +17629,7 @@ const key_compare& comp = key_compare()) : @\exposid{c}@(std::move(cont)), @\exposid{compare}@(comp) { } template - flat_multiset(sorted_equivalent_t, const container_type&, const Allocator& a); + flat_multiset(sorted_equivalent_t, const container_type& cont, const Allocator& a); template flat_multiset(sorted_equivalent_t, const container_type& cont, const key_compare& comp, const Allocator& a); @@ -17795,8 +17795,8 @@ { x.swap(y); } private: - container_type @\exposid{c}@; // \expos - key_compare @\exposid{compare}@; // \expos + container_type @\exposidnc{c}@; // \expos + key_compare @\exposidnc{compare}@; // \expos }; template> @@ -17823,11 +17823,11 @@ template>> flat_multiset(InputIterator, InputIterator, Compare = Compare()) - -> flat_multiset<@\placeholder{iter-value-type}@, @\placeholder{iter-value-type}@, Compare>; + -> flat_multiset<@\placeholder{iter-value-type}@, Compare>; template>> flat_multiset(sorted_equivalent_t, InputIterator, InputIterator, Compare = Compare()) - -> flat_multiset<@\placeholder{iter-value-type}@, @\placeholder{iter-value-type}@, Compare>; + -> flat_multiset<@\placeholder{iter-value-type}@, Compare>; template>, class Allocator = allocator>> @@ -18212,9 +18212,9 @@ class span; template - constexpr bool ranges::enable_view> = true; + constexpr bool ranges::@\libspec{enable_view}{span}@> = true; template - constexpr bool ranges::enable_borrowed_range> = true; + constexpr bool ranges::@\libspec{enable_borrowed_range}{span}@> = true; // \ref{span.objectrep}, views of object representation template @@ -19296,8 +19296,8 @@ \item \tcode{sizeof...(exts) == 0} is \tcode{true}, or \item -each element of \tcode{exts} is nonnegative and -is representable as a value of type \tcode{index_type}. +each element of \tcode{exts} is representable +as a nonnegative value of type \tcode{index_type}. \end{itemize} \end{itemize} @@ -19340,8 +19340,8 @@ \item \tcode{N} is zero, or \item -\tcode{exts[$r$]} is nonnegative and -is representable as a value of type \tcode{index_type} for every rank index $r$. +\tcode{exts[$r$]} is representable +as a nonnegative value of type \tcode{index_type} for every rank index $r$. \end{itemize} \end{itemize} @@ -20419,8 +20419,12 @@ \item otherwise \tcode{0}, if the size of the multidimensional index space \tcode{e} is 0, \item -otherwise \tcode{1} plus the sum of products of \tcode{(e.extent($r$) - 1)} and \tcode{strides[$r$]} -for all $r$ in the range $[0, \tcode{e.rank()})$. +otherwise \tcode{1} plus the sum of products of +\tcode{(e.extent($r$) - 1)} and +\begin{codeblock} +extents_type::@\exposid{index-cast}@(strides[@$r$@]) +\end{codeblock} + for all $r$ in the range $[0, \tcode{e.rank()})$. \end{itemize} \pnum @@ -20513,7 +20517,8 @@ \expects \begin{itemize} \item -\tcode{s[$i$] > 0} is \tcode{true} +The result of converting \tcode{s[$i$]} to \tcode{index_type} +is greater than \tcode{0} for all $i$ in the range $[0, \exposid{rank_})$. \item \tcode{\exposid{REQUIRED-SPAN-SIZE}(e, s)} is representable @@ -20564,7 +20569,7 @@ \expects \begin{itemize} \item -\tcode{StridedLayoutMapping} meets the layout mapping requirements\iref{mdspan.layout.policy.reqmts}, +\tcode{StridedLayoutMapping} meets the layout mapping requirements\iref{mdspan.layout.reqmts}, \item \tcode{other.stride($r$) > 0} is \tcode{true} for every rank index $r$ of \tcode{extents()}, @@ -21030,17 +21035,17 @@ }; template - requires(is_array_v && rank_v == 1) + requires (is_array_v && rank_v == 1) mdspan(CArray&) -> mdspan, extents>>; template - requires(is_pointer_v>) + requires (is_pointer_v>) mdspan(Pointer&&) -> mdspan>, extents>; template - requires((is_convertible_v && ...) && sizeof...(Integrals) > 0) + requires ((is_convertible_v && ...) && sizeof...(Integrals) > 0) explicit mdspan(ElementType*, Integrals...) -> mdspan>; @@ -21757,8 +21762,8 @@ \item if $S_k$ is a specialization of \tcode{strided_slice} \begin{itemize} - \item $\tcode{$s_k$.extent = 0}$, or - \item $\tcode{$s_k$.stride > 0}$ + \item $\tcode{$s_k$.extent} = 0$, or + \item $\tcode{$s_k$.stride} > 0$ \end{itemize} \item $0 \le \tcode{\exposid{first_}(slices...)}$ diff --git a/source/declarations.tex b/source/declarations.tex index d4302e71cd..8951eb2715 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -5755,6 +5755,8 @@ list-initialization in a direct-initialization context is called \defn{direct-list-initialization} and list-initialization in a copy-initialization context is called \defn{copy-list-initialization}. +Direct-initialization that is not list-initialization is called +\defn{direct-non-list-initialization}. \begin{note} List-initialization can be used \begin{itemize} diff --git a/source/diagnostics.tex b/source/diagnostics.tex index 7a92ab5a90..12a3cb75b0 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -1088,8 +1088,8 @@ explicit operator bool() const noexcept; private: - int val_; // \expos - const error_category* cat_; // \expos + int @\exposid{val_}@; // \expos + const error_category* @\exposid{cat_}@; // \expos }; // \ref{syserr.errcode.nonmembers}, non-member functions @@ -1111,8 +1111,8 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{val_} with \tcode{0} -and \tcode{cat_} with \tcode{\&system_category()}. +Initializes \exposid{val_} with \tcode{0} +and \exposid{cat_} with \tcode{\&system_category()}. \end{itemdescr} \indexlibraryctor{error_code}% @@ -1123,8 +1123,8 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{val_} with \tcode{val} -and \tcode{cat_} with \tcode{\&cat}. +Initializes \exposid{val_} with \tcode{val} +and \exposid{cat_} with \tcode{\&cat}. \end{itemdescr} \indexlibraryctor{error_code}% @@ -1157,7 +1157,7 @@ \begin{itemdescr} \pnum \ensures -\tcode{val_ == val} and \tcode{cat_ == \&cat}. +\tcode{\exposid{val_} == val} and \tcode{\exposid{cat_} == \&cat}. \end{itemdescr} \indexlibrarymember{operator=}{error_code}% @@ -1206,7 +1206,7 @@ \begin{itemdescr} \pnum \returns -\tcode{val_}. +\exposid{val_}. \end{itemdescr} \indexlibrarymember{category}{error_code}% @@ -1217,7 +1217,7 @@ \begin{itemdescr} \pnum \returns -\tcode{*cat_}. +\tcode{*\exposid{cat_}}. \end{itemdescr} \indexlibrarymember{default_error_condition}{error_code}% @@ -1315,8 +1315,8 @@ explicit operator bool() const noexcept; private: - int val_; // \expos - const error_category* cat_; // \expos + int @\exposid{val_}@; // \expos + const error_category* @\exposid{cat_}@; // \expos }; } \end{codeblock} @@ -1331,8 +1331,8 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{val_} with \tcode{0} -and \tcode{cat_} with \tcode{\&generic_category()}. +Initializes \exposid{val_} with \tcode{0} +and \exposid{cat_} with \tcode{\&generic_category()}. \end{itemdescr} \indexlibraryctor{error_condition}% @@ -1343,8 +1343,8 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{val_} with \tcode{val} -and \tcode{cat_} with \tcode{\&cat}. +Initializes \exposid{val_} with \tcode{val} +and \exposid{cat_} with \tcode{\&cat}. \end{itemdescr} \indexlibraryctor{error_condition}% @@ -1378,7 +1378,7 @@ \begin{itemdescr} \pnum \ensures -\tcode{val_ == val} and \tcode{cat_ == \&cat}. +\tcode{\exposid{val_} == val} and \tcode{\exposid{cat_} == \&cat}. \end{itemdescr} \indexlibrarymember{operator=}{error_condition}% @@ -1426,7 +1426,7 @@ \begin{itemdescr} \pnum \returns -\tcode{val_}. +\exposid{val_}. \end{itemdescr} \indexlibrarymember{category}{error_condition}% @@ -1437,7 +1437,7 @@ \begin{itemdescr} \pnum \returns -\tcode{*cat_}. +\tcode{*\exposid{cat_}}. \end{itemdescr} \indexlibrarymember{message}{error_condition}% @@ -1998,7 +1998,7 @@ allocator_traits::is_always_equal::value); private: - vector frames_; // \expos + vector @\exposid{frames_}@; // \expos }; } \end{codeblock} @@ -2030,17 +2030,17 @@ \pnum \returns A \tcode{basic_stacktrace} object -with \tcode{frames_} storing +with \exposid{frames_} storing the stacktrace of the current evaluation in the current thread of execution, or an empty \tcode{basic_stacktrace} object -if the initialization of \tcode{frames_} failed. -\tcode{alloc} is passed to the constructor of the \tcode{frames_} object. +if the initialization of \exposid{frames_} failed. +\tcode{alloc} is passed to the constructor of the \exposid{frames_} object. \begin{note} If the stacktrace was successfully obtained, -then \tcode{frames_.front()} is the \tcode{stacktrace_entry} +then \tcode{\exposid{frames_}.front()} is the \tcode{stacktrace_entry} representing approximately the current evaluation, and -\tcode{frames_.back()} is the \tcode{stacktrace_entry} +\tcode{\exposid{frames_}.back()} is the \tcode{stacktrace_entry} representing approximately the initial function of the current thread of execution. \end{note} @@ -2061,10 +2061,10 @@ \pnum \returns A \tcode{basic_stacktrace} object -where \tcode{frames_} is direct-non-list-initialized from arguments +where \exposid{frames_} is direct-non-list-initialized from arguments \tcode{t.begin() + min(n, skip)}, \tcode{t.end()}, and \tcode{alloc}, or an empty \tcode{basic_stacktrace} object -if the initialization of \tcode{frames_} failed. +if the initialization of \exposid{frames_} failed. \end{itemdescr} \indexlibrarymember{current}{basic_stacktrace}% @@ -2086,11 +2086,11 @@ \pnum \returns A \tcode{basic_stacktrace} object -where \tcode{frames_} is direct-non-list-initialized from arguments +where \exposid{frames_} is direct-non-list-initialized from arguments \tcode{t.begin() + min(n, skip)}, \tcode{t.begin() + min(n, skip + max_depth)}, and \tcode{alloc}, or an empty \tcode{basic_stacktrace} object -if the initialization of \tcode{frames_} failed. +if the initialization of \exposid{frames_} failed. \end{itemdescr} \indexlibraryctor{basic_stacktrace}% @@ -2112,7 +2112,7 @@ \begin{itemdescr} \pnum \effects -\tcode{alloc} is passed to the \tcode{frames_} constructor. +\tcode{alloc} is passed to the \exposid{frames_} constructor. \pnum \ensures @@ -2162,7 +2162,7 @@ \begin{itemdescr} \pnum \returns -\tcode{frames_.get_allocator()}. +\tcode{\exposid{frames_}.get_allocator()}. \end{itemdescr} \indexlibrarymember{begin}{basic_stacktrace}% @@ -2175,7 +2175,7 @@ \begin{itemdescr} \pnum \returns -An iterator referring to the first element in \tcode{frames_}. +An iterator referring to the first element in \exposid{frames_}. If \tcode{empty()} is \tcode{true}, then it returns the same value as \tcode{end()}. \end{itemdescr} @@ -2227,7 +2227,7 @@ \begin{itemdescr} \pnum \returns -\tcode{frames_.empty()}. +\tcode{\exposid{frames_}.empty()}. \end{itemdescr} \indexlibrarymember{size}{basic_stacktrace}% @@ -2238,7 +2238,7 @@ \begin{itemdescr} \pnum \returns -\tcode{frames_.size()}. +\tcode{\exposid{frames_}.size()}. \end{itemdescr} \indexlibrarymember{max_size}{basic_stacktrace}% @@ -2249,7 +2249,7 @@ \begin{itemdescr} \pnum \returns -\tcode{frames_.max_size()}. +\tcode{\exposid{frames_}.max_size()}. \end{itemdescr} \indexlibrarymember{operator[]}{basic_stacktrace}% @@ -2264,7 +2264,7 @@ \pnum \returns -\tcode{frames_[frame_no]}. +\tcode{\exposid{frames_}[frame_no]}. \pnum \throws @@ -2279,7 +2279,7 @@ \begin{itemdescr} \pnum \returns -\tcode{frames_[frame_no]}. +\tcode{\exposid{frames_}[frame_no]}. \pnum \throws diff --git a/source/exceptions.tex b/source/exceptions.tex index 8dbd0304ef..c4cc789ff9 100644 --- a/source/exceptions.tex +++ b/source/exceptions.tex @@ -1015,7 +1015,7 @@ \pnum \indextext{\idxcode{terminate}}% % FIXME: What does it mean to abandon exception handling? -In some situations exception handling is abandoned +In some situations, exception handling is abandoned for less subtle error handling techniques. \begin{note} These situations are: diff --git a/source/expressions.tex b/source/expressions.tex index 480516076a..3229ed4d8b 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -1012,8 +1012,7 @@ object pointer or function pointer type. Such a conversion is called a \defnx{null pointer conversion}{conversion!null pointer}. -Two null pointer values of the same type shall compare -equal. The conversion of a null pointer constant to a pointer to +The conversion of a null pointer constant to a pointer to cv-qualified type is a single conversion, and not the sequence of a pointer conversion followed by a qualification conversion\iref{conv.qual}. A null pointer constant of integral type @@ -1052,8 +1051,7 @@ of that type and is distinguishable from any pointer to member not created from a null pointer constant. Such a conversion is called a \defnx{null member pointer conversion}{conversion!null member pointer}. -Two null member pointer values of -the same type shall compare equal. The conversion of a null pointer +The conversion of a null pointer constant to a pointer to member of cv-qualified type is a single conversion, and not the sequence of a pointer-to-member conversion followed by a qualification conversion\iref{conv.qual}. @@ -1800,6 +1798,11 @@ \begin{note} Such ambiguous cases cannot have valid semantics because the constraint expression would not have type \keyword{bool}. +\begin{example} +\begin{codeblock} +auto x = [] requires T::operator int [[some_attribute]] (int) { } +\end{codeblock} +\end{example} \end{note} \pnum @@ -1869,6 +1872,8 @@ types of a \grammarterm{lambda-declarator} do not affect these associated namespaces and classes. \end{note} + +\pnum The closure type is not an aggregate type\iref{dcl.init.aggr} and not a structural type\iref{temp.param}. An implementation may define the closure type differently from what @@ -3410,13 +3415,13 @@ to type \tcode{\keyword{void}*}\iref{conv.ptr}. After these conversions, if the argument does not have arithmetic, enumeration, pointer, pointer-to-member, -or class type, the program is ill-formed. Passing a potentially-evaluated -argument -of a scoped enumeration type or -of a class type\iref{class} having an eligible non-trivial -copy constructor, an eligible non-trivial move constructor, -or a -non-trivial destructor\iref{special}, +or class type, the program is ill-formed. +Passing a potentially-evaluated argument +of a scoped enumeration type\iref{dcl.enum} or +of a class type\iref{class} having +an eligible non-trivial copy constructor\iref{special,class.copy.ctor}, +an eligible non-trivial move constructor, or +a non-trivial destructor\iref{class.dtor}, with no corresponding parameter, is conditionally-supported with \impldef{passing argument of class type through ellipsis} semantics. If the argument has integral or enumeration type that is subject to the integral @@ -4989,7 +4994,7 @@ is applied. \pnum -The identifier in a \tcode{\keyword{sizeof}...} expression shall name a +The \grammarterm{identifier} in a \tcode{\keyword{sizeof}...} expression shall name a pack. The \tcode{\keyword{sizeof}...} operator yields the number of elements in the pack\iref{temp.variadic}. A \tcode{\keyword{sizeof}...} expression is a pack expansion\iref{temp.variadic}. @@ -7986,12 +7991,13 @@ template constexpr T h(T t = id(x)) { // \tcode{h} is not an immediate function + // \tcode{id(x)} is not evaluated when parsing the default argument\iref{dcl.fct.default,temp.inst} return t; } template -constexpr T hh() { // \tcode{hh} is an immediate function - return h(); +constexpr T hh() { // \tcode{hh} is an immediate function because of the invocation + return h(); // of the immediate function \tcode{id} in the default argument of \tcode{h} } int i = hh(); // error: \tcode{hh()} is an immediate-escalating expression diff --git a/source/intro.tex b/source/intro.tex index c247ada66b..b241e4fd36 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -6,15 +6,14 @@ \indextext{scope|(}% This document specifies requirements for implementations of the \Cpp{} programming language. The first such requirement is that -they implement the language, so this document also +an implementation implements the language, so this document also defines \Cpp{}. Other requirements and relaxations of the first requirement appear at various places within this document. \pnum \Cpp{} is a general purpose programming language based on the C -programming language as described in ISO/IEC 9899:2018 -\doccite{Programming languages --- C} (hereinafter referred to as the -\defnx{C standard}{C!standard}). \Cpp{} provides many facilities +programming language as described in \IsoC{}. +\Cpp{} provides many facilities beyond those provided by C, including additional data types, classes, templates, exceptions, namespaces, operator overloading, function name overloading, references, free store @@ -37,7 +36,7 @@ \item ISO/IEC 2382, \doccite{Information technology --- Vocabulary} \item ISO 8601:2004, \doccite{Data elements and interchange formats --- Information interchange --- Representation of dates and times} -\item ISO/IEC 9899:2018, \doccite{Programming languages --- C} +\item \IsoC{}, \doccite{Information technology --- Programming languages --- C} \item ISO/IEC/IEEE 9945:2009, \doccite{Information Technology --- Portable Operating System Interface (POSIX \begin{footnote} @@ -71,16 +70,6 @@ Available from: \url{https://www.unicode.org/versions/latest/} \end{itemize} -\pnum -The library described in ISO/IEC 9899:2018, Clause 7, -is hereinafter called the -\defnx{C standard library}{C!standard library}. -\begin{footnote} -With the qualifications noted in \ref{\firstlibchapter} -through \ref{\lastlibchapter} and in \ref{diff.library}, the C standard -library is a subset of the \Cpp{} standard library. -\end{footnote} - \pnum The operating system interface described in ISO/IEC 9945:2009 is hereinafter called \defn{POSIX}. @@ -110,11 +99,6 @@ \item IEC Electropedia: available at \url{https://www.electropedia.org/} \end{itemize} -\pnum -Terms that are used only in a small portion of this document -are defined where they are used and italicized where they are -defined. - \indexdefn{access}% \definition{access}{defns.access} \defncontext{execution-time action} @@ -132,16 +116,6 @@ although they may involve accesses of scalar subobjects. \end{defnote} -\definition{arbitrary-positional stream}{defns.arbitrary.stream} -\defncontext{library} -\indexdefn{stream!arbitrary-positional}% -stream that can seek to any integral position within -the length of the stream - -\begin{defnote} -Every arbitrary-positional stream is also a repositional stream\iref{defns.repositional.stream}. -\end{defnote} - \indexdefn{argument}% \indexdefn{argument!function call expression} \definition{argument}{defns.argument} @@ -180,6 +154,15 @@ \defncontext{statement} compound statement +\indexdefn{C!standard library}% +\definition{C standard library}{defns.c.lib} +library described in \IsoC{}, Clause 7 +\begin{defnote} +With the qualifications noted in \ref{\firstlibchapter} +through \ref{\lastlibchapter} and in \ref{diff.library}, +the C standard library is a subset of the \Cpp{} standard library. +\end{defnote} + \definition{character}{defns.character} \indexdefn{character}% \defncontext{library} @@ -224,13 +207,9 @@ return types \begin{defnote} -For example, the class template -\tcode{basic_string} -and the non-member -function templates -that operate on -strings are referred to as the -\term{string component}. +For example, the class template \tcode{basic_string} +and the non-member function templates +that operate on strings are referred to as the string component. \end{defnote} \indexdefn{behavior!conditionally-supported}% @@ -267,11 +246,6 @@ message belonging to an \impldef{diagnostic message} subset of the implementation's output messages -\definition{direct-non-list-initialization}{defns.direct.non.list.init} -\indexdefn{direct-non-list-initialization}% -direct-initialization -that is not list-initialization - \indexdefn{type!dynamic}% \definition{dynamic type}{defns.dynamic.type} \defncontext{glvalue} type of the most derived object to which the @@ -356,22 +330,8 @@ \tcode{<}, \tcode{>}, \tcode{<=}, \tcode{>=}, and \tcode{<=>} \indexdefn{limits!implementation}% -\definition{implementation limits}{defns.impl.limits} -restrictions imposed upon programs by the implementation - -\definition{iostream class templates}{defns.iostream.templates} -\defncontext{library} -templates that are declared in header \libheader{iosfwd} and -take two template arguments - -\begin{defnote} -The arguments are named \tcode{charT} and \tcode{traits}. -The argument \tcode{charT} is a character container class, and -the argument \tcode{traits} is a class -which defines additional characteristics and functions -of the character type represented by \tcode{charT} -necessary to implement the iostream class templates. -\end{defnote} +\definition{implementation limit}{defns.impl.limits} +restriction imposed upon programs by the implementation \indexdefn{behavior!locale-specific}% \definition{locale-specific behavior}{defns.locale.specific} @@ -523,11 +483,6 @@ definitions of all translation units\iref{basic.link}. \end{defnote} -\definition{repositional stream}{defns.repositional.stream} -\defncontext{library} -\indexdefn{stream!repositional}% -stream that can seek to a position that was previously encountered - \definition{required behavior}{defns.required.behavior} \defncontext{library} \indexdefn{behavior!required}% diff --git a/source/iostreams.tex b/source/iostreams.tex index 1ecb1c598d..7e1b661fdb 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -13366,14 +13366,14 @@ namespace std::ranges { template<> - inline constexpr bool enable_borrowed_range = true; + inline constexpr bool @\libspec{enable_borrowed_range}{directory_iterator}@ = true; template<> - inline constexpr bool enable_borrowed_range = true; + inline constexpr bool @\libspec{enable_borrowed_range}{recursive_directory_iterator}@ = true; template<> - inline constexpr bool enable_view = true; + inline constexpr bool @\libspec{enable_view}{directory_iterator}@ = true; template<> - inline constexpr bool enable_view = true; + inline constexpr bool @\libspec{enable_view}{recursive_directory_iterator}@ = true; } \end{codeblock} @@ -14014,7 +14014,7 @@ \begin{itemdescr} \pnum \ensures -\tcode{empty() == true}. +\tcode{empty()} is \keyword{true}. \end{itemdescr} \indexlibraryctor{path}% @@ -14370,7 +14370,7 @@ \begin{itemdescr} \pnum \ensures -\tcode{empty() == true}. +\tcode{empty()} is \tcode{true}. \end{itemdescr} \indexlibrarymember{make_preferred}{path}% @@ -15368,10 +15368,10 @@ \pnum \ensures \begin{itemize} -\item \tcode{code() == ec}, -\item \tcode{path1().empty() == true}, -\item \tcode{path2().empty() == true}, and -\item \tcode{string_view(what()).find(what_arg.c_str())} \tcode{!= string_view::npos}. +\item \tcode{code() == ec} is \tcode{true}, +\item \tcode{path1().empty()} is \tcode{true}, +\item \tcode{path2().empty()} is \tcode{true}, and +\item \tcode{string_view(what()).find(what_arg.c_str())} \tcode{!= string_view::npos} is \tcode{true}. \end{itemize} \end{itemdescr} @@ -15384,10 +15384,10 @@ \pnum \ensures \begin{itemize} -\item \tcode{code() == ec}, +\item \tcode{code() == ec} is \tcode{true}, \item \tcode{path1()} returns a reference to the stored copy of \tcode{p1}, -\item \tcode{path2().empty() == true}, and -\item \tcode{string_view(what()).find(what_arg.c_str())} \tcode{!= string_view::npos}. +\item \tcode{path2().empty()} is \tcode{true}, and +\item \tcode{string_view(what()).find(what_arg.c_str())} \tcode{!= string_view::npos} is \tcode{true}. \end{itemize} \end{itemdescr} diff --git a/source/iterators.tex b/source/iterators.tex index 21f233d8be..ae0947e7f2 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -320,8 +320,8 @@ template requires (!@\libconcept{sized_sentinel_for}@) - constexpr bool disable_sized_sentinel_for, // freestanding - reverse_iterator> = true; + constexpr bool @\libspec{disable_sized_sentinel_for}{reverse_iterator}@, // freestanding + reverse_iterator> = true; // \ref{insert.iterators}, insert iterators template class back_insert_iterator; // freestanding @@ -410,7 +410,7 @@ template requires (!@\libconcept{sized_sentinel_for}@) - constexpr bool disable_sized_sentinel_for, // freestanding + constexpr bool @\libspec{disable_sized_sentinel_for}{move_iterator}@, // freestanding move_iterator> = true; template<@\libconcept{semiregular}@ S> class move_sentinel; // freestanding @@ -1287,7 +1287,7 @@ \begin{codeblock} template - concept @\defexposconcept{indirectly-readable-impl}@ = + concept @\defexposconcept{indirectly-readable-impl}@ = @\itcorr[-1]@ // \expos requires(const In in) { typename iter_value_t; typename iter_reference_t; @@ -1320,12 +1320,12 @@ template concept @\deflibconcept{indirectly_writable}@ = requires(Out&& o, T&& t) { - *o = std::forward(t); // not required to be equality-preserving - *std::forward(o) = std::forward(t); // not required to be equality-preserving + *o = std::forward(t); // not required to be equality-preserving + *std::forward(o) = std::forward(t); // not required to be equality-preserving const_cast&&>(*o) = - std::forward(t); // not required to be equality-preserving + std::forward(t); // not required to be equality-preserving const_cast&&>(*std::forward(o)) = - std::forward(t); // not required to be equality-preserving + std::forward(t); // not required to be equality-preserving }; \end{codeblock} @@ -1372,10 +1372,10 @@ \begin{codeblock} template - constexpr bool @\exposid{is-integer-like}@ = @\seebelow@; @\itcorr[-2]@ // \expos + constexpr bool @\exposid{is-integer-like}@ = @\seebelow@; @\itcorr[-2]@ // \expos template - constexpr bool @\exposid{is-signed-integer-like}@ = @\seebelow@; @\itcorr[-2]@ // \expos + constexpr bool @\exposid{is-signed-integer-like}@ = @\seebelow@; @\itcorr[-2]@ // \expos template concept @\deflibconcept{weakly_incrementable}@ = @@ -1383,8 +1383,8 @@ requires(I i) { typename iter_difference_t; requires @\exposid{is-signed-integer-like}@>; - { ++i } -> @\libconcept{same_as}@; // not required to be equality-preserving - i++; // not required to be equality-preserving + { ++i } -> @\libconcept{same_as}@; // not required to be equality-preserving + i++; // not required to be equality-preserving }; \end{codeblock} @@ -4670,10 +4670,11 @@ \end{itemdecl} \begin{itemdescr} +\pnum Let \tcode{\placeholder{op}} be the operator. \pnum -\returns +\effects Equivalent to: \tcode{return x \placeholder{op} y.\exposid{current_};} \end{itemdescr} @@ -5580,7 +5581,7 @@ \pnum \returns -\tcode{*this} +\tcode{*this}. \end{itemdescr} \rSec3[common.iter.access]{Accessors} diff --git a/source/lex.tex b/source/lex.tex index c2b3db8c33..b4b81cf407 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -150,7 +150,7 @@ characters into preprocessing tokens is context-dependent. \begin{example} See the handling of \tcode{<} within a \tcode{\#include} preprocessing -directive. +directive\iref{cpp.include}. \end{example} \item Preprocessing directives are executed, macro invocations are @@ -247,7 +247,8 @@ The \defnadj{translation}{character set} consists of the following elements: \begin{itemize} \item -each abstract character assigned a code point in the Unicode codespace, and +each abstract character assigned a code point in the Unicode codespace +as specified in the Unicode Standard, and \item a distinct character for each Unicode scalar value not assigned to an abstract character. @@ -448,9 +449,10 @@ \indextext{UTF-16}% \indextext{UTF-32}% For a UTF-8, UTF-16, or UTF-32 literal, +the implementation shall encode the Unicode scalar value corresponding to each character of the translation character set -is encoded as specified in the Unicode Standard +as specified in the Unicode Standard for the respective Unicode encoding form. \indextext{character set|)} @@ -840,6 +842,10 @@ Identifiers are case-sensitive. \end{note} \begin{note} +\ref{uaxid} compares the requirements of \UAX{31} of the Unicode Standard +with the \Cpp{} rules for identifiers. +\end{note} +\begin{note} In translation phase 4, \grammarterm{identifier} also includes those \grammarterm{preprocessing-token}s\iref{lex.pptoken} @@ -1880,10 +1886,9 @@ \end{example} \pnum -\indextext{literal!string!narrow}% \indextext{literal!narrow-character}% Ordinary string literals and UTF-8 string literals are -also referred to as narrow string literals. +also referred to as \defnx{narrow string literals}{literal!string!narrow}. \pnum \indextext{concatenation!string}% diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 07501c7096..fb8f7eee5a 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -150,9 +150,9 @@ if it raises a floating-point exception other than \tcode{FE_INEXACT}. The semantics of a call to a C standard library function evaluated as a core constant expression -are those specified in Annex F of the C standard +are those specified in \IsoC{}, Annex F \begin{footnote} -See also ISO/IEC 9899:2018 section 7.6. +See also \IsoC{}, 7.6. \end{footnote} to the extent applicable to the floating-point types\iref{basic.fundamental} that are parameter types of the called function. @@ -1097,13 +1097,14 @@ \tcode{} \\ \tcode{} \\ \tcode{} \\ -\columnbreak \tcode{} \\ +\columnbreak \tcode{} \\ \tcode{} \\ \tcode{} \\ \tcode{} \\ \tcode{} \\ +\tcode{} \\ \tcode{} \\ \tcode{} \\ \tcode{} \\ @@ -1143,8 +1144,8 @@ \tcode{} \\ \tcode{} \\ \tcode{} \\ -\tcode{} \\ \columnbreak +\tcode{} \\ \tcode{} \\ \tcode{} \\ \tcode{} \\ @@ -1280,7 +1281,7 @@ \end{footnote} \pnum -Annex K of the C standard describes a large number of functions, +\IsoC{}, Annex K describes a large number of functions, with associated types and macros, which ``promote safer, more secure programming'' than many of the traditional C library functions. @@ -1301,7 +1302,7 @@ that may be declared in some header. These names are also subject to the restrictions of~\ref{macro.names}. -\begin{multicolfloattable}{C standard Annex K names}{c.annex.k.names} +\begin{multicolfloattable}{Names from \IsoC{}, Annex K}{c.annex.k.names} {llll} \tcode{abort_handler_s} \\ \tcode{asctime_s} \\ @@ -1598,8 +1599,7 @@ \begin{footnote} The only reliable way to declare an object or function signature from the C standard library is by including the header that -declares it, notwithstanding the latitude granted in 7.1.4 of the C -Standard. +declares it, notwithstanding the latitude granted in \IsoC{}, 7.1.4. \end{footnote} \pnum @@ -3714,8 +3714,7 @@ Functions from the C standard library shall not throw exceptions% \indextext{specifications!C standard library exception}% \begin{footnote} -That is, the C -library functions can all be treated as if they +That is, the C standard library functions can all be treated as if they are marked \keyword{noexcept}. This allows implementations to make performance optimizations based on the absence of exceptions at runtime. diff --git a/source/macros.tex b/source/macros.tex index 928f0c845c..fd5293136d 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -205,6 +205,7 @@ \newcommand{\libglobal}[1]{\indexlibraryglobal{#1}#1} \newcommand{\libmember}[2]{\indexlibrarymember{#1}{#2}#1} +\newcommand{\libspec}[2]{\indexlibrarymemberx{#1}{#2}#1} % index for library headers \newcommand{\libheader}[1]{\indexhdr{#1}\tcode{<#1>}} @@ -276,6 +277,8 @@ \newcommand{\CppXX}{\Cpp{} 2020} \newcommand{\CppXXIII}{\Cpp{} 2023} \newcommand{\CppXXVI}{\Cpp{} 2026} +\newcommand{\IsoCUndated}{ISO/IEC 9899} +\newcommand{\IsoC}{\IsoCUndated{}:2018} \newcommand{\opt}[1]{#1\ensuremath{_\mathit{\color{black}opt}}} \newcommand{\bigoh}[1]{\ensuremath{\mathscr{O}(#1)}} @@ -362,7 +365,7 @@ %% Cross-reference \newcommand{\xref}{\textsc{See also:}\space} -\newcommand{\xrefc}[1]{\xref{} ISO C #1} +\newcommand{\xrefc}[1]{\xref{} \IsoC{}, #1} %% Inline comma-separated parenthesized references \ExplSyntaxOn diff --git a/source/memory.tex b/source/memory.tex index e77503a8c4..890f431d45 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -902,7 +902,7 @@ The object representation of \placeholder{a} is the contents of the storage prior to the call to \tcode{start_lifetime_as}. The value of each created object \placeholder{o} -of trivially-copyable type \tcode{U} +of trivially copyable type\iref{term.trivially.copyable.type} \tcode{U} is determined in the same manner as for a call to \tcode{bit_cast(E)}\iref{bit.cast}, where \tcode{E} is an lvalue of type \tcode{U} denoting \placeholder{o}, @@ -2779,7 +2779,7 @@ \indexlibrarymember{reset}{unique_ptr}% \begin{itemdecl} -constexpr template void reset(U p) noexcept; +template constexpr void reset(U p) noexcept; \end{itemdecl} \begin{itemdescr} @@ -4311,7 +4311,7 @@ \pnum \returns \begin{codeblock} -compare_three_way()(a.get(), static_cast::element_type*>(nullptr). +compare_three_way()(a.get(), static_cast::element_type*>(nullptr)) \end{codeblock} \end{itemdescr} diff --git a/source/meta.tex b/source/meta.tex index 1ae428cfe9..27a2b7b868 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -634,7 +634,8 @@ \rSec3[meta.unary.cat]{Primary type categories} \pnum -The primary type categories correspond to the descriptions given in +The primary type categories specified in \tref{meta.unary.cat} +correspond to the descriptions given in subclause~\ref{basic.types} of the \Cpp{} standard. \pnum @@ -720,8 +721,9 @@ \rSec3[meta.unary.comp]{Composite type traits} \pnum -These templates provide convenient compositions of the primary type -categories, corresponding to the descriptions given in subclause~\ref{basic.types}. +The templates specified in \tref{meta.unary.comp} +provide convenient compositions of the primary type categories, +corresponding to the descriptions given in subclause~\ref{basic.types}. \pnum For any given type \tcode{T}, the result of applying one of these templates to @@ -768,8 +770,8 @@ \rSec3[meta.unary.prop]{Type properties} \pnum -These templates provide access to some of the more important -properties of types. +The templates specified in \tref{meta.unary.prop} +provide access to some of the more important properties of types. \pnum It is unspecified whether the library defines any full or partial @@ -1361,8 +1363,8 @@ \rSec2[meta.unary.prop.query]{Type property queries} \pnum -This subclause contains templates that may be used to query -properties of types at compile time. +The templates specified in \tref{meta.unary.prop.query} +may be used to query properties of types at compile time. \begin{libreqtab2a}{Type property queries}{meta.unary.prop.query} \\ \topline @@ -1429,8 +1431,8 @@ \rSec2[meta.rel]{Relationships between types} \pnum -This subclause contains templates that may be used to query -relationships between types at compile time. +The templates specified in \tref{meta.rel} +may be used to query relationships between types at compile time. \pnum Each of these templates shall be a @@ -1617,6 +1619,10 @@ \rSec3[meta.trans.cv]{Const-volatile modifications} +\pnum +The templates specified in \tref{meta.trans.cv} +add or remove cv-qualifications\iref{basic.type.qualifier}. + \begin{libreqtab2a}{Const-volatile modifications}{meta.trans.cv} \\ \topline \lhdr{Template} & \rhdr{Comments} \\ \capsep @@ -1685,6 +1691,10 @@ \rSec3[meta.trans.ref]{Reference modifications} +\pnum +The templates specified in \tref{meta.trans.ref} +add or remove references. + \begin{libreqtab2a}{Reference modifications}{meta.trans.ref} \\ \topline \lhdr{Template} & \rhdr{Comments} \\ \capsep @@ -1727,6 +1737,11 @@ \end{libreqtab2a} \rSec3[meta.trans.sign]{Sign modifications} + +\pnum +The templates specified in \tref{meta.trans.sign} +convert an integer type to its corresponding signed or unsigned type. + \begin{libreqtab2a}{Sign modifications}{meta.trans.sign} \\ \topline \lhdr{Template} & \rhdr{Comments} \\ \capsep @@ -1770,6 +1785,11 @@ \end{libreqtab2a} \rSec3[meta.trans.arr]{Array modifications} + +\pnum +The templates specified in \tref{meta.trans.arr} +modify array types. + \begin{libreqtab2a}{Array modifications}{meta.trans.arr} \\ \topline \lhdr{Template} & \rhdr{Comments} \\ \capsep @@ -1822,6 +1842,11 @@ \end{example} \rSec3[meta.trans.ptr]{Pointer modifications} + +\pnum +The templates specified in \tref{meta.trans.ptr} +add or remove pointers. + \begin{libreqtab2a}{Pointer modifications}{meta.trans.ptr} \\ \topline \lhdr{Template} & \rhdr{Comments} \\ \capsep @@ -1850,6 +1875,10 @@ \rSec3[meta.trans.other]{Other transformations} +\pnum +The templates specified in \tref{meta.trans.other} +perform other modifications of a type. + \begin{libreqtab2a}{Other transformations}{meta.trans.other} \\ \topline \lhdr{Template} & \rhdr{Comments} \\ \capsep diff --git a/source/numerics.tex b/source/numerics.tex index 655ad07dd0..ae66b727ce 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -194,7 +194,7 @@ that is not a cv-unqualified floating-point type\iref{basic.fundamental} is unspecified. Specializations of \tcode{complex} for cv-unqualified floating-point types -are trivially-copyable literal types\iref{term.literal.type}. +are trivially copyable literal types\iref{term.literal.type}. \pnum If the result of a function is not mathematically defined or not in @@ -3631,7 +3631,7 @@ // property functions double entropy() const noexcept; - @\textit{// no copy functions}@ + // no copy functions random_device(const random_device&) = delete; void operator=(const random_device&) = delete; }; diff --git a/source/preprocessor.tex b/source/preprocessor.tex index c0e21559f9..1d32a61af0 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -1794,6 +1794,8 @@ an \impldef{text of \mname{TIME} when time of translation is not available} valid time shall be supplied. \end{description} +\indextext{macro!feature-test}% +\indextext{feature-test macro|see{macro, feature-test}}% \begin{LongTable}{Feature-test macros}{cpp.predefined.ft}{ll} \\ \topline \lhdr{Macro name} & \rhdr{Value} \\ \capsep diff --git a/source/ranges.tex b/source/ranges.tex index db6e8be4e8..2a455af9e2 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -140,7 +140,7 @@ class subrange; // freestanding template - constexpr bool enable_borrowed_range> = true; // freestanding + constexpr bool @\libspec{enable_borrowed_range}{subrange}@> = true; // freestanding template requires ((N == 0 && @\libconcept{copyable}@) || N == 1) @@ -185,7 +185,7 @@ class empty_view; // freestanding template - constexpr bool enable_borrowed_range> = true; // freestanding + constexpr bool @\libspec{enable_borrowed_range}{empty_view}@> = true; // freestanding namespace views { template @@ -208,7 +208,7 @@ class iota_view; // freestanding template - constexpr bool enable_borrowed_range> = true; // freestanding + constexpr bool @\libspec{enable_borrowed_range}{iota_view}@> = true; // freestanding namespace views { inline constexpr @\unspecnc@ iota = @\unspecnc@; } // freestanding @@ -249,7 +249,7 @@ class ref_view; // freestanding template - constexpr bool enable_borrowed_range> = true; // freestanding + constexpr bool @\libspec{enable_borrowed_range}{ref_view}@> = true; // freestanding // \ref{range.owning.view}, owning view template<@\libconcept{range}@ R> @@ -257,7 +257,7 @@ class owning_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{owning_view}@> = // freestanding enable_borrowed_range; // \ref{range.as.rvalue}, as rvalue view @@ -266,7 +266,7 @@ class as_rvalue_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{as_rvalue_view}@> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ as_rvalue = @\unspecnc@; } // freestanding @@ -291,7 +291,7 @@ template<@\libconcept{view}@> class take_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{take_view}@> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ take = @\unspecnc@; } // freestanding @@ -309,7 +309,7 @@ class drop_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{drop_view}@> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ drop = @\unspecnc@; } // freestanding @@ -321,7 +321,7 @@ class drop_while_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{drop_while_view}@> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ drop_while = @\unspecnc@; } // freestanding @@ -375,7 +375,7 @@ class common_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{common_view}@> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ common = @\unspecnc@; } // freestanding @@ -386,7 +386,7 @@ class reverse_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{reverse_view}@> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ reverse = @\unspecnc@; } // freestanding @@ -406,7 +406,7 @@ class as_const_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{as_const_view}@> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ as_const = @\unspecnc@; } // freestanding @@ -417,7 +417,7 @@ class elements_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{elements_view}@> = // freestanding enable_borrowed_range; template @@ -438,7 +438,7 @@ class enumerate_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{enumerate_view}@> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ enumerate = @\unspecnc@; } // freestanding @@ -449,7 +449,7 @@ class zip_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{zip_view}@> = // freestanding (enable_borrowed_range && ...); namespace views { inline constexpr @\unspecnc@ zip = @\unspecnc@; } // freestanding @@ -469,7 +469,7 @@ class adjacent_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{adjacent_view}@> = // freestanding enable_borrowed_range; namespace views { @@ -499,7 +499,7 @@ class chunk_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{chunk_view}@> = // freestanding @\libconcept{forward_range}@ && enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ chunk = @\unspecnc@; } // freestanding @@ -510,8 +510,8 @@ class slide_view; // freestanding template - constexpr bool enable_borrowed_range> = - enable_borrowed_range; // freestanding + constexpr bool @\libspec{enable_borrowed_range}{slide_view}@> = // freestanding + enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ slide = @\unspecnc@; } // freestanding @@ -528,7 +528,7 @@ class stride_view; // freestanding template - constexpr bool enable_borrowed_range> = // freestanding + constexpr bool @\libspec{enable_borrowed_range}{stride_view}@> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ stride = @\unspecnc@; } // freestanding @@ -2336,6 +2336,8 @@ c.reserve(static_cast>(ranges::size(r))); ranges::copy(r, @\exposid{container-inserter}@>(c)); \end{codeblock} +\item +Otherwise, the program is ill-formed. \end{itemize} \item diff --git a/source/std.tex b/source/std.tex index ee39c38fa8..f179e402e8 100644 --- a/source/std.tex +++ b/source/std.tex @@ -143,6 +143,8 @@ \immediate\write\@auxout{\noexpand\@writefile{toc}{\noexpand\let\noexpand\chapternumberlinebox\noexpand\annexnumberlinebox}} \makeatother +\numberwithin{table}{chapter} + \include{grammar} \include{limits} \include{compatibility} diff --git a/source/strings.tex b/source/strings.tex index 659a6097bd..7b5a1aef30 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -541,9 +541,9 @@ class basic_string_view; template - constexpr bool ranges::enable_view> = true; + constexpr bool ranges::@\libspec{enable_view}{basic_string_view}@> = true; template - constexpr bool ranges::enable_borrowed_range> = true; + constexpr bool ranges::@\libspec{enable_borrowed_range}{basic_string_view}@> = true; // \ref{string.view.comparison}, non-member comparison functions template @@ -2569,7 +2569,6 @@ \pnum \constraints \tcode{Allocator} is a type - that qualifies as an allocator\iref{container.reqmts}. \begin{note} This affects class template argument deduction. diff --git a/source/support.tex b/source/support.tex index f9fb1a8c81..5d76edc882 100644 --- a/source/support.tex +++ b/source/support.tex @@ -541,6 +541,7 @@ (e.g., version number and release date). \pnum +\indextext{macro!feature-test}% Each of the macros defined in \libheader{version} is also defined after inclusion of any member of the set of library headers indicated in the corresponding comment in this synopsis. @@ -550,6 +551,7 @@ \end{note} \begin{codeblock} +#define @\defnlibxname{cpp_lib_adaptor_iterator_pair_constructor}@ 202106L // also in \libheader{stack}, \libheader{queue} #define @\defnlibxname{cpp_lib_addressof_constexpr}@ 201603L // freestanding, also in \libheader{memory} #define @\defnlibxname{cpp_lib_algorithm_iterator_requirements}@ 202207L // also in \libheader{algorithm}, \libheader{numeric}, \libheader{memory} @@ -557,7 +559,6 @@ #define @\defnlibxname{cpp_lib_allocator_traits_is_always_equal}@ 201411L // freestanding, 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} -#define @\defnlibxname{cpp_lib_adaptor_iterator_pair_constructor}@ 202106L // also in \libheader{stack}, \libheader{queue} #define @\defnlibxname{cpp_lib_any}@ 201606L // also in \libheader{any} #define @\defnlibxname{cpp_lib_apply}@ 201603L // freestanding, also in \libheader{tuple} #define @\defnlibxname{cpp_lib_array_constexpr}@ 201811L // also in \libheader{iterator}, \libheader{array} @@ -748,8 +749,8 @@ #define @\defnlibxname{cpp_lib_shared_ptr_weak_type}@ 201606L // also in \libheader{memory} #define @\defnlibxname{cpp_lib_shared_timed_mutex}@ 201402L // also in \libheader{shared_mutex} #define @\defnlibxname{cpp_lib_shift}@ 202202L // also in \libheader{algorithm} -#define @\defnlibxname{cpp_lib_smart_ptr_owner_equality}@ 202306L // also in \libheader{memory} #define @\defnlibxname{cpp_lib_smart_ptr_for_overwrite}@ 202002L // also in \libheader{memory} +#define @\defnlibxname{cpp_lib_smart_ptr_owner_equality}@ 202306L // also in \libheader{memory} #define @\defnlibxname{cpp_lib_source_location}@ 201907L // freestanding, also in \libheader{source_location} #define @\defnlibxname{cpp_lib_span}@ 202002L // also in \libheader{span} #define @\defnlibxname{cpp_lib_spanstream}@ 202106L // also in \libheader{spanstream} @@ -775,9 +776,9 @@ #define @\defnlibxname{cpp_lib_transformation_trait_aliases}@ 201304L // freestanding, also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_transparent_operators}@ 201510L // freestanding, also in \libheader{memory}, \libheader{functional} +#define @\defnlibxname{cpp_lib_tuple_element_t}@ 201402L // freestanding, also in \libheader{tuple} #define @\defnlibxname{cpp_lib_tuple_like}@ 202207L // also in \libheader{utility}, \libheader{tuple}, \libheader{map}, \libheader{unordered_map} -#define @\defnlibxname{cpp_lib_tuple_element_t}@ 201402L // freestanding, also in \libheader{tuple} #define @\defnlibxname{cpp_lib_tuples_by_type}@ 201304L // freestanding, also in \libheader{utility}, \libheader{tuple} #define @\defnlibxname{cpp_lib_type_identity}@ 201806L // freestanding, also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_type_trait_variable_templates}@ 201510L // freestanding, also in \libheader{type_traits} @@ -1966,6 +1967,11 @@ \ref{basic.extended.fp}. \indexheader{stdfloat}% +\indexlibraryglobal{float16_t}% +\indexlibraryglobal{float32_t}% +\indexlibraryglobal{float64_t}% +\indexlibraryglobal{float128_t}% +\indexlibraryglobal{bfloat16_t}% \begin{codeblock} namespace std { #if defined(__STDCPP_FLOAT16_T__) @@ -6158,6 +6164,6 @@ The header \libheader{stdlib.h} assuredly provides the same declarations and definitions within the global namespace, -much as in the C Standard. It may also provide these names within +much as in \IsoCUndated{}. It may also provide these names within the namespace \tcode{std}. \end{example} diff --git a/source/templates.tex b/source/templates.tex index 2dab2f99dc..1950689f30 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -3685,7 +3685,7 @@ \begin{note} If such a dependent name is unqualified, it is looked up from -the first declaration of the function template\iref{temp.dep.candidate}. +a first declaration of the function template\iref{temp.res.general}. \end{note} \begin{example} \begin{codeblock} @@ -8225,11 +8225,11 @@ that cause type deduction to fail: \begin{codeblock} -template void f( T (*)( T, U, U ) ); +template void f(T (*)(T, U, U)); -int g1( int, float, float); -char g2( int, float, float); -int g3( int, char, float); +int g1(int, float, float); +char g2(int, float, float); +int g3(int, char, float); void r() { f(g1); // OK, \tcode{T} is \tcode{int} and \tcode{U} is \tcode{float} diff --git a/source/threads.tex b/source/threads.tex index 7f294c2a5c..f43a6abf36 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -2968,10 +2968,10 @@ \begin{itemdescr} \pnum \expects -The \tcode{order} argument is neither -\tcode{memory_order::consume}, -\tcode{memory_order::acquire}, nor -\tcode{memory_order::acq_rel}. +\tcode{order} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::release}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -3009,8 +3009,11 @@ \begin{itemdescr} \pnum \expects -The \tcode{order} argument is neither -\tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{order} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac-\linebreak quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -3082,8 +3085,11 @@ \begin{itemdescr} \pnum \expects -The \tcode{failure} argument is neither -\tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{failure} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac\-quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -3147,7 +3153,10 @@ \pnum \expects \tcode{order} is -neither \tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac- \linebreak quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -3814,8 +3823,10 @@ \pnum \expects -The \tcode{order} argument is neither \tcode{memory_order::consume}, -\tcode{memory_order::acquire}, nor \tcode{memory_order::acq_rel}. +\tcode{order} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::release}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -3867,7 +3878,11 @@ \pnum \expects -The \tcode{order} argument is neither \tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{order} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac-\linebreak quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -3967,8 +3982,11 @@ \pnum \expects -The \tcode{failure} argument is neither \tcode{memory_order::release} nor -\tcode{memory_order::acq_rel}. +\tcode{failure} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac\-quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -4119,7 +4137,11 @@ \begin{itemdescr} \pnum \expects -\tcode{order} is neither \tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{order} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac-\linebreak quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -4970,10 +4992,10 @@ \begin{itemdescr} \pnum \expects -\tcode{order} is neither -\tcode{memory_order::consume}, -\tcode{memory_order::acquire}, nor -\tcode{memory_order::acq_rel}. +\tcode{order} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::release}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -5012,8 +5034,11 @@ \begin{itemdescr} \pnum \expects -\tcode{order} is neither -\tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{order} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac-\linebreak quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -5065,8 +5090,11 @@ \begin{itemdescr} \pnum \expects -\tcode{failure} is neither -\tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{failure} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac\-quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -5151,7 +5179,10 @@ \pnum \expects \tcode{order} is -neither \tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac-\linebreak quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -5289,10 +5320,10 @@ \begin{itemdescr} \pnum \expects -\tcode{order} is neither -\tcode{memory_order::consume}, -\tcode{memory_order::acquire}, nor -\tcode{memory_order::acq_rel}. +\tcode{order} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::release}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -5320,8 +5351,11 @@ \begin{itemdescr} \pnum \expects -\tcode{order} is neither -\tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{order} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac-\linebreak quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -5372,8 +5406,11 @@ \begin{itemdescr} \pnum \expects -\tcode{failure} is neither -\tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{failure} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac\-quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -5458,7 +5495,10 @@ \pnum \expects \tcode{order} is -neither \tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac-\linebreak quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -5603,7 +5643,10 @@ \pnum \expects \tcode{order} is -neither \tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac-\linebreak quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -5652,8 +5695,10 @@ \begin{itemdescr} \pnum \expects -The \tcode{order} argument is neither \tcode{memory_order::consume}, -\tcode{memory_order::acquire}, nor \tcode{memory_order::acq_rel}. +\tcode{order} is +\tcode{memory_order::relaxed}, +\tcode{memory_order::release}, or +\tcode{memory_order::seq_cst}. \pnum \effects @@ -5687,7 +5732,10 @@ \pnum \expects \tcode{order} is -neither \tcode{memory_order::release} nor \tcode{memory_order::acq_rel}. +\tcode{memory_order::relaxed}, +\tcode{memory_order::consume}, +\tcode{memory_order::ac-\linebreak quire}, or +\tcode{memory_order::seq_cst}. \pnum \effects diff --git a/source/time.tex b/source/time.tex index 4b75dc2a7a..c788fcf12b 100644 --- a/source/time.tex +++ b/source/time.tex @@ -20,7 +20,8 @@ \ref{time.12} & 12/24 hour functions & \\ \ref{time.zone} & Time zones & \\ \ref{time.format} & Formatting & \\ -\ref{time.parse} & Parsing & \\ \rowsep +\ref{time.parse} & Parsing & \\ +\ref{time.hash} & Hash support & \\ \rowsep \ref{ctime.syn} & C library time utilities & \tcode{} \\ \end{libsumtab} @@ -10792,7 +10793,7 @@ the locale's alternative full year representation. \\ \rowsep \tcode{\%z} & -The offset from UTC in the ISO 8601:2004 format. +The offset from UTC as specified in ISO 8601:2004, subclause 4.2.5.2. For example \tcode{-0430} refers to 4 hours 30 minutes behind UTC\@. If the offset is zero, \tcode{+0000} is used. The modified commands \tcode{\%Ez} and \tcode{\%Oz} @@ -11552,7 +11553,7 @@ \begin{itemdescr} \pnum -The specialization \tcode{hash>} +The specialization \tcode{hash>} is enabled\iref{unord.hash} if and only if \tcode{hash} is enabled and \tcode{hash} is enabled. diff --git a/source/utilities.tex b/source/utilities.tex index de5b358b4b..154e787edb 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -2503,7 +2503,7 @@ \pnum \effects -For each $i$, calls \tcode{swap} for \tcode{get<$i$>(*this)} with \tcode{get<$i$>(rhs)}. +For each $i$, calls \tcode{swap} for \tcode{get<$i$>(*this)} and \tcode{get<$i$>(rhs)}. \pnum \throws @@ -15901,8 +15901,6 @@ The \fmtgrammarterm{align} option applies to all argument types. The meaning of the various alignment options is as specified in \tref{format.align}. \begin{example} -%FIXME: example is incomplete, sB and sC result in: -%Error: Invalid UTF-8 byte sequence. \begin{codeblock} char c = 120; string s0 = format("{:6}", 42); // value of \tcode{s0} is \tcode{"\ \ \ \ 42"} @@ -15916,8 +15914,8 @@ string s8 = format("{:02}", 1234); // value of \tcode{s8} is \tcode{"1234"} string s9 = format("{:*<}", "12"); // value of \tcode{s9} is \tcode{"12"} string sA = format("{:*<6}", "12345678"); // value of \tcode{sA} is \tcode{"12345678"} -string sB = format("{:@\importexample[-2pt]{example_05}\caret{}@6}", "x"); // value of \tcode{sB} is \tcode{"\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}x\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}"} -string sC = format("{:*@\caret{}@6}", "@\importexample[-2pt]{example_05}@"); // value of \tcode{sC} is \tcode{"\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}"} +string sB = format("{:@\importexample[-2pt]{example_05}\kern0.75pt\caret{}@6}", "x"); // value of \tcode{sB} is \tcode{"\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}x\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}"} +string sC = format("{:*@\caret{}@6}", "@\importexample[-2pt]{example_05}\kern0.75pt\importexample[-2pt]{example_05}\kern0.75pt\importexample[-2pt]{example_05}\kern0.75pt@"); // value of \tcode{sC} is \tcode{"\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}"} \end{codeblock} \end{example} \begin{note} @@ -17139,9 +17137,6 @@ then \placeholder{C} is appended unchanged. \end{itemize} -%% FIXME: Example is incomplete; s2 and s6 from P2286R8 -%% and s8 (which should be s9) from P2713R1 are missing below; -%% 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]} diff --git a/source/xrefprev b/source/xrefprev index f7332158d2..72e4f16ee5 100644 --- a/source/xrefprev +++ b/source/xrefprev @@ -2,7 +2,6 @@ \glossaryentry{intro.refs@ {\memgloterm{intro.refs}}{\memglodesc{(\ref {intro.refs})}} {\memgloref{}}|memjustarg}{2} \glossaryentry{intro.defs@ {\memgloterm{intro.defs}}{\memglodesc{(\ref {intro.defs})}} {\memgloref{}}|memjustarg}{3} \glossaryentry{defns.access@ {\memgloterm{defns.access}}{\memglodesc{(\ref {defns.access})}} {\memgloref{}}|memjustarg}{3} -\glossaryentry{defns.arbitrary.stream@ {\memgloterm{defns.arbitrary.stream}}{\memglodesc{(\ref {defns.arbitrary.stream})}} {\memgloref{}}|memjustarg}{3} \glossaryentry{defns.argument@ {\memgloterm{defns.argument}}{\memglodesc{(\ref {defns.argument})}} {\memgloref{}}|memjustarg}{3} \glossaryentry{defns.argument.macro@ {\memgloterm{defns.argument.macro}}{\memglodesc{(\ref {defns.argument.macro})}} {\memgloref{}}|memjustarg}{3} \glossaryentry{defns.argument.throw@ {\memgloterm{defns.argument.throw}}{\memglodesc{(\ref {defns.argument.throw})}} {\memgloref{}}|memjustarg}{3} @@ -18,7 +17,6 @@ \glossaryentry{defns.deadlock@ {\memgloterm{defns.deadlock}}{\memglodesc{(\ref {defns.deadlock})}} {\memgloref{}}|memjustarg}{4} \glossaryentry{defns.default.behavior.impl@ {\memgloterm{defns.default.behavior.impl}}{\memglodesc{(\ref {defns.default.behavior.impl})}} {\memgloref{}}|memjustarg}{4} \glossaryentry{defns.diagnostic@ {\memgloterm{defns.diagnostic}}{\memglodesc{(\ref {defns.diagnostic})}} {\memgloref{}}|memjustarg}{4} -\glossaryentry{defns.direct.non.list.init@ {\memgloterm{defns.direct.non.list.init}}{\memglodesc{(\ref {defns.direct.non.list.init})}} {\memgloref{}}|memjustarg}{4} \glossaryentry{defns.dynamic.type@ {\memgloterm{defns.dynamic.type}}{\memglodesc{(\ref {defns.dynamic.type})}} {\memgloref{}}|memjustarg}{4} \glossaryentry{defns.dynamic.type.prvalue@ {\memgloterm{defns.dynamic.type.prvalue}}{\memglodesc{(\ref {defns.dynamic.type.prvalue})}} {\memgloref{}}|memjustarg}{4} \glossaryentry{defns.expression.equivalent@ {\memgloterm{defns.expression.equivalent}}{\memglodesc{(\ref {defns.expression.equivalent})}} {\memgloref{}}|memjustarg}{4} @@ -29,7 +27,6 @@ \glossaryentry{defns.impl.defined@ {\memgloterm{defns.impl.defined}}{\memglodesc{(\ref {defns.impl.defined})}} {\memgloref{}}|memjustarg}{5} \glossaryentry{defns.order.ptr@ {\memgloterm{defns.order.ptr}}{\memglodesc{(\ref {defns.order.ptr})}} {\memgloref{}}|memjustarg}{5} \glossaryentry{defns.impl.limits@ {\memgloterm{defns.impl.limits}}{\memglodesc{(\ref {defns.impl.limits})}} {\memgloref{}}|memjustarg}{5} -\glossaryentry{defns.iostream.templates@ {\memgloterm{defns.iostream.templates}}{\memglodesc{(\ref {defns.iostream.templates})}} {\memgloref{}}|memjustarg}{5} \glossaryentry{defns.locale.specific@ {\memgloterm{defns.locale.specific}}{\memglodesc{(\ref {defns.locale.specific})}} {\memgloref{}}|memjustarg}{5} \glossaryentry{defns.regex.matched@ {\memgloterm{defns.regex.matched}}{\memglodesc{(\ref {defns.regex.matched})}} {\memgloref{}}|memjustarg}{5} \glossaryentry{defns.modifier@ {\memgloterm{defns.modifier}}{\memglodesc{(\ref {defns.modifier})}} {\memgloref{}}|memjustarg}{5} @@ -48,7 +45,6 @@ \glossaryentry{defns.referenceable@ {\memgloterm{defns.referenceable}}{\memglodesc{(\ref {defns.referenceable})}} {\memgloref{}}|memjustarg}{7} \glossaryentry{defns.regex.regular.expression@ {\memgloterm{defns.regex.regular.expression}}{\memglodesc{(\ref {defns.regex.regular.expression})}} {\memgloref{}}|memjustarg}{7} \glossaryentry{defns.replacement@ {\memgloterm{defns.replacement}}{\memglodesc{(\ref {defns.replacement})}} {\memgloref{}}|memjustarg}{7} -\glossaryentry{defns.repositional.stream@ {\memgloterm{defns.repositional.stream}}{\memglodesc{(\ref {defns.repositional.stream})}} {\memgloref{}}|memjustarg}{7} \glossaryentry{defns.required.behavior@ {\memgloterm{defns.required.behavior}}{\memglodesc{(\ref {defns.required.behavior})}} {\memgloref{}}|memjustarg}{7} \glossaryentry{defns.reserved.function@ {\memgloterm{defns.reserved.function}}{\memglodesc{(\ref {defns.reserved.function})}} {\memgloref{}}|memjustarg}{7} \glossaryentry{defns.signature@ {\memgloterm{defns.signature}}{\memglodesc{(\ref {defns.signature})}} {\memgloref{}}|memjustarg}{7} diff --git a/tools/check-source.sh b/tools/check-source.sh index 97c15335e4..f5262fee1e 100755 --- a/tools/check-source.sh +++ b/tools/check-source.sh @@ -54,7 +54,7 @@ done | fail 'two consecutive \\pnum' || failed=1 # punctuation after the footnote marker -grep -n "\\end{footnote" $texfiles | grep -v '}[@)%]\?$' | +grep -n '\\end{footnote' $texfiles | grep -v '}[@)%]\?$' | fail "punctuation after footnote marker" || failed=1 # \opt used incorrectly. @@ -76,7 +76,7 @@ grep -n '^[^%]*[^{"]C++[^"}]' $texfiles | fail 'use \\Cpp{} instead' || failed=1 # Use \caret instead of \^ -fgrep -n '\^' $texfiles | +grep -F -n '\^' $texfiles | fail 'use \\caret instead' || failed=1 # Use \unicode instead of U+nnnn @@ -137,7 +137,7 @@ done | fail 'No namespace around class definition' || failed=1 # ref-qualifier on member functions with no space, e.g. "const&" -fgrep -ne ') const&' $texlib | +grep -F -ne ') const&' $texlib | fail 'no space between cv-qualifier and ref-qualifier' || failed=1 # \begin{example/note} with non-whitespace in front on the same line.