diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 1bd460753c..de1ebdac1e 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -22,7 +22,7 @@ jobs:
steps:
- name: checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: install GNU tools
if: matrix.cfg.os == 'macos-12'
@@ -33,6 +33,11 @@ jobs:
- name: check-source.sh
run: ../tools/check-source.sh
+ - name: update brew
+ if: matrix.cfg.os == 'macos-12'
+ run: |
+ brew update
+
- name: update-apt-cache
if: matrix.cfg.os == 'ubuntu-22.04'
run: sudo apt-get update
@@ -41,7 +46,7 @@ jobs:
if: matrix.cfg.os == 'ubuntu-22.04'
run: sudo apt-get install latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended lmodern
- - name: install (MacOS, Part 1/2)
+ - name: install (MacOS)
if: matrix.cfg.os == 'macos-12'
run: |
brew install basictex
@@ -50,9 +55,14 @@ jobs:
sudo tlmgr update --self
sudo tlmgr install latexmk isodate substr relsize ulem fixme rsfs extract layouts enumitem l3packages l3kernel imakeidx splitindex xstring
- - name: make
+ - name: make (Linux)
+ if: matrix.cfg.os == 'ubuntu-22.04'
run: make quiet
+ - name: make (MacOS)
+ if: matrix.cfg.os == 'macos-12'
+ run: make full
+
- name: check-output.sh
run: ../tools/check-output.sh
diff --git a/papers/n4945.html b/papers/n4945.html
new file mode 100644
index 0000000000..e8335900cf
--- /dev/null
+++ b/papers/n4945.html
@@ -0,0 +1,635 @@
+
+
+
+
+
+N4945
+
+
+N4945 Editors' Report -- Programming Languages -- C++
+
+Date: 2022-03-22
+
+Thomas Köppe (editor, Google DeepMind)
+Jens Maurer (co-editor)
+Dawn Perchik (co-editor, Bright Side Computing, LLC)
+Richard Smith (co-editor, Google Inc)
+
+Email: cxxeditor@gmail.com
+
+Acknowledgements
+
+Thanks to all those who have submitted editorial
+issues
+and to those who have provided pull requests with fixes.
+Thank you also to Robert Leahy for drafting motion applications,
+and special thanks to Johel Ernesto Guerrero Peña for providing in-depth review
+of many of the draft motion applications.
+
+New papers
+
+
+- N4944 is the
+current working draft for C++23. It replaces
+N4928.
+- N4945 is this Editors' Report.
+
+
+National body comments on the Committee Draft
+
+N4919 is the C++23 Committee Draft. It received 137 comments from national bodies.
+The first set of responses to all 11 editorial comments and to 49 non-editorial comments
+was incorporated into the previous working draft, N4928; see the
+previous Editors' Report
+for details. The present working draft contains the final set of responses,
+to 26 non-editorial comments, as noted below.
+
+Non-editorial comments
+
+
+- FR 012: Fixed by P2675R1 (LWG poll 10)
+- FR 013: Fixed by P2736R2 (CWG poll 8)
+- FR 021: Fixed by P2164R9 (LWG poll 6)
+- FR 023: Fixed by P2693R1 (LWG poll 12)
+- US 035: Fixed by CWG2642 (CWG poll 1)
+- US 036: Fixed by P2788R0 (CWG poll 9)
+- DE 038: Fixed by CWG2659 (CWG poll 6)
+- CA 076: Fixed by LWG3871 (LWG poll 3)
+- US 077: Fixed by P2652R2 (LWG poll 16)
+- DE 079: Fixed by P2614R2 (LWG poll 18)
+- GB 080: Fixed by LWG3828 (LWG poll 3)
+- GB 081: Fixed by LWG3827 (LWG poll 3)
+- GB 082: Fixed by LWG3827 (LWG poll 3)
+- GB 084: Fixed by LWG3869 (LWG poll 3)
+- CA 086: Fixed by P2679R2 (LWG poll 13)
+- GB 089: Fixed by P2674R1 (LWG poll 14)
+- US 098: Fixed by P2713R1 (LWG poll 9)
+- US 099: Fixed by P2609R3 (LWG poll 8)
+- US 108: Duplicate of FR 021
+- US 116: Fixed by P2787R1 (LWG poll 17)
+- GB 121: Fixed by LWG3870 (LWG poll 3)
+- US 126: Fixed by P2770R0 (LWG poll 5)
+- US 131: Fixed by P2588R3 (LWG poll 19)
+- FR 133: Duplicate of FR 013
+- FR 134: Duplicate of US 098
+- DE 135: Duplicate of US 131
+
+
+Motions incorporated into working draft
+
+Notes on motions
+
+
+- CWG Poll 7 does not modify the C++ Working Paper.
+- For CWG Poll 4, the proposed wording of CWG 2521
+erroneously used the non-existing grammar production pp-token,
+which was fixed to preprocessing-token.
+- For CWG Poll 8, a change of "character classes" to "character properties"
+missing from P2736R2
+was applied.
+- CWG Poll 8, LWG Polls 9 and 11 all affect Unicode-related wording. While the
+wording for the latter two was given relative to the status quo ante, the
+actual wording has been adjusted to incorporate the changes from the CWG poll.
+Moreover, we now always use the phrase "UAX #N of the Unicode Standard".
+- For LWG Poll 2, issue LWG 3821,
+the new overload was marked as "freestanding" to match the surrounding interface;
+this was not in the proposed wording.
+- For LWG Poll 6, an unused and erroneous default argument "
pos = 0
" was removed.
+- For LWG Poll 16, the wording has been reconciled with the changes from issue
+LWG 3775
+that was applied after the previous meeting.
+
+
+Core working group polls
+
+CWG Poll 1: Accept as a Defect Report and apply the proposed resolution of all issues
+except issues 2518, 2521, 2659, 2674, 2678, and 2691 in P2796R0
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.
+
+CWG Poll 2: Apply the proposed resolution of issues 2674 and 2691
+in P2796R0
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.
+
+CWG Poll 3: Accept as a Defect Report and apply the proposed resolution of issue 2518 (Conformance requirements and #error
/#warning
)
+in P2796R0
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.
+
+CWG Poll 4: Accept as a Defect Report and apply the proposed resolution of issue 2521 (User-defined literals and reserved identifiers)
+in P2796R0
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.
+
+CWG Poll 5: Accept as a Defect Report and apply the proposed resolution of issue 2678
+(std::source_location::current
is unimplementable) in P2796R0
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.
+
+CWG Poll 6: Apply the proposed resolution of issue 2659 (Missing feature-test macro for lifetime extension in range-for loop)
+in P2796R0
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper, resolving NB comment DE 038.
+
+CWG Poll 7: Specify that P2647R1
+(Permitting static constexpr variables in constexpr functions) (applied in November, 2022) is no longer a Defect Report.
+
+CWG Poll 8: Apply the changes in P2736R2 (Referencing The Unicode Standard)
+to the C++ Working Paper, resolving NB comments FR 133 and FR 013.
+
+CWG Poll 9: Accept as a Defect Report and apply the changes in P2788R0
+(Linkage for modular constants) to the C++ Working Paper, resolving NB comment US 036.
+
+CWG Poll 10: Apply the changes in P2797R0
+(Proposed resolution for CWG2692 Static and explicit object member functions with the same parameter-type-lists) to the C++ Working Paper.
+
+Library working group polls
+
+Poll 1 does not concern the C++ Working Paper.
+
+LWG Poll 2: Apply the changes for all Ready and Tentatively Ready issues in P2789R0
+(C++ Standard Library Issues to be moved in Issaquah, Feb. 2023) to the C++ working paper.
+
+LWG Poll 3: Apply the changes for all Immediate issues except 3441 in P2790R0
+(C++ Standard Library Immediate Issues to be moved in Issaquah, Feb. 2023) to the C++ working paper.
+
+LWG Poll 4: Apply the changes for the Immediate issue 3441 in P2790R0
+(C++ Standard Library Immediate Issues to be moved in Issaquah, Feb. 2023) to the C++ working paper.
+
+LWG Poll 5: Apply the changes in P2770R0
+(Stashing stashing iterators for proper flattening) to the C++ working paper. This addresses ballot comment US 126.
+
+LWG Poll 6: Apply the changes in P2164R9
+(views::enumerate
) to the C++ working paper. This addresses ballot comments FR 021 and US 108.
+
+LWG Poll 7: Apply the changes in P2711R1
+(Making multi-param constructors of views explicit) to the C++ working paper.
+
+LWG Poll 8: Apply the changes in P2609R3
+(Relaxing Ranges Just A Smidge) to the C++ working paper. This addresses ballot comment US 099.
+
+LWG Poll 9: Apply the changes in P2713R1
+(Escaping improvements in std::format
) to the C++ working paper. This addresses ballot comments US 098 and FR 134.
+
+LWG Poll 10: Apply the changes in P2675R1
+(format
's width estimation is too approximate and not forward compatible) to the C++ working paper. This addresses ballot comment FR 012.
+
+LWG Poll 11: Apply the changes in P2572R1
+(std::format
fill character allowances) to the C++ working paper.
+
+LWG Poll 12: Apply the changes in P2693R1
+(Formatting thread::id
and stacktrace
) to the C++ working paper. This addresses ballot comment FR 023.
+
+LWG Poll 13: Apply the changes in P2679R2
+(Fixing std::start_lifetime_as
for arrays) to the C++ working paper. This addresses ballot comment CA 086.
+
+LWG Poll 14: Apply the changes in P2674R1
+(A trait for implicit lifetime types) to the C++ working paper. This addresses ballot comment GB 089.
+
+LWG Poll 15: Apply the changes in P2655R3
+(common_reference_t
of reference_wrapper
Should Be a Reference Type) to the C++ working paper.
+
+LWG Poll 16: Apply the changes in P2652R2
+(Disallow User Specialization of allocator_traits
) to the C++ working paper. This addresses ballot comment US 077.
+
+LWG Poll 17: Apply the changes in P2787R1
+(pmr::generator
- Promise Types are not Values) to the C++ working paper. This addresses ballot comment US 116.
+
+LWG Poll 18: Apply the changes in P2614R2
+(Deprecate numeric_limits::has_denorm
) to the C++ working paper. This addresses ballot comment DE 079.
+
+LWG Poll 19: Apply the changes in P2588R3
+(barrier
's phase completion guarantees) to the C++ working paper. This addresses ballot comment DE 135 and US 131.
+
+LWG Poll 20: Apply the changes in P2763R1
+(layout_stride
static extents default constructor fix) to the C++ working paper.
+
+Noteworthy editorial changes
+
+
+- In the container requirements, the presentation of "contiguous container" has
+been reordered for a better logical progression, which was made possible by
+the earlier dissolution of the requirements tables.
+
+
+Minor editorial changes
+
+A log of editorial fixes made to the working draft since N4928 is below. This
+list excludes changes that do not affect the body text or only affect whitespace
+or typeface. For a complete list including such changes (or for the actual
+deltas applied by these changes), consult the draft sources on
+github.
+
+commit 538ed7470087a1304ec9c04db8b00de1d4f40d03
+Author: Thomas Köppe <tkoeppe@google.com>
+Date: Sun Dec 18 21:19:08 2022 +0000
+
+ [lex.ccon] Add xref to lex.charset, where encodings are defined
+
+commit ffd3141ffd278f86209845282548e6e5d9ed21eb
+Author: Thomas Köppe <tkoeppe@google.com>
+Date: Mon Dec 19 00:02:24 2022 +0000
+
+ [lex.string] Add xref to lex.charset, where encodings are defined
+
+commit 13fa11859e144ecba44807746cd376c0b33f571f
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date: Thu Dec 29 02:01:37 2022 +0800
+
+ [range.single.view] Remove duplicate semicolon (#6040)
+
+commit b98b620ec72c67423169782aa197dd0008900154
+Author: Eric41293 <eric41293@comcast.net>
+Date: Wed Dec 28 11:07:01 2022 -0700
+
+ [format.string.std] Fixing grammatical error (#6037)
+
+commit c8e334d0632b5e49e7333002ebeb04c58754f2d1
+Author: zhihaoy <43971430+zhihaoy@users.noreply.github.com>
+Date: Thu Jan 5 02:40:02 2023 -0800
+
+ [bitwise.operations.not] missing parameter name
+
+commit 0c9dd96bbfc421a0feabcbc2b6850cd369ed181f
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Tue Jan 17 23:16:33 2023 +0100
+
+ [over.over] Missed edit for P0847R7
+
+ P0847R7 (Deducing this) was approved at the October, 2021 meeting
+ and applied with commit ee5117e100bbe9b7adb3510b2d7bb6d4d150f810,
+ missing this change.
+
+commit 2228f1c619fcd19c61ae6a4378f03f6ee938e55a
+Author: Jonathan Wakely <cxx@kayari.org>
+Date: Mon Jan 16 12:11:47 2023 +0000
+
+ [unord.map.overview] Remove stray template-head on non-template
+
+commit b9d35e813c007f3514015017e1ce09d936b5e2cc
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date: Mon Jan 23 01:43:54 2023 +0800
+
+ [reverse.iter.conv] Remove unclear explicit comments
+
+ I don't know what explicit refers to here, it seems to be more appropriate to remove.
+ People who disagree with me are also welcome.
+
+commit b5d9d4f5c5a14a059a8af75428707a0fc14b4c12
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date: Tue Jan 24 17:20:59 2023 +0800
+
+ [move.sentinel] Use "std::move" in example for correctness (#6043)
+
+commit a009995257307b1ed8894718b70c917f4c25094b
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date: Thu Jan 26 02:06:35 2023 +0800
+
+ [iterator.synopsis] Fix inconsistent template constraint
+
+commit 388eff69768d3ba97c095de98e9972685f2e3579
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Fri Jan 27 14:30:39 2023 +0100
+
+ [version.syn] Fix value of __cpp_lib_constexpr_bitset
+
+ Paper P2417R2 was approved in July 2022, but commit
+ 75518ffdc476cbc239918466588d963fc97a8013 did not set
+ the feature-test to the approriate value.
+
+commit 9020f7480b2cd0f3c0857b93cab4dbcf44a24edc
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date: Sun Feb 5 23:30:36 2023 +0800
+
+ [format.range.fmtmap] Fix undefined type name
+
+commit a096b08e6a2ee5544fd753aefd9469673e4864dd
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date: Tue Jan 31 10:53:18 2023 +0800
+
+ [const.iterators.iterator] Add \expos comment for concept
+
+commit 9ce105b48e34c0e08947ac073694faa6600716ec
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date: Fri Feb 10 14:52:42 2023 +0800
+
+ [iostream.cons] Add std:: qualified for move
+
+commit 6d836080a380d0f828de30e6449985b5b503d874
+Author: Thomas Köppe <tkoeppe@google.com>
+Date: Mon Mar 6 18:28:32 2023 +0000
+
+ [dcl.pre] Add missing markup that makes "fails" a definition.
+
+ This change was missed from the application of CWG2518.
+
+ Also fixes the indexing of "static_assert" (which is a keyword, not a
+ grammar production).
+
+commit 9357ba63abeb27152ac7d03db4ba9a274cf2f922
+Author: timsong-cpp <rs2740@gmail.com>
+Date: Sun Feb 26 19:52:46 2023 -0600
+
+ [expected.object.eq] Fix typo
+
+commit 586f4ed7fbafeee5b91fcb6c2950008dfffbeec0
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Tue Mar 7 10:34:50 2023 -0500
+
+ [cpp.pre] Fix grammar for #elifdef
+
+ This fix is editorial as it corrects a mis-application of the original
+ paper, https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2334r1.pdf.
+
+ Note that the corresponding use of this grammar in [cpp.cond]p13
+ assumes the correct grammar, making the intent equally clear.
+
+commit 64ef8b32a5b3ac60e8ac1f28ccb008c704cc25f4
+Author: Barry Revzin <barry.revzin@gmail.com>
+Date: Sun Mar 12 10:11:24 2023 -0500
+
+ [expr.prim.req.compound] Move compound requirement example from inner to outer bullet (#6159)
+
+ Example 1 from [expr.prim.req.compound] is currently attached to the
+ inner bullet point, but should be attached to the outer one.
+
+commit 5a974f72f43928258a6264155f8932bebb3fea30
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date: Sun Mar 12 23:17:02 2023 +0800
+
+ [util.smartptr.atomic.general] Simplify example code (#6077)
+
+ Removes the redundant explicit construction of the return value,
+ and uses an explicit return type instead of "auto" for clarity.
+
+commit 1912644b1bf60e0c8fc8d53ccbee0488244b1fd3
+Author: A. Jiang <de34@live.cn>
+Date: Mon Mar 13 00:02:02 2023 +0800
+
+ [specialized.algorithms.general] Remove possibly wrong note (#6157)
+
+commit 40cfc37319ae4e6204a2237ad6e143fac6911df6
+Author: Blackteahamburger <blackteahamburger@outlook.com>
+Date: Mon Mar 13 02:23:01 2023 +0800
+
+ [allocator.requirements.general] Fix SimpleAllocator example (#6152)
+
+ The example now meets the requirements and is minimal.
+ Previously, some == comparisons that should work were ambiguous.
+
+commit f131b37fbf412bf2b69690914c2030b3ad702e55
+Author: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
+Date: Sun Mar 12 14:27:09 2023 -0400
+
+ [library.general,tab:thread.summary] Update references to renamed Clause (#6149)
+
+commit 71c72b23250d4e3f8c960c345721ba5e6a52f3c1
+Author: Giuseppe D'Angelo <dangelog@users.noreply.github.com>
+Date: Sun Mar 12 23:29:23 2023 +0100
+
+ [range.split] Fix invalid conversion in example (#6041)
+
+ Replaces an illegal implicit conversion from a range to string_view
+ in the example with an explicit one.
+
+ After P2499R0, it is no longer possible to implicitly construct a
+ string_view from a range (like the ones produced by views::split).
+
+commit b1f3246af2a6af4f2b81be9b296feb08ad40962b
+Author: Jonathan Wakely <cxx@kayari.org>
+Date: Thu Mar 2 12:58:40 2023 +0000
+
+ Consistent comma after e.g. and i.e. (again)
+
+commit 29c0c3d61be7875e9be08a19d7612a7a2c628ef6
+Author: Alex Riegler <53669754+alexriegler@users.noreply.github.com>
+Date: Sun Mar 12 19:59:06 2023 -0500
+
+ [tab:iostreams.summary] Add missing header in summary table (#6079)
+
+ Also reorder the headers into order of appearance,
+ which is how the "C library files" headers are ordered.
+
+commit 16dfc43257e15582d7461280b2c896c471e6e431
+Author: Mark de Wever <koraq@xs4all.nl>
+Date: Mon Mar 13 02:06:04 2023 +0100
+
+ [time.syn] Use "ymwd" parameter name consistently (#6029)
+
+commit 6298c4b6ad03946ea5a547d375762d5f029cf195
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Tue Mar 7 22:23:05 2023 -0500
+
+ [depr.template.template] Add cross-ref to core language
+
+ Add a cross reference to the core language paragraph that
+ contains the deprecation notice, [temp.names] (p6).
+
+commit d9f8705de8aaa61112250d211e7891e91b411dbe
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date: Sat Dec 31 00:57:08 2022 +0800
+
+ [range.take.overview, range.drop.overview] Remove redundant ranges:: qualifier
+
+commit dcac5eaf993a190a1bb1335217779bd9ef13a38e
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Tue Mar 14 10:46:30 2023 -0400
+
+ [span.iterators] Fix cross-reference to container iterators (#6183)
+
+ The current cross-reference is to [containers.requirements], which
+ is the whole containers requirements clause, including not just
+ general containers, but also allocator-aware, reversible, sequence,
+ associative, and unodered associative containers. It seems very
+ unlikely that the cross-reference expects to be the intersection
+ of all of those.
+
+ Rather, the reference seems to intend just the [containers.reqmts]
+ subclause, which adds just two useful constraints: random access
+ iterators should support the 3-way comparison operator, and the
+ interoperabiity of container iterators and const_iterators.
+
+commit 39c1510d443b647c46de3e84d49a21d442154795
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Tue Mar 14 16:12:22 2023 +0100
+
+ [stmt] Fix cross-references for condition
+
+commit 22a3b44cd6d5b0017cb57d8767d9dfc2094735c8
+Author: morinmorin <mimomorin@gmail.com>
+Date: Wed Mar 15 01:45:28 2023 +0900
+
+ [projected, alg.req.ind.{move, copy}, range.as.rvalue.overview] Article "an", not "a" (#6186)
+
+ The subsequent identifier is naturally pronounced with a leading vowel.
+
+commit ae8ec6f016e0efcb37104a96f0b0677b850fdd0f
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Thu Mar 16 11:13:43 2023 -0400
+
+ [container.reqmts] Fix cross-references to contiguous container
+
+ This edit deserves describing in detail, to establish that it
+ is purely editorial.
+
+ As part of the mission to clean up tables in the standard,
+ the general container requirements were split into 5 more
+ focused leaf nodes. Due to its location in the original
+ text, the definition for a contiguous container fell into
+ the subclause for reversible containers, to which it is
+ entirely unrelated. There is no requirement that a
+ contiguous container be reversible, only that it has the
+ correct category for its iterators.
+
+ Meanwhile, all 3 of the existing cross-references point
+ to the wrong leaf node, that simply provides a key to
+ the identifiers used throughout the specification of this
+ clause.
+
+ The fix has two parts. First move the definition of
+ contiguous container, and a container with special
+ iterators, into the [container.reqmts] clause where it
+ best belongs. This move is appended to the end so that
+ there can be no ambiguity that any existing text could
+ be confused with requirements only on contiguous
+ containers after the edit. The other part is to fix up
+ the three cross-references to point to [container.reqmts]
+ rather than its sibling that has no information on
+ contiguous containers.
+
+ A grep of the .tex source files confirms that these
+ three references (array,basic_string, and vector) are
+ the only current uses of contiguous container, even
+ though basic_stacktrace would also meet the requirements.
+
+commit f24d86dcb1d597dc65cd10e56e80d23e331a9f1b
+Author: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
+Date: Sat Mar 18 20:41:27 2023 -0400
+
+ [range.subrange.general, range.adaptors] Use "present only if" (#6146)
+
+
+
diff --git a/papers/n4945.md b/papers/n4945.md
new file mode 100644
index 0000000000..fd012dadb6
--- /dev/null
+++ b/papers/n4945.md
@@ -0,0 +1,488 @@
+# N4945 Editors' Report -- Programming Languages -- C++
+
+Date: 2022-03-22
+
+Thomas Köppe (editor, Google DeepMind)
+Jens Maurer (co-editor)
+Dawn Perchik (co-editor, Bright Side Computing, LLC)
+Richard Smith (co-editor, Google Inc)
+
+Email: `cxxeditor@gmail.com`
+
+## Acknowledgements
+
+Thanks to all those who have [submitted editorial
+issues](https://github.com/cplusplus/draft/wiki/How-to-submit-an-editorial-issue)
+and to those who have provided pull requests with fixes.
+Thank you also to Robert Leahy for drafting motion applications,
+and special thanks to Johel Ernesto Guerrero Peña for providing in-depth review
+of many of the draft motion applications.
+
+## New papers
+
+ * [N4944](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4944.pdf) is the
+ current working draft for C++23. It replaces
+ [N4928](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4928.pdf).
+ * N4945 is this Editors' Report.
+
+## National body comments on the Committee Draft
+
+N4919 is the C++23 Committee Draft. It received 137 comments from national bodies.
+The first set of responses to all 11 editorial comments and to 49 non-editorial comments
+was incorporated into the previous working draft, N4928; see the
+[previous Editors' Report](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4929.html)
+for details. The present working draft contains the final set of responses,
+to 26 non-editorial comments, as noted below.
+
+### Non-editorial comments
+
+* **FR 012:** Fixed by [P2675R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2675r1.pdf) (LWG poll 10)
+* **FR 013:** Fixed by [P2736R2](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2736r2.pdf) (CWG poll 8)
+* **FR 021:** Fixed by [P2164R9](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2164r9.pdf) (LWG poll 6)
+* **FR 023:** Fixed by [P2693R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2693r1.pdf) (LWG poll 12)
+* **US 035:** Fixed by [CWG2642](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2796r0.html#2642) (CWG poll 1)
+* **US 036:** Fixed by [P2788R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2788r0.html) (CWG poll 9)
+* **DE 038:** Fixed by [CWG2659](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2796r0.html#2659) (CWG poll 6)
+* **CA 076**: Fixed by [LWG3871](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2790r0.html#3871) (LWG poll 3)
+* **US 077:** Fixed by [P2652R2](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2652r2.html) (LWG poll 16)
+* **DE 079:** Fixed by [P2614R2](https://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2614r2.pdf) (LWG poll 18)
+* **GB 080**: Fixed by [LWG3828](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2790r0.html#3828) (LWG poll 3)
+* **GB 081**: Fixed by [LWG3827](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2790r0.html#3827) (LWG poll 3)
+* **GB 082**: Fixed by [LWG3827](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2790r0.html#3827) (LWG poll 3)
+* **GB 084**: Fixed by [LWG3869](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2790r0.html#3869) (LWG poll 3)
+* **CA 086:** Fixed by [P2679R2](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2679r2.html) (LWG poll 13)
+* **GB 089:** Fixed by [P2674R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2674r1.pdf) (LWG poll 14)
+* **US 098:** Fixed by [P2713R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2713r1.html) (LWG poll 9)
+* **US 099:** Fixed by [P2609R3](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2609r3.html) (LWG poll 8)
+* **US 108:** Duplicate of FR 021
+* **US 116:** Fixed by [P2787R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2787r1.pdf) (LWG poll 17)
+* **GB 121**: Fixed by [LWG3870](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2790r0.html#3870) (LWG poll 3)
+* **US 126:** Fixed by [P2770R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2770r0.html) (LWG poll 5)
+* **US 131:** Fixed by [P2588R3](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2588r3.html) (LWG poll 19)
+* **FR 133:** Duplicate of FR 013
+* **FR 134:** Duplicate of US 098
+* **DE 135:** Duplicate of US 131
+
+## Motions incorporated into working draft
+
+### Notes on motions
+
+* CWG Poll 7 does not modify the C++ Working Paper.
+* For CWG Poll 4, the proposed wording of [CWG 2521](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2796r0.html#2521)
+ erroneously used the non-existing grammar production *pp-token*,
+ which was fixed to *preprocessing-token*.
+* For CWG Poll 8, a change of "character classes" to "character properties"
+ missing from [P2736R2](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2736r2.pdf)
+ was applied.
+* CWG Poll 8, LWG Polls 9 and 11 all affect Unicode-related wording. While the
+ wording for the latter two was given relative to the status quo ante, the
+ actual wording has been adjusted to incorporate the changes from the CWG poll.
+ Moreover, we now always use the phrase "UAX #N of the Unicode Standard".
+* For LWG Poll 2, issue [LWG 3821](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2789r0.html#3821),
+ the new overload was marked as "freestanding" to match the surrounding interface;
+ this was not in the proposed wording.
+* For LWG Poll 6, an unused and erroneous default argument "`pos = 0`" was removed.
+* For LWG Poll 16, the wording has been reconciled with the changes from issue
+ [LWG 3775](https://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2703r0.html#3775)
+ that was applied after the previous meeting.
+
+### Core working group polls
+
+CWG Poll 1: Accept as a Defect Report and apply the proposed resolution of all issues
+except issues 2518, 2521, 2659, 2674, 2678, and 2691 in [P2796R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2796r0.html)
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.
+
+CWG Poll 2: Apply the proposed resolution of issues 2674 and 2691
+in [P2796R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2796r0.html)
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.
+
+CWG Poll 3: Accept as a Defect Report and apply the proposed resolution of issue 2518 (Conformance requirements and `#error`/`#warning`)
+in [P2796R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2796r0.html)
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.
+
+CWG Poll 4: Accept as a Defect Report and apply the proposed resolution of issue 2521 (User-defined literals and reserved identifiers)
+in [P2796R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2796r0.html)
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.
+
+CWG Poll 5: Accept as a Defect Report and apply the proposed resolution of issue 2678
+(`std::source_location::current` is unimplementable) in [P2796R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2796r0.html)
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper.
+
+CWG Poll 6: Apply the proposed resolution of issue 2659 (Missing feature-test macro for lifetime extension in range-for loop)
+in [P2796R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2796r0.html)
+(Core Language Working Group "ready" Issues for the February, 2023 meeting) to the C++ Working Paper, resolving NB comment DE 038.
+
+CWG Poll 7: Specify that [P2647R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2647r1.html)
+(Permitting static constexpr variables in constexpr functions) (applied in November, 2022) is no longer a Defect Report.
+
+CWG Poll 8: Apply the changes in [P2736R2](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2736r2.pdf) (Referencing The Unicode Standard)
+to the C++ Working Paper, resolving NB comments FR 133 and FR 013.
+
+CWG Poll 9: Accept as a Defect Report and apply the changes in [P2788R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2788r0.html)
+(Linkage for modular constants) to the C++ Working Paper, resolving NB comment US 036.
+
+CWG Poll 10: Apply the changes in [P2797R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2797r0.html)
+(Proposed resolution for CWG2692 Static and explicit object member functions with the same parameter-type-lists) to the C++ Working Paper.
+
+### Library working group polls
+
+Poll 1 does not concern the C++ Working Paper.
+
+LWG Poll 2: Apply the changes for all Ready and Tentatively Ready issues in [P2789R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2789r0.html)
+(C++ Standard Library Issues to be moved in Issaquah, Feb. 2023) to the C++ working paper.
+
+LWG Poll 3: Apply the changes for all Immediate issues except 3441 in [P2790R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2790r0.html)
+(C++ Standard Library Immediate Issues to be moved in Issaquah, Feb. 2023) to the C++ working paper.
+
+LWG Poll 4: Apply the changes for the Immediate issue 3441 in [P2790R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2790r0.html)
+(C++ Standard Library Immediate Issues to be moved in Issaquah, Feb. 2023) to the C++ working paper.
+
+LWG Poll 5: Apply the changes in [P2770R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2770r0.html)
+(Stashing stashing iterators for proper flattening) to the C++ working paper. This addresses ballot comment US 126.
+
+LWG Poll 6: Apply the changes in [P2164R9](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2164r9.pdf)
+(`views::enumerate`) to the C++ working paper. This addresses ballot comments FR 021 and US 108.
+
+LWG Poll 7: Apply the changes in [P2711R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2711r1.html)
+(Making multi-param constructors of views explicit) to the C++ working paper.
+
+LWG Poll 8: Apply the changes in [P2609R3](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2609r3.html)
+(Relaxing Ranges Just A Smidge) to the C++ working paper. This addresses ballot comment US 099.
+
+LWG Poll 9: Apply the changes in [P2713R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2713r1.html)
+(Escaping improvements in `std::format`) to the C++ working paper. This addresses ballot comments US 098 and FR 134.
+
+LWG Poll 10: Apply the changes in [P2675R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2675r1.pdf)
+(`format`'s width estimation is too approximate and not forward compatible) to the C++ working paper. This addresses ballot comment FR 012.
+
+LWG Poll 11: Apply the changes in [P2572R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2572r1.html)
+(`std::format` fill character allowances) to the C++ working paper.
+
+LWG Poll 12: Apply the changes in [P2693R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2693r1.pdf)
+(Formatting `thread::id` and `stacktrace`) to the C++ working paper. This addresses ballot comment FR 023.
+
+LWG Poll 13: Apply the changes in [P2679R2](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2679r2.html)
+(Fixing `std::start_lifetime_as` for arrays) to the C++ working paper. This addresses ballot comment CA 086.
+
+LWG Poll 14: Apply the changes in [P2674R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2674r1.pdf)
+(A trait for implicit lifetime types) to the C++ working paper. This addresses ballot comment GB 089.
+
+LWG Poll 15: Apply the changes in [P2655R3](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2655r3.html)
+(`common_reference_t` of `reference_wrapper` Should Be a Reference Type) to the C++ working paper.
+
+LWG Poll 16: Apply the changes in [P2652R2](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2652r2.html)
+(Disallow User Specialization of `allocator_traits`) to the C++ working paper. This addresses ballot comment US 077.
+
+LWG Poll 17: Apply the changes in [P2787R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2787r1.pdf)
+(`pmr::generator` - Promise Types are not Values) to the C++ working paper. This addresses ballot comment US 116.
+
+LWG Poll 18: Apply the changes in [P2614R2](https://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2614r2.pdf)
+(Deprecate `numeric_limits::has_denorm`) to the C++ working paper. This addresses ballot comment DE 079.
+
+LWG Poll 19: Apply the changes in [P2588R3](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2588r3.html)
+(`barrier`'s phase completion guarantees) to the C++ working paper. This addresses ballot comment DE 135 and US 131.
+
+LWG Poll 20: Apply the changes in [P2763R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2763r1.html)
+(`layout_stride` static extents default constructor fix) to the C++ working paper.
+
+### Noteworthy editorial changes
+
+* In the container requirements, the presentation of "contiguous container" has
+ been reordered for a better logical progression, which was made possible by
+ the earlier dissolution of the requirements tables.
+
+### Minor editorial changes
+
+A log of editorial fixes made to the working draft since N4928 is below. This
+list excludes changes that do not affect the body text or only affect whitespace
+or typeface. For a complete list including such changes (or for the actual
+deltas applied by these changes), consult the [draft sources on
+github](https://github.com/cplusplus/draft/compare/n4928...n4944).
+
+ commit 538ed7470087a1304ec9c04db8b00de1d4f40d03
+ Author: Thomas Köppe
+ Date: Sun Dec 18 21:19:08 2022 +0000
+
+ [lex.ccon] Add xref to lex.charset, where encodings are defined
+
+ commit ffd3141ffd278f86209845282548e6e5d9ed21eb
+ Author: Thomas Köppe
+ Date: Mon Dec 19 00:02:24 2022 +0000
+
+ [lex.string] Add xref to lex.charset, where encodings are defined
+
+ commit 13fa11859e144ecba44807746cd376c0b33f571f
+ Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+ Date: Thu Dec 29 02:01:37 2022 +0800
+
+ [range.single.view] Remove duplicate semicolon (#6040)
+
+ commit b98b620ec72c67423169782aa197dd0008900154
+ Author: Eric41293
+ Date: Wed Dec 28 11:07:01 2022 -0700
+
+ [format.string.std] Fixing grammatical error (#6037)
+
+ commit c8e334d0632b5e49e7333002ebeb04c58754f2d1
+ Author: zhihaoy <43971430+zhihaoy@users.noreply.github.com>
+ Date: Thu Jan 5 02:40:02 2023 -0800
+
+ [bitwise.operations.not] missing parameter name
+
+ commit 0c9dd96bbfc421a0feabcbc2b6850cd369ed181f
+ Author: Jens Maurer
+ Date: Tue Jan 17 23:16:33 2023 +0100
+
+ [over.over] Missed edit for P0847R7
+
+ P0847R7 (Deducing this) was approved at the October, 2021 meeting
+ and applied with commit ee5117e100bbe9b7adb3510b2d7bb6d4d150f810,
+ missing this change.
+
+ commit 2228f1c619fcd19c61ae6a4378f03f6ee938e55a
+ Author: Jonathan Wakely
+ Date: Mon Jan 16 12:11:47 2023 +0000
+
+ [unord.map.overview] Remove stray template-head on non-template
+
+ commit b9d35e813c007f3514015017e1ce09d936b5e2cc
+ Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+ Date: Mon Jan 23 01:43:54 2023 +0800
+
+ [reverse.iter.conv] Remove unclear explicit comments
+
+ I don't know what explicit refers to here, it seems to be more appropriate to remove.
+ People who disagree with me are also welcome.
+
+ commit b5d9d4f5c5a14a059a8af75428707a0fc14b4c12
+ Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+ Date: Tue Jan 24 17:20:59 2023 +0800
+
+ [move.sentinel] Use "std::move" in example for correctness (#6043)
+
+ commit a009995257307b1ed8894718b70c917f4c25094b
+ Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+ Date: Thu Jan 26 02:06:35 2023 +0800
+
+ [iterator.synopsis] Fix inconsistent template constraint
+
+ commit 388eff69768d3ba97c095de98e9972685f2e3579
+ Author: Jens Maurer
+ Date: Fri Jan 27 14:30:39 2023 +0100
+
+ [version.syn] Fix value of __cpp_lib_constexpr_bitset
+
+ Paper P2417R2 was approved in July 2022, but commit
+ 75518ffdc476cbc239918466588d963fc97a8013 did not set
+ the feature-test to the approriate value.
+
+ commit 9020f7480b2cd0f3c0857b93cab4dbcf44a24edc
+ Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+ Date: Sun Feb 5 23:30:36 2023 +0800
+
+ [format.range.fmtmap] Fix undefined type name
+
+ commit a096b08e6a2ee5544fd753aefd9469673e4864dd
+ Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+ Date: Tue Jan 31 10:53:18 2023 +0800
+
+ [const.iterators.iterator] Add \expos comment for concept
+
+ commit 9ce105b48e34c0e08947ac073694faa6600716ec
+ Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+ Date: Fri Feb 10 14:52:42 2023 +0800
+
+ [iostream.cons] Add std:: qualified for move
+
+ commit 6d836080a380d0f828de30e6449985b5b503d874
+ Author: Thomas Köppe
+ Date: Mon Mar 6 18:28:32 2023 +0000
+
+ [dcl.pre] Add missing markup that makes "fails" a definition.
+
+ This change was missed from the application of CWG2518.
+
+ Also fixes the indexing of "static_assert" (which is a keyword, not a
+ grammar production).
+
+ commit 9357ba63abeb27152ac7d03db4ba9a274cf2f922
+ Author: timsong-cpp
+ Date: Sun Feb 26 19:52:46 2023 -0600
+
+ [expected.object.eq] Fix typo
+
+ commit 586f4ed7fbafeee5b91fcb6c2950008dfffbeec0
+ Author: Alisdair Meredith
+ Date: Tue Mar 7 10:34:50 2023 -0500
+
+ [cpp.pre] Fix grammar for #elifdef
+
+ This fix is editorial as it corrects a mis-application of the original
+ paper, https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2334r1.pdf.
+
+ Note that the corresponding use of this grammar in [cpp.cond]p13
+ assumes the correct grammar, making the intent equally clear.
+
+ commit 64ef8b32a5b3ac60e8ac1f28ccb008c704cc25f4
+ Author: Barry Revzin
+ Date: Sun Mar 12 10:11:24 2023 -0500
+
+ [expr.prim.req.compound] Move compound requirement example from inner to outer bullet (#6159)
+
+ Example 1 from [expr.prim.req.compound] is currently attached to the
+ inner bullet point, but should be attached to the outer one.
+
+ commit 5a974f72f43928258a6264155f8932bebb3fea30
+ Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+ Date: Sun Mar 12 23:17:02 2023 +0800
+
+ [util.smartptr.atomic.general] Simplify example code (#6077)
+
+ Removes the redundant explicit construction of the return value,
+ and uses an explicit return type instead of "auto" for clarity.
+
+ commit 1912644b1bf60e0c8fc8d53ccbee0488244b1fd3
+ Author: A. Jiang
+ Date: Mon Mar 13 00:02:02 2023 +0800
+
+ [specialized.algorithms.general] Remove possibly wrong note (#6157)
+
+ commit 40cfc37319ae4e6204a2237ad6e143fac6911df6
+ Author: Blackteahamburger
+ Date: Mon Mar 13 02:23:01 2023 +0800
+
+ [allocator.requirements.general] Fix SimpleAllocator example (#6152)
+
+ The example now meets the requirements and is minimal.
+ Previously, some == comparisons that should work were ambiguous.
+
+ commit f131b37fbf412bf2b69690914c2030b3ad702e55
+ Author: Johel Ernesto Guerrero Peña
+ Date: Sun Mar 12 14:27:09 2023 -0400
+
+ [library.general,tab:thread.summary] Update references to renamed Clause (#6149)
+
+ commit 71c72b23250d4e3f8c960c345721ba5e6a52f3c1
+ Author: Giuseppe D'Angelo
+ Date: Sun Mar 12 23:29:23 2023 +0100
+
+ [range.split] Fix invalid conversion in example (#6041)
+
+ Replaces an illegal implicit conversion from a range to string_view
+ in the example with an explicit one.
+
+ After P2499R0, it is no longer possible to implicitly construct a
+ string_view from a range (like the ones produced by views::split).
+
+ commit b1f3246af2a6af4f2b81be9b296feb08ad40962b
+ Author: Jonathan Wakely
+ Date: Thu Mar 2 12:58:40 2023 +0000
+
+ Consistent comma after e.g. and i.e. (again)
+
+ commit 29c0c3d61be7875e9be08a19d7612a7a2c628ef6
+ Author: Alex Riegler <53669754+alexriegler@users.noreply.github.com>
+ Date: Sun Mar 12 19:59:06 2023 -0500
+
+ [tab:iostreams.summary] Add missing header in summary table (#6079)
+
+ Also reorder the headers into order of appearance,
+ which is how the "C library files" headers are ordered.
+
+ commit 16dfc43257e15582d7461280b2c896c471e6e431
+ Author: Mark de Wever
+ Date: Mon Mar 13 02:06:04 2023 +0100
+
+ [time.syn] Use "ymwd" parameter name consistently (#6029)
+
+ commit 6298c4b6ad03946ea5a547d375762d5f029cf195
+ Author: Alisdair Meredith
+ Date: Tue Mar 7 22:23:05 2023 -0500
+
+ [depr.template.template] Add cross-ref to core language
+
+ Add a cross reference to the core language paragraph that
+ contains the deprecation notice, [temp.names] (p6).
+
+ commit d9f8705de8aaa61112250d211e7891e91b411dbe
+ Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+ Date: Sat Dec 31 00:57:08 2022 +0800
+
+ [range.take.overview, range.drop.overview] Remove redundant ranges:: qualifier
+
+ commit dcac5eaf993a190a1bb1335217779bd9ef13a38e
+ Author: Alisdair Meredith
+ Date: Tue Mar 14 10:46:30 2023 -0400
+
+ [span.iterators] Fix cross-reference to container iterators (#6183)
+
+ The current cross-reference is to [containers.requirements], which
+ is the whole containers requirements clause, including not just
+ general containers, but also allocator-aware, reversible, sequence,
+ associative, and unodered associative containers. It seems very
+ unlikely that the cross-reference expects to be the intersection
+ of all of those.
+
+ Rather, the reference seems to intend just the [containers.reqmts]
+ subclause, which adds just two useful constraints: random access
+ iterators should support the 3-way comparison operator, and the
+ interoperabiity of container iterators and const_iterators.
+
+ commit 39c1510d443b647c46de3e84d49a21d442154795
+ Author: Jens Maurer
+ Date: Tue Mar 14 16:12:22 2023 +0100
+
+ [stmt] Fix cross-references for condition
+
+ commit 22a3b44cd6d5b0017cb57d8767d9dfc2094735c8
+ Author: morinmorin
+ Date: Wed Mar 15 01:45:28 2023 +0900
+
+ [projected, alg.req.ind.{move, copy}, range.as.rvalue.overview] Article "an", not "a" (#6186)
+
+ The subsequent identifier is naturally pronounced with a leading vowel.
+
+ commit ae8ec6f016e0efcb37104a96f0b0677b850fdd0f
+ Author: Alisdair Meredith
+ Date: Thu Mar 16 11:13:43 2023 -0400
+
+ [container.reqmts] Fix cross-references to contiguous container
+
+ This edit deserves describing in detail, to establish that it
+ is purely editorial.
+
+ As part of the mission to clean up tables in the standard,
+ the general container requirements were split into 5 more
+ focused leaf nodes. Due to its location in the original
+ text, the definition for a contiguous container fell into
+ the subclause for reversible containers, to which it is
+ entirely unrelated. There is no requirement that a
+ contiguous container be reversible, only that it has the
+ correct category for its iterators.
+
+ Meanwhile, all 3 of the existing cross-references point
+ to the wrong leaf node, that simply provides a key to
+ the identifiers used throughout the specification of this
+ clause.
+
+ The fix has two parts. First move the definition of
+ contiguous container, and a container with special
+ iterators, into the [container.reqmts] clause where it
+ best belongs. This move is appended to the end so that
+ there can be no ambiguity that any existing text could
+ be confused with requirements only on contiguous
+ containers after the edit. The other part is to fix up
+ the three cross-references to point to [container.reqmts]
+ rather than its sibling that has no information on
+ contiguous containers.
+
+ A grep of the .tex source files confirms that these
+ three references (array,basic_string, and vector) are
+ the only current uses of contiguous container, even
+ though basic_stacktrace would also meet the requirements.
+
+ commit f24d86dcb1d597dc65cd10e56e80d23e331a9f1b
+ Author: Johel Ernesto Guerrero Peña
+ Date: Sat Mar 18 20:41:27 2023 -0400
+
+ [range.subrange.general, range.adaptors] Use "present only if" (#6146)
diff --git a/papers/wd-index.md b/papers/wd-index.md
index abd18efdb3..f81e361401 100644
--- a/papers/wd-index.md
+++ b/papers/wd-index.md
@@ -42,4 +42,5 @@
* [N4901](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/n4901.pdf) 2021-10 C++ Working Draft
* [N4910](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf) 2022-03 C++ Working Draft
* [N4917](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4917.pdf) 2022-07 C++ Working Draft
- * [N4928](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4928.pdf) 2022-11 C++ Working Draft
+ * [N4928](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4928.pdf) 2022-11 C++ Working Draft
+ * [N4944](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4944.pdf) 2023-02 C++ Working Draft
diff --git a/source/algorithms.tex b/source/algorithms.tex
index 61a5eb3713..ad8add5227 100644
--- a/source/algorithms.tex
+++ b/source/algorithms.tex
@@ -436,7 +436,7 @@
The behavior of a program is undefined if
it invokes a vectorization-unsafe standard library function
from user code
-called from a \tcode{execution::unsequenced_policy} algorithm.
+called from an \tcode{execution::unsequenced_policy} algorithm.
\begin{note}
Because \tcode{execution::unsequenced_policy} allows
the execution of element access functions
@@ -523,7 +523,7 @@
The behavior of a program is undefined if
it invokes a vectorization-unsafe standard library function
from user code
-called from a \tcode{execution::parallel_unsequenced_policy} algorithm.
+called from an \tcode{execution::parallel_unsequenced_policy} algorithm.
\begin{note}
Because \tcode{execution::parallel_unsequenced_policy} allows
the execution of element access functions
@@ -8398,6 +8398,8 @@
The range \range{first}{last - 1}
is a valid heap with respect to \tcode{comp} and \tcode{proj}.
For the overloads in namespace \tcode{std},
+\tcode{RandomAccessIterator} meets
+the \oldconcept{ValueSwappable} requirements\iref{swappable.requirements} and
the type of \tcode{*first} meets
the \oldconcept{MoveConstructible} requirements (\tref{cpp17.moveconstructible}) and
the \oldconcept{MoveAssignable} requirements (\tref{cpp17.moveassignable}).
@@ -8505,8 +8507,10 @@
\pnum
\expects
For the overloads in namespace \tcode{std},
+\tcode{RandomAccessIterator} meets
+the \oldconcept{ValueSwap\-pable} requirements\iref{swappable.requirements} and
the type of \tcode{*first} meets
-the \oldconcept{Move\-Constructible} (\tref{cpp17.moveconstructible}) and
+the \oldconcept{MoveConstructible} (\tref{cpp17.moveconstructible}) and
\oldconcept{MoveAssignable} (\tref{cpp17.moveassignable}) requirements.
\pnum
@@ -10763,21 +10767,13 @@
are destroyed in an unspecified order
before allowing the exception to propagate.
-\pnum
-\begin{note}
-When invoked on ranges of
-potentially-overlapping subobjects\iref{intro.object},
-the algorithms specified in \ref{specialized.algorithms}
-result in undefined behavior.
-\end{note}
-
\pnum
Some algorithms specified in \ref{specialized.algorithms} make use of the exposition-only function
\tcode{\placeholdernc{voidify}}:
\begin{codeblock}
template
constexpr void* @\placeholdernc{voidify}@(T& obj) noexcept {
- return const_cast(static_cast(addressof(obj)));
+ return addressof(obj);
}
\end{codeblock}
diff --git a/source/back.tex b/source/back.tex
index 40954fd628..0ebe82f03b 100644
--- a/source/back.tex
+++ b/source/back.tex
@@ -18,40 +18,22 @@ \chapter{Bibliography}
Programming languages, their environments, and system software interfaces ---
Floating-point extensions for C --- Part 3: Interchange and extended types}
% Other international standards.
-\item
- %%% Format for the following entry is based on that specified at
- %%% http://www.iec.ch/standardsdev/resources/draftingpublications/directives/principles/referencing.htm
- The Unicode Consortium. Unicode Standard Annex, \UAX{29},
- \doccite{Unicode Text Segmentation} [online].
- Edited by Mark Davis. Revision 35; issued for Unicode 12.0.0. 2019-02-15 [viewed 2020-02-23].
- Available from: \url{http://www.unicode.org/reports/tr29/tr29-35.html}
-\item
- The Unicode Consortium. Unicode Standard Annex, \UAX{31},
- \doccite{Unicode Identifier and Pattern Syntax} [online].
- Edited by Mark Davis. Revision 33; issued for Unicode 13.0.0.
- 2020-02-13 [viewed 2021-06-08].
- Available from: \url{https://www.unicode.org/reports/tr31/tr31-33.html}
-\item
- The Unicode Standard Version 14.0,
- \doccite{Core Specification}.
- Unicode Consortium, ISBN 978-1-936213-29-0, copyright \copyright 2021 Unicode, Inc.
- Available from: \url{https://www.unicode.org/versions/Unicode14.0.0/UnicodeStandard-14.0.pdf}
\item
IANA Time Zone Database.
Available from: \url{https://www.iana.org/time-zones}
% Literature references.
\item
Bjarne Stroustrup,
- \doccite{The \Cpp{} Programming Language, second edition}, Chapter R.
+ \doccite{The \Cpp{} Programming Language, second edition}, Chapter R\@.
Addison-Wesley Publishing Company, ISBN 0-201-53992-6, copyright \copyright 1991 AT\&T
\item
- Brian W. Kernighan and Dennis M. Ritchie,
- \doccite{The C Programming Language}, Appendix A.
+ Brian W.\ Kernighan and Dennis M. Ritchie,
+ \doccite{The C Programming Language}, Appendix A\@.
Prentice-Hall, 1978, ISBN 0-13-110163-3, copyright \copyright 1978 AT\&T
\item
- P.J. Plauger,
+ P.J.\ Plauger,
\doccite{The Draft Standard \Cpp{} Library}.
- Prentice-Hall, ISBN 0-13-117003-1, copyright \copyright 1995 P.J. Plauger
+ Prentice-Hall, ISBN 0-13-117003-1, copyright \copyright 1995 P.J.\ Plauger
\end{itemize}
The arithmetic specification described in ISO/IEC 10967-1:2012 is
diff --git a/source/basic.tex b/source/basic.tex
index bd155ed606..0b6b3f78d0 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -680,6 +680,11 @@
shall be constant-initialized if
the object is constant-initialized in any such definition.
+\item In each such definition,
+corresponding manifestly constant-evaluated expressions
+that are not value-dependent
+shall have the same value\iref{expr.const,temp.dep.constexpr}.
+
\item In each such definition, the overloaded operators referred
to, the implicit calls to conversion functions, constructors, operator
new functions and operator delete functions, shall refer to the same
@@ -993,7 +998,7 @@
\begin{note}
Overload resolution can consider potentially conflicting declarations
found in multiple scopes
-(e.g. via \grammarterm{using-directive}s or for operator functions),
+(e.g., via \grammarterm{using-directive}s or for operator functions),
in which case it is often ambiguous.
\end{note}
\begin{example}
@@ -1083,10 +1088,12 @@
The locus of a \grammarterm{class-specifier} is immediately after
the \grammarterm{identifier} or \grammarterm{simple-template-id} (if any)
in its \grammarterm{class-head}\iref{class.pre}.
-The locus of
-an \grammarterm{enum-specifier} or \grammarterm{opaque-enum-declaration}
-is immediately after the \grammarterm{identifier} (if any)
-in it\iref{dcl.enum}.
+The locus of an \grammarterm{enum-specifier}
+is immediately after
+its \grammarterm{enum-head};
+the locus of an \grammarterm{opaque-enum-declaration}
+is immediately after it\iref{dcl.enum}.
+%FIXME: What's "it" below? What's "it" above?
The locus of an \grammarterm{alias-declaration} is immediately after it.
\pnum
@@ -1512,18 +1519,18 @@
\pnum
\indextext{scope!search}%
-A \defn{search} in a scope $X$ for a name $N$ from a program point $P$
-is a single search in $X$ for $N$ from $P$
+A \defn{search} in a scope $X$ for a name $M$ from a program point $P$
+is a single search in $X$ for $M$ from $P$
unless $X$ is the scope of a class or class template $T$, in which case the
following steps define the result of the search.
\begin{note}
The result differs only
-if $N$ is a \grammarterm{conversion-function-id} or
+if $M$ is a \grammarterm{conversion-function-id} or
if the single search would find nothing.
\end{note}
\pnum
-The \defn{lookup set} for $N$ in $C$, called $S(N,C)$,
+The \defn{lookup set} for a name $N$ in a class or class template $C$, called $S(N,C)$,
consists of two component sets:
the \term{declaration set}, a set of members named $N$; and
the \term{subobject set},
@@ -1548,10 +1555,10 @@
in each direct non-dependent\iref{temp.dep.type} base class subobject $B_i$, and
merge each such lookup set $S(N,B_i)$ in turn into $S(N,C)$.
\begin{note}
-If $T$ is incomplete,
+If $C$ is incomplete,
only base classes whose \grammarterm{base-specifier} appears before $P$
are considered.
-If $T$ is an instantiated class, its base classes are not dependent.
+If $C$ is an instantiated class, its base classes are not dependent.
\end{note}
\pnum
@@ -1577,9 +1584,9 @@
\end{itemize}
\pnum
-The result of the search is the declaration set of $S(N,T)$.
+The result of the search is the declaration set of $S(M,T)$.
If it is an invalid set, the program is ill-formed.
-If it differs from the result of a search in $T$ for $N$
+If it differs from the result of a search in $T$ for $M$
in a complete-class context\iref{class.mem} of $T$,
the program is ill-formed, no diagnostic required.
\begin{example}
@@ -1602,7 +1609,7 @@
\end{example}
\pnum
-If $N$ is a non-dependent \grammarterm{conversion-function-id},
+If $M$ is a non-dependent \grammarterm{conversion-function-id},
conversion function templates that are members of $T$ are considered.
For each such template $F$, the lookup set $S(t,T)$ is constructed,
considering a function template declaration to have the name $t$
@@ -2622,8 +2629,11 @@
\item
a non-template variable of non-volatile const-qualified type, unless
\begin{itemize}
+ \item it is declared in the purview of a module interface unit
+ (outside the \grammarterm{private-module-fragment}, if any) or
+ module partition, or
\item it is explicitly declared \keyword{extern}, or
- \item it is inline or exported, or
+ \item it is inline, or
\item it was previously declared and the prior declaration did
not have internal linkage; or
\end{itemize}
@@ -3329,7 +3339,7 @@
\pnum
An operation that begins the lifetime of
-an array of \tcode{char}, \tcode{unsigned char}, or \tcode{std::byte}
+an array of \tcode{unsigned char} or \tcode{std::byte}
implicitly creates objects within the region of storage occupied by the array.
\begin{note}
The array object provides storage for these objects.
@@ -3407,8 +3417,11 @@
A \grammarterm{delete-expression}\iref{expr.delete} invokes the destructor
prior to releasing the storage.
\end{note}
-In this case, the destructor is not implicitly invoked and any program that
-depends on the side effects produced by the destructor has undefined behavior.
+In this case, the destructor is not implicitly invoked.
+\begin{note}
+The correct behavior of a program often depends on
+the destructor being invoked for each object of class type.
+\end{note}
\pnum
Before the lifetime of an object has started but after the storage which
diff --git a/source/classes.tex b/source/classes.tex
index e13097d465..fcabddde7d 100644
--- a/source/classes.tex
+++ b/source/classes.tex
@@ -944,9 +944,10 @@
a member thereof, as described below.
\pnum
-When an \grammarterm{id-expression}\iref{expr.prim.id} that is not part of a
-class member access syntax\iref{expr.ref} and not used to form a
-pointer to member\iref{expr.unary.op} is used
+When an \grammarterm{id-expression}\iref{expr.prim.id} that is
+neither part of a class member access syntax\iref{expr.ref}
+nor the unparenthesized operand of
+the unary \tcode{\&} operator\iref{expr.unary.op} is used
where the current class is \tcode{X}\iref{expr.prim.this},
if name
lookup\iref{basic.lookup} resolves the name in the
@@ -1221,6 +1222,9 @@
\pnum
A constructor shall not be a coroutine.
+\pnum
+A constructor shall not have an explicit object parameter\iref{dcl.fct}.
+
\rSec3[class.default.ctor]{Default constructors}
\pnum
@@ -1944,7 +1948,7 @@
\end{example}
\pnum
-The implicitly-defined copy assignment operator for a
+The implicitly-defined copy/move assignment operator for a
union \tcode{X} copies the object representation\iref{term.object.representation} of \tcode{X}.
If the source and destination of the assignment are not the same object, then
for each object nested within\iref{intro.object}
@@ -2095,7 +2099,7 @@
\pnum
A defaulted destructor is a constexpr destructor
-if it satisfies the requirements for a constexpr function\iref{dcl.constexpr}.
+if it is constexpr-suitable\iref{dcl.constexpr}.
\pnum
Before a
@@ -4270,6 +4274,19 @@
access control is applied to it, not to the declarations that replace it.
For an overload set, access control is applied only to
the function selected by overload resolution.
+\begin{example}
+\begin{codeblock}
+struct S {
+ void f(int);
+private:
+ void f(double);
+};
+
+void g(S* sp) {
+ sp->f(2); // OK, access control applied after overload resolution
+}
+\end{codeblock}
+\end{example}
\begin{note}
Because access control applies to the declarations named, if access control is applied to a
\grammarterm{typedef-name}, only the accessibility of the typedef or alias declaration itself is considered.
@@ -6542,7 +6559,8 @@
\begin{itemize}
\item
-If \tcode{a <=> b} is usable\iref{class.compare.default},
+If \tcode{a <=> b} is usable\iref{class.compare.default} and
+can be explicitly converted to \tcode{R} using \keyword{static_cast},
\tcode{static_cast(a <=> b)}.
\item
diff --git a/source/compatibility.tex b/source/compatibility.tex
index fbf61627fb..2bf0b9f233 100644
--- a/source/compatibility.tex
+++ b/source/compatibility.tex
@@ -189,6 +189,20 @@
}
\end{codeblock}
+\rSec2[diff.cpp20.memory]{\ref{mem}: memory management library}
+
+\diffref{allocator.traits.general}
+\change
+Forbid partial and explicit program-defined specializations
+of \tcode{allocator_traits}.
+\rationale
+Allow addition of \tcode{allocate_at_least} to \tcode{allocator_traits},
+and potentially other members in the future.
+\effect
+Valid \CppXX{} code
+that partially or explicitly specializes \tcode{allocator_traits}
+is ill-formed with no diagnostic required in this revision of \Cpp{}.
+
\rSec2[diff.cpp20.utilities]{\ref{utilities}: general utilities library}
\diffref{format}
@@ -231,6 +245,37 @@
std::format("{}", t.bit); // ill-formed, previously returned \tcode{"0"}
\end{codeblock}
+\diffref{format.string.std}
+\change
+Restrict types of formatting arguments
+used as \fmtgrammarterm{width} or \fmtgrammarterm{precision} in
+a \fmtgrammarterm{std-format-spec}.
+\rationale
+Disallow types that do not have useful or portable semantics as
+a formatting width or precision.
+\effect
+Valid \CppXX{} code that passes a boolean or character type as
+\fmtgrammarterm{arg-id} becomes invalid.
+For example:
+\begin{codeblock}
+std::format("{:*^{}}", "", true); // ill-formed, previously returned \tcode{"*"}
+std::format("{:*^{}}", "", '1'); // ill-formed, previously returned an
+ // implementation-defined number of \tcode{'*'} characters
+\end{codeblock}
+
+\diffref{format.formatter.spec}
+\change
+Removed the \tcode{formatter} specialization:
+\begin{codeblock}
+template struct formatter;
+\end{codeblock}
+\rationale
+The specialization is inconsistent with the design of \tcode{formatter},
+which is intended to be instantiated only with cv-unqualified object types.
+\effect
+Valid \CppXX{} code that instantiated the removed specialization
+can become ill-formed.
+
\rSec2[diff.cpp20.strings]{\ref{strings}: strings library}
\diffref{string.classes}
@@ -277,6 +322,40 @@
};
\end{codeblock}
+\rSec2[diff.cpp20.thread]{\ref{thread}: concurrency support library}
+
+\diffref{thread.barrier}
+\change
+In this revision of \Cpp{},
+it is implementation-defined whether a barrier's phase completion step runs
+if no thread calls \tcode{wait}.
+Previously the phase completion step was guaranteed to run on the last thread that calls \tcode{arrive} or \tcode{arrive_and_drop} during the phase.
+In this revision of \Cpp{},
+it can run on any of the threads that arrived or waited at the barrier
+during the phase.
+\rationale
+Correct contradictory wording and
+improve implementation flexibility for performance.
+\effect
+Valid \CppXX{} code using a barrier might have
+different semantics in this revision of \Cpp{}
+if it depends on a completion function's side effects occurring exactly once,
+on a specific thread running the phase completion step, or
+on a completion function's side effects occurring
+without \tcode{wait} having been called.
+For example:
+\begin{codeblock}
+auto b0 = std::barrier(1);
+b0.arrive();
+b0.arrive(); // implementation-defined; previously well-defined
+
+int data = 0;
+auto b1 = std::barrier(1, [&] { data++; });
+b1.arrive();
+assert(data == 1); // implementation-defined; previously well-defined
+b1.arrive(); // implementation-defined; previously well-defined
+\end{codeblock}
+
\rSec1[diff.cpp17]{\Cpp{} and ISO \CppXVII{}}
\rSec2[diff.cpp17.general]{General}
diff --git a/source/config.tex b/source/config.tex
index 0f2a0d13ee..a7e44b8931 100644
--- a/source/config.tex
+++ b/source/config.tex
@@ -1,8 +1,8 @@
%!TEX root = std.tex
%%--------------------------------------------------
%% Version numbers
-\newcommand{\docno}{N4928}
-\newcommand{\prevdocno}{N4917}
+\newcommand{\docno}{N4944}
+\newcommand{\prevdocno}{N4928}
\newcommand{\cppver}{202002L}
%% Release date
diff --git a/source/containers.tex b/source/containers.tex
index 7a15185cc8..0cd3b6ce60 100644
--- a/source/containers.tex
+++ b/source/containers.tex
@@ -497,7 +497,7 @@
\pnum
\returns
\tcode{distance(c.begin(), c.end())},
-i.e. the number of elements in the container.
+i.e., the number of elements in the container.
\pnum
\complexity
@@ -628,6 +628,14 @@
with value \tcode{a.end()} before the swap will have value \tcode{b.end()} after the
swap.
+\pnum
+A \defnadj{contiguous}{container}
+is a container
+whose member types \tcode{iterator} and \tcode{const_iterator}
+meet the
+\oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} and
+model \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}.
+
\rSec3[container.rev.reqmts]{Reversible container requirements}
% Local command to index names as members of all containers.
@@ -809,14 +817,6 @@
shall not invalidate iterators to, or change the values of, objects
within that container.
-\pnum
-A \defnadj{contiguous}{container}
-is a container
-whose member types \tcode{iterator} and \tcode{const_iterator}
-meet the
-\oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} and
-model \libconcept{contiguous_iterator}\iref{iterator.concept.contiguous}.
-
\rSec3[container.opt.reqmts]{Optional container requirements}
\pnum
@@ -2008,6 +2008,12 @@
\expects
\tcode{T} is \oldconcept{EmplaceConstructible} into \tcode{X}
from \tcode{*ranges::begin(rg)}.
+For \tcode{deque},
+\tcode{T} is also \oldconcept{MoveInsertable} into \tcode{X}, and
+\tcode{T} meets the
+\oldconcept{MoveConstructible},
+\oldconcept{MoveAssignable}, and
+\oldconcept{Swappable}\iref{swappable.requirements} requirements.
\pnum
\effects
@@ -4167,7 +4173,9 @@
\begin{itemize}
\item \tcode{eq(r1, ke) == eq(ke, r1)},
\item \tcode{hf(r1) == hf(ke)} if \tcode{eq(r1, ke)} is \tcode{true}, and
- \item \tcode{(eq(r1, ke) \&\& eq(r1, r2)) == eq(r2, ke)},
+ \item if any two of
+ \tcode{eq(r1, ke)}, \tcode{eq(r2, ke)}, and \tcode{eq(r1, r2)}
+ are \tcode{true}, then all three are \tcode{true},
\end{itemize}
where \tcode{r1} and \tcode{r2} are keys of elements in \tcode{a_tran},
\item
@@ -4175,7 +4183,9 @@
\begin{itemize}
\item \tcode{eq(r1, kx) == eq(kx, r1)},
\item \tcode{hf(r1) == hf(kx)} if \tcode{eq(r1, kx)} is \tcode{true},
- \item \tcode{(eq(r1, kx) \&\& eq(r1, r2)) == eq(r2, kx)}, and
+ \item if any two of
+ \tcode{eq(r1, kx)}, \tcode{eq(r2, kx)}, and \tcode{eq(r1, r2)}
+ are \tcode{true}, then all three are \tcode{true}, and
\item \tcode{kx} is not convertible to
either \tcode{iterator} or \tcode{const_iterator},
\end{itemize}
@@ -6139,7 +6149,7 @@
\indextext{\idxcode{array}!contiguous storage}%
The header \libheader{array} defines a class template for storing fixed-size
sequences of objects.
-An \tcode{array} is a contiguous container\iref{container.requirements.general}.
+An \tcode{array} is a contiguous container\iref{container.reqmts}.
An instance of \tcode{array} stores \tcode{N} elements of type \tcode{T},
so that \tcode{size() == N} is an invariant.
@@ -8580,7 +8590,7 @@
of a sequence container, including most of the optional sequence container
requirements\iref{sequence.reqmts},
and, for an element type other than \tcode{bool},
-of a contiguous container\iref{container.requirements.general}.
+of a contiguous container\iref{container.reqmts}.
The exceptions are the
\tcode{push_front}, \tcode{prepend_range}, \tcode{pop_front}, and \tcode{emplace_front} member functions, which are not
provided. Descriptions are provided here only for operations on \tcode{vector}
@@ -11496,7 +11506,6 @@
iterator find(const K& k);
template
const_iterator find(const K& k) const;
- template
size_type count(const key_type& k) const;
template
size_type count(const K& k) const;
@@ -13177,6 +13186,13 @@
\item It has both \tcode{Container} and \tcode{Allocator} template parameters, and \tcode{uses_allocator_v} is \tcode{false}.
\item It has both \tcode{KeyContainer} and \tcode{Allocator} template parameters, and
\tcode{uses_allocator_v} is \tcode{false}.
+\item It has both \tcode{KeyContainer} and \tcode{Compare} template parameters, and
+\begin{codeblock}
+is_invocable_v
+\end{codeblock}
+is not a valid expression or is \tcode{false}.
\item It has both \tcode{MappedContainer} and \tcode{Allocator} template parameters, and
\tcode{uses_allocator_v} is \tcode{false}.
\end{itemize}
@@ -13189,6 +13205,15 @@
defined in \ref{associative.general}
may appear in deduction guides for container adaptors.
+\pnum
+The following exposition-only alias template
+may appear in deduction guides for container adaptors:
+\begin{codeblock}
+template
+ using @\exposid{alloc-rebind}@ = // \expos
+ typename allocator_traits::template rebind_alloc;
+\end{codeblock}
+
\rSec2[queue.syn]{Header \tcode{} synopsis}
\indexheader{queue}
@@ -14160,7 +14185,11 @@
\begin{itemdescr}
\pnum
\effects
-Insert all elements of \tcode{rg} in \tcode{c}.
+Inserts all elements of \tcode{rg} in \tcode{c} via
+\tcode{c.append_range(std::forward(rg))} if that is a valid expression, or
+\tcode{ranges::copy(rg, back_inserter(c))} otherwise.
+Then restores the heap property as if by
+\tcode{make_heap(c.begin(), c.end(), comp)}.
\pnum
\ensures
@@ -14727,15 +14756,24 @@
// \ref{flat.map.cons}, construct/copy/destroy
flat_map() : flat_map(key_compare()) { }
- flat_map(key_container_type key_cont, mapped_container_type mapped_cont);
+ flat_map(key_container_type key_cont, mapped_container_type mapped_cont,
+ const key_compare& comp = key_compare());
template
flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont,
const Allocator& a);
+ template
+ flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont,
+ const key_compare& comp, const Allocator& a);
- flat_map(sorted_unique_t, key_container_type key_cont, mapped_container_type mapped_cont);
+ flat_map(sorted_unique_t, key_container_type key_cont, mapped_container_type mapped_cont,
+ const key_compare& comp = key_compare());
template
flat_map(sorted_unique_t, const key_container_type& key_cont,
const mapped_container_type& mapped_cont, const Allocator& a);
+ template
+ flat_map(sorted_unique_t, const key_container_type& key_cont,
+ const mapped_container_type& mapped_cont,
+ const key_compare& comp, const Allocator& a);
explicit flat_map(const key_compare& comp)
: c(), compare(comp) { }
@@ -14943,25 +14981,35 @@
};
};
- template
- flat_map(KeyContainer, MappedContainer)
+ template>
+ flat_map(KeyContainer, MappedContainer, Compare = Compare())
-> flat_map, KeyContainer, MappedContainer>;
+ Compare, KeyContainer, MappedContainer>;
template
flat_map(KeyContainer, MappedContainer, Allocator)
-> flat_map, KeyContainer, MappedContainer>;
+ template
+ flat_map(KeyContainer, MappedContainer, Compare, Allocator)
+ -> flat_map;
- template
- flat_map(sorted_unique_t, KeyContainer, MappedContainer)
+ template>
+ flat_map(sorted_unique_t, KeyContainer, MappedContainer, Compare = Compare())
-> flat_map, KeyContainer, MappedContainer>;
+ Compare, KeyContainer, MappedContainer>;
template
flat_map(sorted_unique_t, KeyContainer, MappedContainer, Allocator)
-> flat_map, KeyContainer, MappedContainer>;
+ template
+ flat_map(sorted_unique_t, KeyContainer, MappedContainer, Compare, Allocator)
+ -> flat_map;
template>>
flat_map(InputIterator, InputIterator, Compare = Compare())
@@ -14972,13 +15020,17 @@
-> flat_map<@\exposid{iter-key-type}@, @\exposid{iter-mapped-type}@, Compare>;
template>,
- class Allocator>
+ class Allocator = allocator>
flat_map(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
- -> flat_map<@\exposid{range-key-type}@, @\exposid{range-mapped-type}@, Compare>;
+ -> flat_map<@\exposid{range-key-type}@, @\exposid{range-mapped-type}@, Compare,
+ vector<@\exposid{range-key-type}@, @\exposid{alloc-rebind}@>>,
+ vector<@\exposid{range-mapped-type}@, @\exposid{alloc-rebind}@>>>;
template
flat_map(from_range_t, R&&, Allocator)
- -> flat_map<@\exposid{range-key-type}@, @\exposid{range-mapped-type}@>;
+ -> flat_map<@\exposid{range-key-type}@, @\exposid{range-mapped-type}@, less<@\exposid{range-key-type}@>,
+ vector<@\exposid{range-key-type}@, @\exposid{alloc-rebind}@>>,
+ vector<@\exposid{range-mapped-type}@, @\exposid{alloc-rebind}@>>>;
template>
flat_map(initializer_list>, Compare = Compare())
@@ -15005,15 +15057,17 @@
\indexlibraryctor{flat_map}%
\begin{itemdecl}
-flat_map(key_container_type key_cont, mapped_container_type mapped_cont);
+flat_map(key_container_type key_cont, mapped_container_type mapped_cont,
+ const key_compare& comp = key_compare());
\end{itemdecl}
\begin{itemdescr}
\pnum
\effects
-Initializes \tcode{c.keys} with \tcode{std::move(key_cont)} and
-\tcode{c.values} with \tcode{std::move(mapped_cont)};
-value-initializes \tcode{compare};
+Initializes
+\tcode{c.keys} with \tcode{std::move(key_cont)},
+\tcode{c.values} with \tcode{std::move(mapped_cont)}, and
+\tcode{compare} with \tcode{comp};
sorts the range \range{begin()}{end()} with respect to \tcode{value_comp()}; and
finally erases the duplicate elements as if by:
\begin{codeblock}
@@ -15036,6 +15090,9 @@
template
flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont,
const Allocator& a);
+template
+ flat_map(const key_container_type& key_cont, const mapped_container_type& mapped_cont,
+ const key_compare& comp, const Allocator& a);
\end{itemdecl}
\begin{itemdescr}
@@ -15046,26 +15103,30 @@
\pnum
\effects
-Equivalent to \tcode{flat_map(key_cont, mapped_cont)},
+Equivalent to \tcode{flat_map(key_cont, mapped_cont)} and
+\tcode{flat_map(key_cont, mapped_cont, comp)}, respectively,
except that \tcode{c.keys} and \tcode{c.values} are constructed with
uses-allocator construction\iref{allocator.uses.construction}.
\pnum
\complexity
-Same as \tcode{flat_map(key_cont, mapped_cont)}.
+Same as \tcode{flat_map(key_cont, mapped_cont)} and
+\tcode{flat_map(key_cont, mapped_cont, comp)}, respectively.
\end{itemdescr}
\indexlibraryctor{flat_map}%
\begin{itemdecl}
-flat_map(sorted_unique_t, key_container_type key_cont, mapped_container_type mapped_cont);
+flat_map(sorted_unique_t, key_container_type key_cont, mapped_container_type mapped_cont,
+ const key_compare& comp = key_compare());
\end{itemdecl}
\begin{itemdescr}
\pnum
\effects
-Initializes \tcode{c.keys} with \tcode{std::move(key_cont)} and
-\tcode{c.values} with \tcode{std::move(mapped_cont)};
-value-initializes \tcode{compare}.
+Initializes
+\tcode{c.keys} with \tcode{std::move(key_cont)},
+\tcode{c.values} with \tcode{std::move(mapped_cont)}, and
+\tcode{compare} with \tcode{comp}.
\pnum
\complexity
@@ -15077,6 +15138,10 @@
template
flat_map(sorted_unique_t s, const key_container_type& key_cont,
const mapped_container_type& mapped_cont, const Allocator& a);
+template
+ flat_map(sorted_unique_t s, const key_container_type& key_cont,
+ const mapped_container_type& mapped_cont, const key_compare& comp,
+ const Allocator& a);
\end{itemdecl}
\begin{itemdescr}
@@ -15087,7 +15152,8 @@
\pnum
\effects
-Equivalent to \tcode{flat_map(s, key_cont, mapped_cont)},
+Equivalent to \tcode{flat_map(s, key_cont, mapped_cont)} and
+\tcode{flat_map(s, key_cont, \linebreak{}mapped_cont, comp)}, respectively,
except that \tcode{c.keys} and \tcode{c.values} are constructed
with uses-allocator construction\iref{allocator.uses.construction}.
@@ -15870,16 +15936,25 @@
// \ref{flat.multimap.cons}, construct/copy/destroy
flat_multimap() : flat_multimap(key_compare()) { }
- flat_multimap(key_container_type key_cont, mapped_container_type mapped_cont);
+ flat_multimap(key_container_type key_cont, mapped_container_type mapped_cont,
+ const key_compare& comp = key_compare());
template
flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont,
const Allocator& a);
+ template
+ flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont,
+ const key_compare& comp, const Allocator& a);
flat_multimap(sorted_equivalent_t,
- key_container_type key_cont, mapped_container_type mapped_cont);
+ key_container_type key_cont, mapped_container_type mapped_cont,
+ const key_compare& comp = key_compare());
template
flat_multimap(sorted_equivalent_t, const key_container_type& key_cont,
const mapped_container_type& mapped_cont, const Allocator& a);
+ template
+ flat_multimap(sorted_equivalent_t, const key_container_type& key_cont,
+ const mapped_container_type& mapped_cont,
+ const key_compare& comp, const Allocator& a);
explicit flat_multimap(const key_compare& comp)
: c(), compare(comp) { }
@@ -16051,25 +16126,35 @@
key_compare compare; // \expos
};
- template
- flat_multimap(KeyContainer, MappedContainer)
+ template>
+ flat_multimap(KeyContainer, MappedContainer, Compare = Compare())
-> flat_multimap, KeyContainer, MappedContainer>;
+ Compare, KeyContainer, MappedContainer>;
template
flat_multimap(KeyContainer, MappedContainer, Allocator)
-> flat_multimap, KeyContainer, MappedContainer>;
+ template
+ flat_multimap(KeyContainer, MappedContainer, Compare, Allocator)
+ -> flat_multimap;
- template
- flat_multimap(sorted_equivalent_t, KeyContainer, MappedContainer)
+ template>
+ flat_multimap(sorted_equivalent_t, KeyContainer, MappedContainer, Compare = Compare())
-> flat_multimap, KeyContainer, MappedContainer>;
+ Compare, KeyContainer, MappedContainer>;
template
flat_multimap(sorted_equivalent_t, KeyContainer, MappedContainer, Allocator)
-> flat_multimap, KeyContainer, MappedContainer>;
+ template
+ flat_multimap(sorted_equivalent_t, KeyContainer, MappedContainer, Compare, Allocator)
+ -> flat_multimap;
template>>
flat_multimap(InputIterator, InputIterator, Compare = Compare())
@@ -16080,13 +16165,21 @@
-> flat_multimap<@\exposid{iter-key-type}@, @\exposid{iter-mapped-type}@, Compare>;
template>,
- class Allocator>
+ class Allocator = allocator>
flat_multimap(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
- -> flat_multimap<@\exposid{range-key-type}@, @\exposid{range-mapped-type}@, Compare>;
+ -> flat_multimap<@\exposid{range-key-type}@, @\exposid{range-mapped-type}@, Compare,
+ vector<@\exposid{range-key-type}@,
+ @\exposid{alloc-rebind}@>>,
+ vector<@\exposid{range-mapped-type}@,
+ @\exposid{alloc-rebind}@>>>;
template
flat_multimap(from_range_t, R&&, Allocator)
- -> flat_multimap<@\exposid{range-key-type}@, @\exposid{range-mapped-type}@>;
+ -> flat_multimap<@\exposid{range-key-type}@, @\exposid{range-mapped-type}@, less<@\exposid{range-key-type}@>,
+ vector<@\exposid{range-key-type}@,
+ @\exposid{alloc-rebind}@>>,
+ vector<@\exposid{range-mapped-type}@,
+ @\exposid{alloc-rebind}@>>>;
template>
flat_multimap(initializer_list>, Compare = Compare())
@@ -16114,15 +16207,17 @@
\indexlibraryctor{flat_multimap}%
\begin{itemdecl}
-flat_multimap(key_container_type key_cont, mapped_container_type mapped_cont);
+flat_multimap(key_container_type key_cont, mapped_container_type mapped_cont,
+ const key_compare& comp = key_compare());
\end{itemdecl}
\begin{itemdescr}
\pnum
\effects
-Initializes \tcode{c.keys} with \tcode{std::move(key_cont)} and
-\tcode{c.values} with \tcode{std::move(mapped_cont)};
-value-initializes \tcode{compare}; and
+Initializes
+\tcode{c.keys} with \tcode{std::move(key_cont)},
+\tcode{c.values} with \tcode{std::move(mapped_cont)}, and
+\tcode{compare} with \tcode{comp};
sorts the range \range{begin()}{end()} with respect to \tcode{value_comp()}.
\pnum
@@ -16137,6 +16232,9 @@
template
flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont,
const Allocator& a);
+template
+ flat_multimap(const key_container_type& key_cont, const mapped_container_type& mapped_cont,
+ const key_compare& comp, const Allocator& a);
\end{itemdecl}
\begin{itemdescr}
@@ -16147,26 +16245,30 @@
\pnum
\effects
-Equivalent to \tcode{flat_multimap(key_cont, mapped_cont)},
+Equivalent to \tcode{flat_multimap(key_cont, mapped_cont)} and
+\tcode{flat_multimap(key_cont, \linebreak{}mapped_cont, comp)}, respectively,
except that \tcode{c.keys} and \tcode{c.values} are constructed
with uses-allocator construction\iref{allocator.uses.construction}.
\pnum
\complexity
-Same as \tcode{flat_multimap(key_cont, mapped_cont)}.
+Same as \tcode{flat_multimap(key_cont, mapped_cont)} and
+\tcode{flat_multimap(key_cont, \linebreak{}mapped_cont, comp)}, respectively.
\end{itemdescr}
\indexlibraryctor{flat_multimap}%
\begin{itemdecl}
-flat_multimap(sorted_equivalent_t, key_container_type key_cont, mapped_container_type mapped_cont);
+flat_multimap(sorted_equivalent_t, key_container_type key_cont, mapped_container_type mapped_cont,
+ const key_compare& comp = key_compare());
\end{itemdecl}
\begin{itemdescr}
\pnum
\effects
-Initializes \tcode{c.keys} with \tcode{std::move(key_cont)} and
-\tcode{c.values} with \tcode{std::move(mapped_cont)};
-value-initializes \tcode{compare}.
+Initializes
+\tcode{c.keys} with \tcode{std::move(key_cont)},
+\tcode{c.values} with \tcode{std::move(mapped_cont)}, and
+\tcode{compare} with \tcode{comp}.
\pnum
\complexity
@@ -16178,6 +16280,10 @@
template
flat_multimap(sorted_equivalent_t s, const key_container_type& key_cont,
const mapped_container_type& mapped_cont, const Allocator& a);
+template
+ flat_multimap(sorted_equivalent_t s, const key_container_type& key_cont,
+ const mapped_container_type& mapped_cont, const key_compare& comp,
+ const Allocator& a);
\end{itemdecl}
\begin{itemdescr}
@@ -16188,7 +16294,8 @@
\pnum
\effects
-Equivalent to \tcode{flat_multimap(s, key_cont, mapped_cont)},
+Equivalent to \tcode{flat_multimap(s, key_cont, mapped_cont)} and
+\tcode{flat_multimap(s, key_cont, mapped_cont, comp)}, respectively,
except that \tcode{c.keys} and \tcode{c.val\-ues} are constructed
with uses-allocator construction\iref{allocator.uses.construction}.
@@ -16390,14 +16497,19 @@
// \ref{flat.set.cons}, constructors
flat_set() : flat_set(key_compare()) { }
- explicit flat_set(container_type cont);
+ explicit flat_set(container_type cont, const key_compare& comp = key_compare());
template
flat_set(const container_type& cont, const Allocator& a);
+ template
+ flat_set(const container_type& cont, const key_compare& comp, const Allocator& a);
- flat_set(sorted_unique_t, container_type cont)
- : @\exposid{c}@(std::move(cont)), @\exposid{compare}@(key_compare()) { }
+ flat_set(sorted_unique_t, container_type cont, const key_compare& comp = key_compare())
+ : @\exposid{c}@(std::move(cont)), @\exposid{compare}@(comp) { }
template
flat_set(sorted_unique_t, const container_type& cont, const Allocator& a);
+ template
+ flat_set(sorted_unique_t, const container_type& cont,
+ const key_compare& comp, const Allocator& a);
explicit flat_set(const key_compare& comp)
: @\exposid{c}@(), @\exposid{compare}@(comp) { }
@@ -16562,6 +16674,28 @@
key_compare @\exposid{compare}@; // \expos
};
+ template>
+ flat_set(KeyContainer, Compare = Compare())
+ -> flat_set;
+ template
+ flat_set(KeyContainer, Allocator)
+ -> flat_set, KeyContainer>;
+ template
+ flat_set(KeyContainer, Compare, Allocator)
+ -> flat_set;
+
+ template>
+ flat_set(sorted_unique_t, KeyContainer, Compare = Compare())
+ -> flat_set;
+ template
+ flat_set(sorted_unique_t, KeyContainer, Allocator)
+ -> flat_set, KeyContainer>;
+ template
+ flat_set(sorted_unique_t, KeyContainer, Compare, Allocator)
+ -> flat_set;
+
template>>
flat_set(InputIterator, InputIterator, Compare = Compare())
-> flat_set<@\placeholder{iter-value-type}@, Compare>;
@@ -16571,13 +16705,17 @@
-> flat_set<@\placeholder{iter-value-type}@, Compare>;
template>,
- class Allocator = allocator>>
+ class Allocator = allocator>>
flat_set(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
- -> flat_set, Compare>;
+ -> flat_set, Compare,
+ vector,
+ @\exposid{alloc-rebind}@>>>;
- template
- flat_set(from_range_t, R&&, Allocator)
- -> flat_set, less>>;
+ template
+ flat_set(from_range_t, R&&, Allocator)
+ -> flat_set, less>,
+ vector,
+ @\exposid{alloc-rebind}@>>>;
template>
flat_set(initializer_list, Compare = Compare())
@@ -16597,14 +16735,14 @@
\indexlibraryctor{flat_set}%
\begin{itemdecl}
-explicit flat_set(container_type cont);
+explicit flat_set(container_type cont, const key_compare& comp = key_compare());
\end{itemdecl}
\begin{itemdescr}
\pnum
\effects
-Initializes \exposid{c} with \tcode{std::move(cont)},
-value-initializes \exposid{compare},
+Initializes \exposid{c} with \tcode{std::move(cont)} and
+\exposid{compare} with \tcode{comp},
sorts the range \range{begin()}{end()} with respect to \exposid{compare}, and
finally erases all but the first element
from each group of consecutive equivalent elements.
@@ -16619,6 +16757,8 @@
\begin{itemdecl}
template
flat_set(const container_type& cont, const Allocator& a);
+template
+ flat_set(const container_type& cont, const key_compare& comp, const Allocator& a);
\end{itemdecl}
\begin{itemdescr}
@@ -16628,19 +16768,23 @@
\pnum
\effects
-Equivalent to \tcode{flat_set(cont)},
+Equivalent to
+\tcode{flat_set(cont)} and \tcode{flat_set(cont, comp)}, respectively,
except that \exposid{c} is constructed with
uses-allocator construction\iref{allocator.uses.construction}.
\pnum
\complexity
-Same as \tcode{flat_set(cont)}.
+Same as \tcode{flat_set(cont)} and \tcode{flat_set(cont, comp)}, respectively.
\end{itemdescr}
\indexlibraryctor{flat_set}%
\begin{itemdecl}
template
flat_set(sorted_unique_t s, const container_type& cont, const Allocator& a);
+template
+ flat_set(sorted_unique_t s, const container_type& cont,
+ const key_compare& comp, const Allocator& a);
\end{itemdecl}
\begin{itemdescr}
@@ -16650,7 +16794,8 @@
\pnum
\effects
-Equivalent to \tcode{flat_set(s, cont)},
+Equivalent to
+\tcode{flat_set(s, cont)} and \tcode{flat_set(s, cont, comp)}, respectively,
except that \exposid{c} is constructed with
uses-allocator construction\iref{allocator.uses.construction}.
@@ -16871,15 +17016,31 @@
\end{itemdecl}
\begin{itemdescr}
+\pnum
+\expects
+\tcode{Key} meets the \oldconcept{MoveAssignable} requirements.
+
\pnum
\effects
-Equivalent to:
-\begin{codeblock}
-auto [erase_first, erase_last] = ranges::remove_if(c, pred);
-auto n = erase_last - erase_first;
-c.erase(erase_first, erase_last);
-return n;
-\end{codeblock}
+Let $E$ be \tcode{bool(pred(as_const(e)))}.
+Erases all elements \tcode{e} in \tcode{c} for which $E$ holds.
+
+\pnum
+\returns
+The number of elements erased.
+
+\pnum
+\complexity
+Exactly \tcode{c.size()} applications of the predicate.
+
+\pnum
+\remarks
+Stable\iref{algorithm.stable}.
+If an invocation of \tcode{erase_if} exits via an exception,
+\tcode{c} is in a valid but unspecified state\iref{defns.valid}.
+\begin{note}
+\tcode{c} still meets its invariants, but can be empty.
+\end{note}
\end{itemdescr}
\rSec2[flat.multiset]{Class template \tcode{flat_multiset}}
@@ -16990,14 +17151,20 @@
// \ref{flat.multiset.cons}, constructors
flat_multiset() : flat_multiset(key_compare()) { }
- explicit flat_multiset(container_type cont);
+ explicit flat_multiset(container_type cont, const key_compare& comp = key_compare());
template
flat_multiset(const container_type& cont, const Allocator& a);
+ template
+ flat_multiset(const container_type& cont, const key_compare& comp, const Allocator& a);
- flat_multiset(sorted_equivalent_t, container_type cont)
- : @\exposid{c}@(std::move(cont)), @\exposid{compare}@(key_compare()) { }
+ flat_multiset(sorted_equivalent_t, container_type cont,
+ 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);
+ template
+ flat_multiset(sorted_equivalent_t, const container_type& cont,
+ const key_compare& comp, const Allocator& a);
explicit flat_multiset(const key_compare& comp)
: @\exposid{c}@(), @\exposid{compare}@(comp) { }
@@ -17164,6 +17331,28 @@
key_compare @\exposid{compare}@; // \expos
};
+ template>
+ flat_multiset(KeyContainer, Compare = Compare())
+ -> flat_multiset;
+ template
+ flat_multiset(KeyContainer, Allocator)
+ -> flat_multiset, KeyContainer>;
+ template
+ flat_multiset(KeyContainer, Compare, Allocator)
+ -> flat_multiset;
+
+ template>
+ flat_multiset(sorted_equivalent_t, KeyContainer, Compare = Compare())
+ -> flat_multiset;
+ template
+ flat_multiset(sorted_equivalent_t, KeyContainer, Allocator)
+ -> flat_multiset, KeyContainer>;
+ template
+ flat_multiset(sorted_equivalent_t, KeyContainer, Compare, Allocator)
+ -> flat_multiset;
+
template>>
flat_multiset(InputIterator, InputIterator, Compare = Compare())
-> flat_multiset<@\placeholder{iter-value-type}@, @\placeholder{iter-value-type}@, Compare>;
@@ -17175,11 +17364,15 @@
template>,
class Allocator = allocator>>
flat_multiset(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
- -> flat_multiset, Compare>;
+ -> flat_multiset, Compare,
+ vector,
+ @\exposid{alloc-rebind}@>>>;
- template
- flat_multiset(from_range_t, R&&, Allocator)
- -> flat_multiset, less>>;
+ template
+ flat_multiset(from_range_t, R&&, Allocator)
+ -> flat_multiset, less>,
+ vector,
+ @\exposid{alloc-rebind}@>>>;
template>
flat_multiset(initializer_list, Compare = Compare())
@@ -17199,14 +17392,14 @@
\indexlibraryctor{flat_multiset}%
\begin{itemdecl}
-explicit flat_multiset(container_type cont);
+explicit flat_multiset(container_type cont, const key_compare& comp = key_compare());
\end{itemdecl}
\begin{itemdescr}
\pnum
\effects
-Initializes \exposid{c} with \tcode{std::move(cont)},
-value-initializes \exposid{compare}, and
+Initializes \exposid{c} with \tcode{std::move(cont)} and
+\exposid{compare} with \tcode{comp}, and
sorts the range \range{begin()}{end()} with respect to \exposid{compare}.
\pnum
@@ -17219,6 +17412,8 @@
\begin{itemdecl}
template
flat_multiset(const container_type& cont, const Allocator& a);
+template
+ flat_multiset(const container_type& cont, const key_compare& comp, const Allocator& a);
\end{itemdecl}
\begin{itemdescr}
@@ -17228,19 +17423,24 @@
\pnum
\effects
-Equivalent to \tcode{flat_multiset(cont)},
+Equivalent to \tcode{flat_multiset(cont)} and
+\tcode{flat_multiset(cont, comp)}, respectively,
except that \exposid{c} is constructed with
uses-allocator construction\iref{allocator.uses.construction}.
\pnum
\complexity
-Same as \tcode{flat_multiset(cont)}.
+Same as \tcode{flat_multiset(cont)} and
+\tcode{flat_multiset(cont, comp)}, respectively.
\end{itemdescr}
\indexlibraryctor{flat_multiset}%
\begin{itemdecl}
template
flat_multiset(sorted_equivalent_t s, const container_type& cont, const Allocator& a);
+template
+ flat_multiset(sorted_equivalent_t s, const container_type& cont,
+ const key_compare& comp, const Allocator& a);
\end{itemdecl}
\begin{itemdescr}
@@ -17250,7 +17450,8 @@
\pnum
\effects
-Equivalent to \tcode{flat_multiset(s, cont)},
+Equivalent to \tcode{flat_multiset(s, cont)} and
+\tcode{flat_multiset(s, cont, comp)}, respectively,
except that \exposid{c} is constructed with
uses-allocator construction\iref{allocator.uses.construction}.
@@ -17427,15 +17628,31 @@
\end{itemdecl}
\begin{itemdescr}
+\pnum
+\expects
+\tcode{Key} meets the \oldconcept{MoveAssignable} requirements.
+
\pnum
\effects
-Equivalent to:
-\begin{codeblock}
-auto [erase_first, erase_last] = ranges::remove_if(c, pred);
-auto n = erase_last - erase_first;
-c.erase(erase_first, erase_last);
-return n;
-\end{codeblock}
+Let $E$ be \tcode{bool(pred(as_const(e)))}.
+Erases all elements \tcode{e} in \tcode{c} for which $E$ holds.
+
+\pnum
+\returns
+The number of elements erased.
+
+\pnum
+\complexity
+Exactly \tcode{c.size()} applications of the predicate.
+
+\pnum
+\remarks
+Stable\iref{algorithm.stable}.
+If an invocation of \tcode{erase_if} exits via an exception,
+\tcode{c} is in a valid but unspecified state\iref{defns.valid}.
+\begin{note}
+\tcode{c} still meets its invariants, but can be empty.
+\end{note}
\end{itemdescr}
\rSec2[container.adaptors.format]{Container adaptors formatting}
@@ -17454,9 +17671,12 @@
template Container, class... U>
struct formatter<@\placeholder{adaptor-type}@, charT> {
private:
- using @\exposid{maybe-const-adaptor}@ = // \expos
- @\exposid{fmt-maybe-const}@<@\placeholder{adaptor-type}@, charT>;
- formatter @\exposid{underlying_}@; // \expos
+ using @\exposid{maybe-const-container}@ = // \expos
+ @\exposid{fmt-maybe-const}@;
+ using @\exposid{maybe-const-adaptor}@ = // \expos
+ @\exposid{maybe-const}@, // see \ref{ranges.syn}
+ @\placeholder{adaptor-type}@>;
+ formatter, charT> @\exposid{underlying_}@; // \expos
public:
template
@@ -18162,7 +18382,7 @@
whose reference type is \tcode{reference}.
\pnum
-All requirements on container iterators\iref{container.requirements} apply to
+All requirements on container iterators\iref{container.reqmts} apply to
\tcode{span::iterator} as well.
\end{itemdescr}
@@ -19130,6 +19350,12 @@
\tcode{layout_left::mapping} is a trivially copyable type
that models \libconcept{regular} for each \tcode{E}.
+\pnum
+\mandates
+If \tcode{Extents::rank_dynamic() == 0} is \tcode{true},
+then the size of the multidimensional index space \tcode{Extents()}
+is representable as a value of type \tcode{typename Extents::index_type}.
+
\rSec5[mdspan.layout.left.cons]{Constructors}
\indexlibraryctor{layout_left::mapping}%
@@ -19382,6 +19608,12 @@
\tcode{layout_right::mapping} is a trivially copyable type
that models \libconcept{regular} for each \tcode{E}.
+\pnum
+\mandates
+If \tcode{Extents::rank_dynamic() == 0} is \tcode{true},
+then the size of the multidimensional index space \tcode{Extents()}
+is representable as a value of type \tcode{typename Extents::index_type}.
+
\rSec5[mdspan.layout.right.cons]{Constructors}
\indexlibraryctor{layout_right::mapping}%
@@ -19587,7 +19819,7 @@
public:
// \ref{mdspan.layout.stride.cons}, constructors
- constexpr mapping() noexcept = default;
+ constexpr mapping() noexcept;
constexpr mapping(const mapping&) noexcept = default;
template
constexpr mapping(const extents_type&, span) noexcept;
@@ -19636,6 +19868,12 @@
\tcode{layout_stride::mapping} is a trivially copyable type
that models \libconcept{regular} for each \tcode{E}.
+\pnum
+\mandates
+If \tcode{Extents::rank_dynamic() == 0} is \tcode{true},
+then the size of the multidimensional index space \tcode{Extents()}
+is representable as a value of type \tcode{typename Extents::index_type}.
+
\rSec5[mdspan.layout.stride.expo]{Exposition-only helpers}
\pnum
@@ -19699,6 +19937,25 @@
\rSec5[mdspan.layout.stride.cons]{Constructors}
+\indexlibraryctor{layout_stride::mapping}%
+\begin{itemdecl}
+constexpr mapping() noexcept;
+\end{itemdecl}
+
+\begin{itemdescr}
+\pnum
+\expects
+\tcode{layout_right::mapping().required_span_size()}
+is representable as a value of type \tcode{index_type}\iref{basic.fundamental}.
+
+\pnum
+\effects
+Direct-non-list-initializes \exposid{extents_} with \tcode{extents_type()}, and
+for all $d$ in the range \range{0}{\exposid{rank_}},
+direct-non-list-initializes \tcode{\exposid{strides_}[$d$]} with
+\tcode{layout_right::mapping().stride($d$)}.
+\end{itemdescr}
+
\indexlibraryctor{layout_stride::mapping}%
\begin{itemdecl}
template
diff --git a/source/declarations.tex b/source/declarations.tex
index a63c317a72..e2e6054442 100644
--- a/source/declarations.tex
+++ b/source/declarations.tex
@@ -205,7 +205,7 @@
\pnum
If the \grammarterm{decl-specifier-seq} contains the \keyword{typedef}
-specifier, the declaration is called a \defnx{typedef declaration}{declaration!typedef}
+specifier, the declaration is a \defnx{typedef declaration}{declaration!typedef}
and each \grammarterm{declarator-id}
is declared to be a \grammarterm{typedef-name}, synonymous with its
associated type\iref{dcl.typedef}.
@@ -213,11 +213,20 @@
Such a \grammarterm{declarator-id} is
an \grammarterm{identifier}\iref{class.conv.fct}.
\end{note}
-If the
-\grammarterm{decl-specifier-seq} contains no \keyword{typedef} specifier, the
-declaration is called a \defnx{function declaration}{declaration!function} if
-the type associated with a \grammarterm{declarator-id} is a function type\iref{dcl.fct} and
-an \defnx{object declaration}{declaration!object} otherwise.
+Otherwise, if the type associated with a \grammarterm{declarator-id}
+is a function type\iref{dcl.fct},
+the declaration is a \defnx{function declaration}{declaration!function}.
+Otherwise, if the type associated with a \grammarterm{declarator-id}
+is an object or reference type, the declaration is
+an \defnx{object declaration}{declaration!object}.
+Otherwise, the program is ill-formed.
+\begin{example}
+\begin{codeblock}
+int f(), x; // OK, function declaration for \tcode{f} and object declaration for \tcode{x}
+extern void g(), // OK, function declaration for \tcode{g}
+ y; // error: \tcode{void} is not an object type
+\end{codeblock}
+\end{example}
\pnum
\indextext{definition!declaration as}%
@@ -242,20 +251,38 @@
\end{note}
\pnum
-\indextext{\idxgram{static_assert}}%
+\indextext{\idxcode{static_assert}}%
In a \grammarterm{static_assert-declaration},
the \grammarterm{constant-expression}
is contextually converted to \keyword{bool} and
the converted expression shall be a constant expression\iref{expr.const}.
If the value of the expression when
-so converted is \tcode{true}, the declaration has no
-effect. Otherwise, the program is ill-formed, and the resulting
+so converted is \tcode{true}
+or the expression is evaluated in the context of a template definition,
+the declaration has no
+effect. Otherwise,
+the \grammarterm{static_assert-declaration} \defnx{fails}{\idxcode{static_assert}!failed},
+the program is ill-formed, and the resulting
diagnostic message\iref{intro.compliance} should include the text of
the \grammarterm{string-literal}, if one is supplied.
\begin{example}
\begin{codeblock}
static_assert(sizeof(int) == sizeof(void*), "wrong pointer size");
static_assert(sizeof(int[2])); // OK, narrowing allowed
+
+template
+void f(T t) {
+ if constexpr (sizeof(T) == sizeof(int)) {
+ use(t);
+ } else {
+ static_assert(false, "must be int-sized");
+ }
+}
+
+void g(char c) {
+ f(0); // OK
+ f(c); // error on implementations where \tcode{sizeof(int) > 1}: must be \tcode{int}-sized
+}
\end{codeblock}
\end{example}
@@ -787,16 +814,17 @@
\pnum
\indextext{specifier!\idxcode{constexpr}!function}%
\indextext{constexpr function}%
-The definition of a constexpr function shall satisfy the following
-requirements:
+A function is \defn{constexpr-suitable} if:
\begin{itemize}
\item
-it shall not be a coroutine\iref{dcl.fct.def.coroutine};
+it is not a coroutine\iref{dcl.fct.def.coroutine}, and
\item
if the function is a constructor or destructor,
-its class shall not have any virtual base classes.
+its class does not have any virtual base classes.
\end{itemize}
+Except for instantiated constexpr functions,
+non-templated constexpr functions shall be constexpr-suitable.
\begin{example}
\begin{codeblock}
@@ -830,16 +858,6 @@
\end{codeblock}
\end{example}
-\pnum
-If the instantiated template specialization of a constexpr function
-template
-or member function of a class template
-would fail to satisfy the requirements for a constexpr
-function,
-that specialization is still a constexpr function,
-even though a call to such a function cannot appear in a constant
-expression.
-
\pnum
An invocation of a constexpr function in a given context
produces the same result as
@@ -885,7 +903,9 @@
In any \keyword{constexpr} variable declaration,
the full-expression of the initialization
shall be a constant expression\iref{expr.const}.
-A \keyword{constexpr} variable shall have constant destruction.
+A \keyword{constexpr} variable that is an object,
+as well as any temporary to which a \keyword{constexpr} reference is bound,
+shall have constant destruction.
\begin{example}
\begin{codeblock}
struct pixel {
@@ -909,10 +929,12 @@
\pnum
If a variable declared with the \keyword{constinit} specifier has
-dynamic initialization\iref{basic.start.dynamic}, the program is ill-formed.
+dynamic initialization\iref{basic.start.dynamic}, the program is ill-formed,
+even if the implementation would perform that initialization as
+a static initialization\iref{basic.start.static}.
\begin{note}
The \keyword{constinit} specifier ensures that the variable
-is initialized during static initialization\iref{basic.start.static}.
+is initialized during static initialization.
\end{note}
\pnum
@@ -1747,8 +1769,8 @@
\end{example}
\pnum
-Return type deduction for a templated entity
-that is a function or function template with a placeholder in its
+Return type deduction for a templated
+function with a placeholder in its
declared type occurs when the definition is instantiated even if the function
body contains a \tcode{return} statement with a non-type-dependent operand.
\begin{note}
@@ -6252,7 +6274,7 @@
A function explicitly defaulted on its first declaration
is implicitly inline\iref{dcl.inline},
and is implicitly constexpr\iref{dcl.constexpr}
-if it satisfies the requirements for a constexpr function.
+if it is constexpr-suitable.
\pnum
\begin{example}
@@ -6300,7 +6322,7 @@
is implicitly defined at the point where it is explicitly defaulted; if such a function is implicitly
defined as deleted, the program is ill-formed.
A non-user-provided defaulted function
-(i.e. implicitly declared or explicitly defaulted in the class)
+(i.e., implicitly declared or explicitly defaulted in the class)
that is not defined as deleted is implicitly defined when it is odr-used\iref{basic.def.odr}
or needed for constant evaluation\iref{expr.const}.
\begin{note}
@@ -6968,6 +6990,8 @@
not omit the \grammarterm{enum-base}.
The identifiers in an \grammarterm{enumerator-list} are declared as
constants, and can appear wherever constants are required.
+The same identifier shall not appear as
+the name of multiple enumerators in an \grammarterm{enumerator-list}.
\indextext{enumerator!value of}%
An \grammarterm{enumerator-definition} with \tcode{=} gives the associated
\grammarterm{enumerator} the value indicated by the
@@ -8251,7 +8275,7 @@
in determining the language linkage of
class members,
friend functions with a trailing \grammarterm{requires-clause}, and the
-function type of class member functions.
+function type of non-static class member functions.
\begin{example}
\begin{codeblock}
extern "C" typedef void FUNC_c();
@@ -8505,6 +8529,17 @@
the rules specifying to which entity or statement the attribute can apply or
the syntax rules for the attribute's \grammarterm{attribute-argument-clause}, if any.
\end{note}
+\begin{note}
+The \grammarterm{attribute}{s} specified in \ref{dcl.attr}
+have optional semantics:
+given a well-formed program,
+removing all instances of any one of those \grammarterm{attribute}{s}
+results in a program whose set of possible executions\iref{intro.abstract}
+for a given input is
+a subset of those of the original program for the same input,
+absent implementation-defined guarantees
+with respect to that \grammarterm{attribute}.
+\end{note}
An \grammarterm{attribute-token} is reserved for future standardization if
\begin{itemize}
\item it is not an \grammarterm{attribute-scoped-token} and
diff --git a/source/diagnostics.tex b/source/diagnostics.tex
index f1648bcb2d..a7ec160262 100644
--- a/source/diagnostics.tex
+++ b/source/diagnostics.tex
@@ -538,7 +538,6 @@
\indexlibraryglobal{ENETUNREACH}%
\indexlibraryglobal{ENFILE}%
\indexlibraryglobal{ENOBUFS}%
-\indexlibraryglobal{ENODATA}%
\indexlibraryglobal{ENODEV}%
\indexlibraryglobal{ENOENT}%
\indexlibraryglobal{ENOEXEC}%
@@ -548,8 +547,6 @@
\indexlibraryglobal{ENOMSG}%
\indexlibraryglobal{ENOPROTOOPT}%
\indexlibraryglobal{ENOSPC}%
-\indexlibraryglobal{ENOSR}%
-\indexlibraryglobal{ENOSTR}%
\indexlibraryglobal{ENOSYS}%
\indexlibraryglobal{ENOTCONN}%
\indexlibraryglobal{ENOTDIR}%
@@ -571,7 +568,6 @@
\indexlibraryglobal{EROFS}%
\indexlibraryglobal{ESPIPE}%
\indexlibraryglobal{ESRCH}%
-\indexlibraryglobal{ETIME}%
\indexlibraryglobal{ETIMEDOUT}%
\indexlibraryglobal{ETXTBSY}%
\indexlibraryglobal{EWOULDBLOCK}%
@@ -619,7 +615,6 @@
#define ENETUNREACH @\seebelow@
#define ENFILE @\seebelow@
#define ENOBUFS @\seebelow@
-#define ENODATA @\seebelow@
#define ENODEV @\seebelow@
#define ENOENT @\seebelow@
#define ENOEXEC @\seebelow@
@@ -629,8 +624,6 @@
#define ENOMSG @\seebelow@
#define ENOPROTOOPT @\seebelow@
#define ENOSPC @\seebelow@
-#define ENOSR @\seebelow@
-#define ENOSTR @\seebelow@
#define ENOSYS @\seebelow@
#define ENOTCONN @\seebelow@
#define ENOTDIR @\seebelow@
@@ -652,7 +645,6 @@
#define EROFS @\seebelow@
#define ESPIPE @\seebelow@
#define ESRCH @\seebelow@
-#define ETIME @\seebelow@
#define ETIMEDOUT @\seebelow@
#define ETXTBSY @\seebelow@
#define EWOULDBLOCK @\seebelow@
@@ -750,18 +742,15 @@
no_child_process, // \tcode{ECHILD}
no_link, // \tcode{ENOLINK}
no_lock_available, // \tcode{ENOLCK}
- no_message_available, // \tcode{ENODATA}
no_message, // \tcode{ENOMSG}
no_protocol_option, // \tcode{ENOPROTOOPT}
no_space_on_device, // \tcode{ENOSPC}
- no_stream_resources, // \tcode{ENOSR}
no_such_device_or_address, // \tcode{ENXIO}
no_such_device, // \tcode{ENODEV}
no_such_file_or_directory, // \tcode{ENOENT}
no_such_process, // \tcode{ESRCH}
not_a_directory, // \tcode{ENOTDIR}
not_a_socket, // \tcode{ENOTSOCK}
- not_a_stream, // \tcode{ENOSTR}
not_connected, // \tcode{ENOTCONN}
not_enough_memory, // \tcode{ENOMEM}
not_supported, // \tcode{ENOTSUP}
@@ -779,7 +768,6 @@
resource_unavailable_try_again, // \tcode{EAGAIN}
result_out_of_range, // \tcode{ERANGE}
state_not_recoverable, // \tcode{ENOTRECOVERABLE}
- stream_timeout, // \tcode{ETIME}
text_file_busy, // \tcode{ETXTBSY}
timed_out, // \tcode{ETIMEDOUT}
too_many_files_open_in_system, // \tcode{ENFILE}
@@ -1756,6 +1744,10 @@
template
ostream& operator<<(ostream& os, const basic_stacktrace& st);
+ // \ref{stacktrace.format}, formatting support
+ template<> struct formatter;
+ template struct formatter>;
+
namespace pmr {
using stacktrace = basic_stacktrace>;
}
@@ -2408,6 +2400,48 @@
Equivalent to: \tcode{return os << to_string(st);}
\end{itemdescr}
+\rSec3[stacktrace.format]{Formatting support}
+
+\begin{itemdecl}
+template<> struct formatter;
+\end{itemdecl}
+
+\begin{itemdescr}
+\pnum
+\tcode{formatter} interprets \fmtgrammarterm{format-spec}
+as a \fmtgrammarterm{stacktrace-entry-format-spec}.
+The syntax of format specifications is as follows:
+
+\begin{ncbnf}
+\fmtnontermdef{stacktrace-entry-format-spec}\br
+ \opt{fill-and-align} \opt{width}
+\end{ncbnf}
+
+\begin{note}
+The productions \fmtgrammarterm{fill-and-align} and \fmtgrammarterm{width}
+are described in \ref{format.string.std}.
+\end{note}
+
+\pnum
+A \tcode{stacktrace_entry} object \tcode{se} is formatted as if by
+copying \tcode{to_string(se)} through the output iterator of the context
+with additional padding and adjustments as specified by the format specifiers.
+\end{itemdescr}
+
+\begin{itemdecl}
+template struct formatter>;
+\end{itemdecl}
+
+\begin{itemdescr}
+\pnum
+For \tcode{formatter>},
+\fmtgrammarterm{format-spec} is empty.
+
+\pnum
+A \tcode{basic_stacktrace} object \tcode{s} is formatted as if by
+copying \tcode{to_string(s)} through the output iterator of the context.
+\end{itemdescr}
+
\rSec3[stacktrace.basic.hash]{Hash support}
\begin{itemdecl}
diff --git a/source/expressions.tex b/source/expressions.tex
index 67edaeebf1..bd1c566664 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -321,7 +321,7 @@
that does not denote an object of type \cv{}~\keyword{U} within its lifetime,
the behavior is undefined.
\begin{note}
-In C, an entire object of structure type can be accessed, e.g. using assignment.
+In C, an entire object of structure type can be accessed, e.g., using assignment.
By contrast, \Cpp{} has no notion of accessing an object of class type
through an lvalue of class type.
\end{note}
@@ -1142,38 +1142,34 @@
\item
Otherwise, the expression is ill-formed.
\end{itemize}
-\item Otherwise, the integral promotions\iref{conv.prom} are
-performed on both operands.
+\item Otherwise, each operand is converted to a common type \tcode{C}.
+The integral promotion rules\iref{conv.prom} are used
+to determine a type \tcode{T1} and type \tcode{T2} for each operand.
\begin{footnote}
As a consequence, operands of type \keyword{bool}, \keyword{char8_t}, \keyword{char16_t},
\keyword{char32_t}, \keyword{wchar_t}, or of enumeration type are converted
to some integral type.
\end{footnote}
-Then the following rules are applied to the promoted operands:
+Then the following rules are applied to determine \tcode{C}:
\begin{itemize}
-\item If both operands have the same type, no further conversion is
-needed.
+\item If \tcode{T1} and \tcode{T2} are the same type, \tcode{C} is that type.
-\item Otherwise, if both operands have signed integer types or both have
-unsigned integer types, the operand with the type of lesser integer
-conversion rank is converted to the type of the operand with
-greater rank.
+\item Otherwise, if \tcode{T1} and \tcode{T2} are both signed integer types or
+are both unsigned integer types,
+\tcode{C} is the type with greater rank.
-\item Otherwise, if the operand that has unsigned integer type has rank
-greater than or equal to the rank of the type of the other operand, the
-operand with signed integer type is converted to the type of the
-operand with unsigned integer type.
-
-\item Otherwise, if the type of the operand with signed integer type can
-represent all of the values of the type of the operand with unsigned
-integer type, the operand with unsigned integer type is converted
-to the type of the operand with signed integer type.
-
-\item Otherwise, both operands are converted to the unsigned
-integer type corresponding to the type of the operand with signed
-integer type.
+\item Otherwise, let \tcode{U} be the unsigned integer type and
+\tcode{S} be the signed integer type.
+\begin{itemize}
+\item If \tcode{U} has rank greater than or equal to the rank of \tcode{S},
+\tcode{C} is \tcode{U}.
+\item Otherwise, if \tcode{S} can represent all of the values of \tcode{U},
+\tcode{C} is \tcode{S}.
+\item Otherwise,
+\tcode{C} is the unsigned integer type corresponding to \tcode{S}.
+\end{itemize}
\end{itemize}
\end{itemize}
@@ -1345,7 +1341,7 @@
\pnum
An \grammarterm{id-expression} that denotes a non-static data member or
-non-static member function of a class can only be used:
+implicit object member function of a class can only be used:
\begin{itemize}
\item as part of a class member access\iref{expr.ref} in which the
object expression
@@ -1965,7 +1961,7 @@
the corresponding \grammarterm{lambda-expression}{'s}
\grammarterm{parameter-declaration-clause}
is followed by \keyword{constexpr} or \keyword{consteval}, or
-it satisfies the requirements for a constexpr function\iref{dcl.constexpr}.
+it is constexpr-suitable\iref{dcl.constexpr}.
It is an immediate function\iref{dcl.constexpr}
if the corresponding \grammarterm{lambda-expression}{'s}
\grammarterm{parameter-declaration-clause} is followed by \keyword{consteval}.
@@ -2973,6 +2969,7 @@
The immediately-declared constraint\iref{temp.param}
of the \grammarterm{type-constraint} for \tcode{\keyword{decltype}((E))}
shall be satisfied.
+\end{itemize}
\begin{example}
Given concepts \tcode{C} and \tcode{D},
\begin{codeblock}
@@ -2991,8 +2988,6 @@
(including in the case where $n$ is zero).
\end{example}
\end{itemize}
-\end{itemize}
-
\pnum
\begin{example}
\begin{codeblock}
@@ -3055,18 +3050,6 @@
\end{codeblock}
\tcode{D} is satisfied if \tcode{sizeof(decltype (+t)) == 1}\iref{temp.constr.atomic}.
\end{example}
-
-\pnum
-A local parameter shall only appear as an unevaluated operand\iref{term.unevaluated.operand}
-within the \grammarterm{constraint-expression}.
-\begin{example}
-\begin{codeblock}
-template concept C = requires (T a) {
- requires sizeof(a) == 4; // OK
- requires a == 0; // error: evaluation of a constraint variable
-};
-\end{codeblock}
-\end{example}
\indextext{expression!requires|)}
\indextext{expression!primary|)}
@@ -3187,21 +3170,6 @@
conversion\iref{conv.func} is suppressed on the postfix expression),
or have function pointer type.
-\pnum
-For a call to a non-static member function,
-the postfix expression shall be an
-implicit\iref{class.mfct.non.static,class.static} or explicit
-class member access\iref{expr.ref} whose \grammarterm{id-expression} is a
-function member name, or a pointer-to-member
-expression\iref{expr.mptr.oper} selecting a function member; the call is as a member of
-the class object referred to by the
-object expression. In the case of an implicit class
-member access, the implied object is the one pointed to by \keyword{this}.
-\begin{note}
-A member function call of the form \tcode{f()} is interpreted as
-\tcode{(*\keyword{this}).f()} (see~\ref{class.mfct.non.static}).
-\end{note}
-
\pnum
If the selected
function is non-virtual, or if the \grammarterm{id-expression} in the class
@@ -6555,6 +6523,11 @@
\tcode{q<=p}, and \tcode{q=p}, and \tcode{q>p} all yield \keyword{false}.
Otherwise, the result of each of the operators is unspecified.
+\begin{note}
+A relational operator applied
+to unequal function pointers or to unequal pointers to \tcode{void}
+yields an unspecified result.
+\end{note}
\pnum
If both operands (after conversions) are of arithmetic or enumeration type, each
@@ -7262,7 +7235,7 @@
\pnum
\begin{note}
In contexts where the comma token is given special meaning
-(e.g. function calls\iref{expr.call},
+(e.g., function calls\iref{expr.call},
subscript expressions\iref{expr.sub},
lists of initializers\iref{dcl.init},
or \grammarterm{template-argument-list}{s}\iref{temp.names}),
@@ -7390,8 +7363,7 @@
\item
an invocation of an instantiated constexpr function
-that fails to satisfy the requirements
-for a constexpr function;
+that is not constexpr-suitable;
\item
an invocation of a virtual function\iref{class.virtual}
@@ -7628,6 +7600,15 @@
to storage allocated with \tcode{std::allocator} or
to an object whose lifetime began within the evaluation of $E$.
+\pnum
+For the purposes of determining whether $E$ is a core constant expression,
+the evaluation of a call to
+a trivial copy/move constructor or copy/move assignment operator of a union
+is considered to copy/move the active member of the union, if any.
+\begin{note}
+The copy/move of the active member is trivial.
+\end{note}
+
\pnum
During the evaluation of an expression $E$ as a core constant expression,
all \grammarterm{id-expression}s and uses of \tcode{*\keyword{this}}
@@ -7785,6 +7766,11 @@
if the value is an object of class type,
each non-static data member of reference type refers to
an entity that is a permitted result of a constant expression,
+
+ \item
+ if the value is an object of scalar type,
+ it does not have an indeterminate value\iref{basic.indet},
+
\item
if the value is of pointer type, it contains
the address of an object with static storage duration,
diff --git a/source/future.tex b/source/future.tex
index 65a3c4ac6c..f417b2b506 100644
--- a/source/future.tex
+++ b/source/future.tex
@@ -188,12 +188,21 @@
It is possible that future versions of \Cpp{} will specify
that these implicit definitions are deleted\iref{dcl.fct.def.delete}.
+\rSec1[depr.lit]{Literal operator function declarations using an identifier}
+
+\pnum
+A \grammarterm{literal-operator-id}\iref{over.literal} of the form
+\begin{codeblock}
+operator @\grammarterm{string-literal}@ @\grammarterm{identifier}@
+\end{codeblock}
+is deprecated.
+
\rSec1[depr.template.template]{\tcode{template} keyword before qualified names}
\pnum
The use of the keyword \keyword{template}
before the qualified name of a class or alias template
-without a template argument list is deprecated.
+without a template argument list is deprecated\iref{temp.names}.
\rSec1[depr.res.on.required]{Requires paragraph}
@@ -209,6 +218,67 @@
unless the function's \throws element
specifies throwing an exception when the precondition is violated.
+\rSec1[depr.numeric.limits.has.denorm]{\tcode{has_denorm} members in \tcode{numeric_limits}}
+
+\pnum
+The following type is defined
+in addition to those specified in \libheaderref{limits}:
+\indexlibraryglobal{float_denorm_style}%
+\begin{codeblock}
+namespace std {
+ enum float_denorm_style {
+ denorm_indeterminate = -1,
+ denorm_absent = 0,
+ denorm_present = 1
+ };
+}
+\end{codeblock}
+
+\pnum
+\indextext{denormalized value|see{number, subnormal}}%
+\indextext{value!denormalized|see{number, subnormal}}%
+\indextext{subnormal number|see{number, subnormal}}%
+\indextext{number!subnormal}%
+The following members are defined
+in addition to those specified in \ref{numeric.limits.general}:
+\begin{codeblock}
+static constexpr float_denorm_style has_denorm = denorm_absent;
+static constexpr bool has_denorm_loss = false;
+\end{codeblock}
+
+\pnum
+The values of \tcode{has_denorm} and \tcode{has_denorm_loss} of
+specializations of \tcode{numeric_limits} are unspecified.
+
+\pnum
+The following members of the specialization \tcode{numeric_limits} are defined
+in addition to those specified in \ref{numeric.special}:
+\indexlibrarymember{float_denorm_style}{numeric_limits}%
+\indexlibrarymember{has_denorm_loss}{numeric_limits}%
+\begin{codeblock}
+static constexpr float_denorm_style has_denorm = denorm_absent;
+static constexpr bool has_denorm_loss = false;
+\end{codeblock}
+
+\rSec1[depr.c.macros]{Deprecated C macros}
+
+\pnum
+The header \libheader{stdalign.h} has the following macro:
+\indexheader{stdalign.h}%
+\indexlibraryglobal{__alignas_is_defined}%
+\begin{codeblock}
+#define @\xname{alignas_is_defined}@ 1
+\end{codeblock}
+
+\pnum
+The header \libheader{stdbool.h} has the following macro:
+\indexheader{stdbool.h}%
+\indexhdr{stdbool.h}%
+\indexlibraryglobal{__bool_true_false_are_defined}%
+\begin{codeblock}
+#define @\xname{bool_true_false_are_defined}@ 1
+\end{codeblock}
+
\rSec1[depr.relops]{Relational operators}%
\indexlibraryglobal{rel_ops}%
@@ -1313,6 +1383,42 @@
\tcode{rdbuf()->pcount()}.
\end{itemdescr}
+\rSec1[depr.cerrno]{Deprecated error numbers}
+
+\pnum
+The following macros are defined in addition to those
+specified in \ref{cerrno.syn}:
+
+\indexlibraryglobal{ENODATA}%
+\indexlibraryglobal{ENOSR}%
+\indexlibraryglobal{ENOSTR}%
+\indexlibraryglobal{ETIME}%
+\begin{codeblock}
+#define ENODATA @\seebelow@
+#define ENOSR @\seebelow@
+#define ENOSTR @\seebelow@
+#define ETIME @\seebelow@
+\end{codeblock}
+
+\pnum
+The meaning of these macros is defined by the POSIX standard.
+
+\pnum
+The following \tcode{enum errc} enumerators are defined
+in addition to those specified in \ref{system.error.syn}:
+
+\begin{codeblock}
+no_message_available, // \tcode{ENODATA}
+no_stream_resources, // \tcode{ENOSR}
+not_a_stream, // \tcode{ENOSTR}
+stream_timeout, // \tcode{ETIME}
+\end{codeblock}
+
+\pnum
+The value of each \tcode{enum errc} enumerator above
+is the same as the value of the \libheader{cerrno} macro
+shown in the above synopsis.
+
\rSec1[depr.default.allocator]{The default allocator}
\pnum
@@ -1364,7 +1470,6 @@
The header \libheaderrefx{type_traits}{meta.type.synop}
has the following addition:
-\indexlibraryglobal{is_literal_type}%
\begin{codeblock}
namespace std {
template struct is_pod;
@@ -2036,6 +2141,10 @@
If \tcode{(Mode \& little_endian)}, the facet shall generate a
multibyte sequence in little-endian order,
as opposed to the default big-endian order.
+\item
+ UCS-2 is the same encoding as UTF-16,
+ except that it encodes scalar values in the range
+ \ucode{0000}--\ucode{ffff} (Basic Multilingual Plane) only.
\end{itemize}
\pnum
@@ -2046,8 +2155,7 @@
\begin{itemize}
\item
The facet shall convert between UTF-8 multibyte sequences
- and UCS-2 or UTF-32 (depending on the size of \tcode{Elem})
- within the program.
+ and UCS-2 or UTF-32 (depending on the size of \tcode{Elem}).
\item
Endianness shall not affect how multibyte sequences are read or written.
\item
@@ -2062,8 +2170,7 @@
\begin{itemize}
\item
The facet shall convert between UTF-16 multibyte sequences
- and UCS-2 or UTF-32 (depending on the size of \tcode{Elem})
- within the program.
+ and UCS-2 or UTF-32 (depending on the size of \tcode{Elem}).
\item
Multibyte sequences shall be read or written
according to the \tcode{Mode} flag, as set out above.
@@ -2086,13 +2193,6 @@
The multibyte sequences may be written as either a text or a binary file.
\end{itemize}
-\pnum
-The encoding forms UTF-8, UTF-16, and UTF-32 are specified in ISO/IEC 10646.
-The encoding form UCS-2 is specified in ISO/IEC 10646:2003.
-\begin{footnote}
-Cancelled and replaced by ISO/IEC 10646:2017.
-\end{footnote}
-
\rSec1[depr.conversions]{Deprecated convenience conversion interfaces}
\rSec2[depr.conversions.general]{General}
diff --git a/source/intro.tex b/source/intro.tex
index e14bda23af..c247ada66b 100644
--- a/source/intro.tex
+++ b/source/intro.tex
@@ -51,14 +51,6 @@
Operating System Interface (POSIX), Technical Corrigendum 1}
\item ISO/IEC/IEEE 9945:2009/Cor 2:2017, \doccite{Information Technology --- Portable
Operating System Interface (POSIX), Technical Corrigendum 2}
-\item ISO/IEC 10646, \doccite{Information technology ---
-Universal Coded Character Set (UCS)}
-\item ISO/IEC 10646:2003,
-\begin{footnote}
-Cancelled and replaced by ISO/IEC 10646:2017.
-\end{footnote}
-\doccite{Information technology ---
-Universal Multiple-Octet Coded Character Set (UCS)}
\item ISO/IEC/IEEE 60559:2020, \doccite{Information technology ---
Microprocessor Systems --- Floating-Point arithmetic}
\item ISO 80000-2:2009, \doccite{Quantities and units ---
@@ -75,14 +67,8 @@
Language Specification},
Standard Ecma-262, third edition, 1999.
\item
-The Unicode Consortium.
-Unicode Standard Annex, \UAX{44}, \doccite{Unicode Character Database}.
-Edited by Ken Whistler and Lauren\c{t}iu Iancu.
-Available from: \url{http://www.unicode.org/reports/tr44/}
-\item
-The Unicode Consortium.
-The Unicode Standard, \doccite{Derived Core Properties}.
-Available from: \url{https://www.unicode.org/Public/UCD/latest/ucd/DerivedCoreProperties.txt}
+The Unicode Consortium. \doccite{The Unicode Standard}.
+Available from: \url{https://www.unicode.org/versions/latest/}
\end{itemize}
\pnum
@@ -104,12 +90,6 @@
hereinafter called \defn{ECMA-262}.
\indextext{references!normative|)}
-\pnum
-\begin{note}
-References to ISO/IEC 10646:2003 are used only
-to support deprecated features\iref{depr.locale.stdcvt}.
-\end{note}
-
\rSec0[intro.defs]{Terms and definitions}
\pnum
@@ -600,7 +580,7 @@
parameter-type-list,
enclosing namespace,
return type,
-\grammarterm{template-head},
+signature of the \grammarterm{template-head},
and
trailing \grammarterm{requires-clause} (if any)
@@ -611,7 +591,7 @@
parameter-type-list,
return type,
enclosing class,
-\grammarterm{template-head},
+signature of the \grammarterm{template-head},
and
trailing \grammarterm{requires-clause} (if any)
@@ -640,7 +620,7 @@
\cv-qualifiers (if any),
\grammarterm{ref-qualifier} (if any),
return type (if any),
-\grammarterm{template-head},
+signature of the \grammarterm{template-head},
and
trailing \grammarterm{requires-clause} (if any)
@@ -649,6 +629,14 @@
\defncontext{class member function template specialization} signature of the member function template
of which it is a specialization and its template arguments (whether explicitly specified or deduced)
+\indexdefn{signature}%
+\definition{signature}{defns.signature.template.head}
+\defncontext{\grammarterm{template-head}}
+template parameter list,
+excluding template parameter names and default arguments,
+and
+\grammarterm{requires-clause} (if any)
+
\definition{stable algorithm}{defns.stable}
\defncontext{library}
\indexdefn{algorithm!stable}%
@@ -792,16 +780,16 @@
\end{footnote}
that program.
\item
+\indextext{behavior!undefined}%
+If a program contains a violation of a rule for which no diagnostic is required,
+this document places no requirement on implementations
+with respect to that program.
+\item
\indextext{message!diagnostic}%
-If a program contains a violation of any diagnosable rule or an occurrence
+Otherwise, if a program contains a violation of any diagnosable rule or an occurrence
of a construct described in this document as ``conditionally-supported'' when
the implementation does not support that construct, a conforming implementation
shall issue at least one diagnostic message.
-\item
-\indextext{behavior!undefined}%
-If a program contains a violation of a rule for which no diagnostic
-is required, this document places no requirement on
-implementations with respect to that program.
\end{itemize}
\begin{note}
During template argument deduction and substitution,
@@ -809,6 +797,20 @@
are treated differently;
see~\ref{temp.deduct}.
\end{note}
+Furthermore, a conforming implementation
+\begin{itemize}
+\item
+shall not accept a preprocessing translation unit containing
+a \tcode{\#error} preprocessing directive\iref{cpp.error},
+\item
+shall issue at least one diagnostic message for
+each \tcode{\#warning} or \tcode{\#error} preprocessing directive
+not following a \tcode{\#error} preprocessing directive in
+a preprocessing translation unit, and
+\item
+shall not accept a translation unit with
+a \grammarterm{static_assert-declaration} that fails\iref{dcl.pre}.
+\end{itemize}
\pnum
\indextext{conformance requirements!library|(}%
diff --git a/source/iostreams.tex b/source/iostreams.tex
index c6851793ab..16a6d97b9a 100644
--- a/source/iostreams.tex
+++ b/source/iostreams.tex
@@ -27,7 +27,7 @@
\ref{iostreams.base} & Iostreams base classes & \tcode{} \\ \rowsep
\ref{stream.buffers} & Stream buffers & \tcode{} \\ \rowsep
\ref{iostream.format} & Formatting and manipulators &
- \tcode{}, \tcode{}, \tcode{