diff --git a/.gitorder b/.gitorder
index abebabaa77..edc39fbf98 100644
--- a/.gitorder
+++ b/.gitorder
@@ -5,6 +5,7 @@ source/macros.tex
source/tables.tex
source/cover-*.tex
source/front.tex
+source/preface.tex
source/intro.tex
source/lex.tex
source/basic.tex
@@ -21,22 +22,24 @@ source/lib-intro.tex
source/support.tex
source/concepts.tex
source/diagnostics.tex
+source/memory.tex
+source/meta.tex
source/utilities.tex
-source/strings.tex
source/containers.tex
source/iterators.tex
source/ranges.tex
source/algorithms.tex
+source/strings.tex
+source/text.tex
source/numerics.tex
source/time.tex
-source/locales.tex
source/iostreams.tex
-source/regex.tex
-source/atomics.tex
source/threads.tex
+source/exec.tex
source/grammar.tex
source/limits.tex
source/compatibility.tex
source/future.tex
+source/uax31.tex
source/back.tex
source/xrefdelta.tex
diff --git a/papers/n5002.html b/papers/n5002.html
new file mode 100644
index 0000000000..0c4835ed67
--- /dev/null
+++ b/papers/n5002.html
@@ -0,0 +1,839 @@
+
+
+
+
+
+Codestin Search App
+
+
+N5002 Editors’ Report:
Programming Languages — C++
+
+Date: 2024-12-17
+
+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.
+Special thanks to Andreas Krug for many timely editorial fixes.
+
+New papers
+
+
+- N5001 is the
+current working draft for C++26. It replaces
+N4993.
+- N5002 is this Editors' Report.
+
+
+Motions incorporated into working draft
+
+Notes on motions
+
+CWG Poll 9 was retracted.
+
+Two LWG Polls, Poll 5 (P0472R2) and Poll 17 (P3019R11) have not been applied and
+are being sent back to WG21 for clarification. We expect to see revisions to be
+approved at the next meeting:
+
+
+LWG Poll 5 accidentally polled for the obsolete revision P0472R2 instead of the
+intended P0472R3. It is sent back due to unclear intentions, with a request for
+WG21 to clarify, and the expectation that R3 will be approved.
+LWG Poll 17 caused technical discussion after the meeting, in which some
+oversights were observed. The paper authors and the LWG chair agreed that
+further LWG review would be in everybody's best interest. The poll is sent back
+due to unclear specification, with a request for WG21 to produce a revision,
+which we expect to be approved at the next meeting.
+
+
+In CWG Poll 1, issue CWG1965 contains no wording changes since it is subsumed by CWG2879.
+
+Core working group polls
+
+CWG Poll 1. Accept as Defect Reports and apply the proposed resolutions of all issues in
+P3524R0
+(Core Language Working Group "ready" Issues for the November, 2024 meeting) to the C++ Working Paper.
+
+CWG Poll 2. Apply the changes in
+P3340R0
+(A Consistent Grammar for Sequences) to the C++ Working Paper.
+
+CWG Poll 3. Apply the changes in
+P2686R5
+(constexpr structured bindings and references to constexpr variables) to the C++ Working Paper.
+
+CWG Poll 4. Apply the changes in
+P3068R6
+(Allowing exception throwing in constant-evaluation) to the C++ Working Paper.
+
+CWG Poll 5. Apply the changes in
+P3247R2
+(Deprecate the notion of trivial types) to the C++ Working Paper.
+
+CWG Poll 6. Apply the changes in
+P2865R6
+(Remove Deprecated Array Comparisons from C++26) to the C++ Working Paper.
+
+CWG Poll 7. Apply the changes in
+P1061R10
+(Structured Bindings can introduce a Pack) to the C++ Working Paper.
+
+CWG Poll 8. Apply the changes in
+P3176R1
+(The Oxford variadic comma) to the C++ Working Paper.
+
+CWG Poll 9 was retracted.
+
+Library working group polls
+
+LWG Poll 1. Apply the changes for all Ready and Tentatively Ready issues in
+P3504R0
+(C++ Standard Library Ready Issues to be moved in Wrocław, Nov. 2024) to the C++ working paper.
+
+LWG Poll 2. Apply the changes in
+P3136R1
+(Retiring niebloids) to the C++ working paper.
+
+LWG Poll 3. Apply the changes in
+P3138R5
+(views::cache_latest
) to the C++ working paper.
+
+LWG Poll 4. Apply the changes in
+P3379R0
+(Constrain std::expected
equality operators) to the C++ working paper.
+
+LWG Poll 5 was sent back (see above).
+
+LWG Poll 6. Apply the changes in
+P2862R1
+(text_encoding::name()
should never return null values) to the C++ working paper.
+
+LWG Poll 7. Apply the changes in
+P2897R7
+(aligned_accessor
: An mdspan
accessor expressing pointer over-alignment) to the C++ working paper.
+
+LWG Poll 8. Apply the changes in
+P3355R1
+(Fix submdspan
for C++26) to the C++ working paper.
+
+LWG Poll 9. Apply the changes in
+P3222R0
+(Fix C++26 by adding transposed special cases for P2642 layouts) to the C++ working paper.
+
+LWG Poll 10. Apply the changes in
+P3050R2
+(Fix C++26 by optimizing linalg::conjugated
for noncomplex value types) to the C++ working paper.
+
+LWG Poll 11. Apply the changes in
+P3396R1
+(std::execution
wording fixes) to the C++ working paper.
+
+LWG Poll 12. Apply the changes in
+P2835R7
+(Expose std::atomic_ref
's object address) to the C++ working paper.
+
+LWG Poll 13. Apply the changes in
+P3323R1
+(cv-qualified types in atomic
and atomic_ref
) to the C++ working paper.
+
+LWG Poll 14. Apply the changes in
+P3508R0
+(Wording for "constexpr for specialized memory algorithms") and
+P3369R0
+(constexpr
for uninitialized_default_construct
) to the C++ working paper.
+
+LWG Poll 15. Apply the changes in
+P3370R1
+(Add new library headers from C23) to the C++ working paper.
+
+LWG Poll 16. Apply the changes in
+P3309R3
+(constexpr atomic
and atomic_ref
) to the C++ working paper.
+
+LWG Poll 17 was sent back (see above).
+
+LWG Poll 18. Apply the changes in
+P1928R15
+(std::simd
— merge data-parallel types from the Parallelism TS 2) to the C++ working paper.
+
+LWG Poll 19. Apply the changes in
+P3325R5
+(A Utility for Creating Execution Environments) to the C++ working paper.
+
+Editorial changes
+
+Major editorial changes
+
+There have not been any major editorial changes.
+
+Minor editorial changes
+
+A log of editorial fixes made to the working draft since N4993 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 e9604bcd3d8325860a4db9d02c4f90d0ae70162e
+Author: Thomas Köppe <tkoeppe@google.com>
+Date: Wed Oct 16 21:12:40 2024 +0100
+
+ [depr.format.syn] Fix header reference
+
+commit 0b296da823e7af4a987a0a870ae299420b9ae502
+Author: Thomas Köppe <tkoeppe@google.com>
+Date: Thu Oct 17 00:39:04 2024 +0100
+
+ [{localization,re}.general] Change "This Clause" to "Subclause".
+
+ These subclauses are no longer top-level clauses.
+
+commit 629e10e2f4177dd24d513be71f2203de325a7e8a
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Thu Oct 17 08:57:39 2024 +0200
+
+ [inplace.vector.overview] Add missing ',' in comment
+
+commit 726e07a3a99a87f5e89dd40a064f4a6bc84ed3ce
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Thu Oct 17 08:25:55 2024 +0200
+
+ [cpp.subst] Fix typo
+
+commit 88b2b8dcbd145782cfab61e6dad9296c9294593d
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Wed Oct 16 22:58:07 2024 +0200
+
+ [exec.domain.default] Add missing \pnum
+
+commit 8698ea48e40acc2e18630e799bbb23c41b9344e6
+Author: James Touton <bekenn@gmail.com>
+Date: Mon Sep 16 21:47:30 2024 -0700
+
+ [over.match.best.general] Minor formatting fixes
+
+commit 7ad39cbf374764a4e232f967e01541419230fedc
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Thu Oct 17 11:16:28 2024 -0400
+
+ [lex.comment] Move the subclause earlier, to where it better fits
+
+ Comments should fit betweem character sets (to define the basic source
+ character set) and preprocessor tokens, that must already understand
+ comments in order to treat them as whitespace.
+
+commit 7f7170cc9b96e9cc76bc0b765837978856936ab1
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Sat Oct 5 16:21:15 2024 -0400
+
+ [depr] Reorder clauses by origin of deprecation
+
+ Reorders the deprecated features annex to follow the order
+ of the main clauses that the deprecates feature refers to.
+ Where multiple clauses are references, use the one named by
+ the [depr.XXX] stable label.
+
+commit cd21b72788d9066f79f31fb6c4516481dfbb4925
+Author: Hewill Kang <hewillk@gmail.com>
+Date: Fri Oct 18 03:55:20 2024 +0800
+
+ [range.concat.iterator] Remove redundant \expos comments (#6942)
+
+commit 801fb2c0aaf6693a06a9a9e38871bae9536dc194
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Thu Oct 17 17:05:47 2024 -0400
+
+ [lex] Reorder subclauses to better follow phases of translation
+
+ This PR purely moves existing words around, and does not create any new content.
+
+ The proposed subclause ordering is now:
+
+ * 5 Lexical convensions
+ - 5.1 Separate translation
+ - 5.2 Phases of translation
+ - 5.3 Characters
+ - 5.3.1 Character sets
+ - 5.3.2 Universal character names
+ - 5.4 Comments
+ - 5.5 Preprocessing tokens
+ - 5.6 Header names
+ - 5.7 Preprocessing numbers
+ - 5.8 Operators and punctuators
+ - 5.9 Alternative tokens
+ - 5.10 Tokens
+ - 5.11 Identifiers
+ - 5.12 Keywords
+ - 5.13 Literals
+ - 5.13.1 Kinds of literals
+ - 5.13.2 ...
+
+commit 49113a4a577b8d6aed7e5321f0c1fe68d0bd6480
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Fri Oct 18 08:28:28 2024 +0200
+
+ [library.general] Adjust library overview for recent clause restructuring
+
+commit a470ff890be232b9e2a15e44c406ef72c7d816c2
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Sat Oct 19 11:31:59 2024 +0200
+
+ [lex.pptoken] Fix indefinitive article for consistency (#7324)
+
+commit 92594a81f021e76dce6acf7ea5d8176350a1e3fb
+Author: Eelis van der Weegen <eelis@eelis.net>
+Date: Wed Mar 13 21:04:43 2019 +0100
+
+ [temp.deduct.call] Include surrounding code in math formula
+
+commit 0451d08aefd5318254d7d204ad45700aa4d5a2e7
+Author: A. Jiang <de34@live.cn>
+Date: Mon Oct 21 19:45:10 2024 +0800
+
+ [specialized.algorithms.general] Restore the note for potentially-overlapping objects and undefined behavior (#7326)
+
+ The original note was incorrect and removed (see #6157). But it turns out
+ that _some_ note is still helpful. This PR tries to find the right way to
+ describe storage reusing and potential subsequent undefined behavior.
+
+commit f6b7ef3f1c6e483d97ad5a4f86b3efed38b74c99
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Sat Oct 19 11:41:35 2024 -0400
+
+ [lex.phases] Add crossreferences from phases 3 and 4
+
+ The phases of translation use forward references to the rest
+ of the standard well, but phases 3 and 4 almost entirely lack
+ such crossreferences, despite doing significant work in the
+ process of translating a file.
+
+commit a69507a54e67ae91424d9c621a9cb57ef3ba1512
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Mon Oct 21 17:48:09 2024 +0200
+
+ [locale.codecvt.virtuals] Fix garbled sentence
+
+commit e0576ed2411f36b0ba648afbf6953a0c72c9effb
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Mon Oct 21 13:09:51 2024 -0400
+
+ [compliance] Sort the freestanding headers after clause reorganization
+
+commit b0135f256e40d45faf1d1ac2aaa3abbda36a17c3
+Author: timsong-cpp <rs2740@gmail.com>
+Date: Tue Oct 22 02:14:47 2024 -0500
+
+ [exec.awaitables] Add missing word (#7340)
+
+commit eb9872aedc581e82e804c0fe8ca7d478ba066b17
+Author: Jan Schultke <me@eisenwave.net>
+Date: Tue Oct 22 12:09:22 2024 +0200
+
+ [func.wrap.func.con] Fix ill-formed postcondition (#7341)
+
+commit ced2c3866cb3d410c812fa3c359058d185aec329
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Wed Oct 23 13:47:18 2024 -0400
+
+ [allocator.requirements.general] Remove redundant template syntax (#5872)
+
+commit e70d9d6b901457cae9f4f596393f4bf7cee4591a
+Author: Eisenwave <me@eisenwave.net>
+Date: Mon Oct 21 20:29:10 2024 +0200
+
+ [intro.races] Clarify conflicts for the case where no bits are changed
+
+commit 6ba0dc9b2bf4c3cebc51154e4d543eafb41a8064
+Author: Eisenwave <me@eisenwave.net>
+Date: Sun Aug 20 00:52:57 2023 +0200
+
+ [intro.memory] remove stray definitions
+
+commit 9dc7b3f30d2971ccb3bb38483a7cdb62065a2c3c
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Tue Oct 22 17:12:25 2024 -0400
+
+ [basic.stc.inherit] Dissolve paragraph into [...general]
+
+ The whole subclause [basic.stc.inherit] is a single sentence that
+ belongs adjacent to the material in [basic.std.general] that
+ specifies how entities acquire a storage duration, wheras all the
+ remaining subclauses below [basic.stc] describe specific storage
+ durations. Folding that sentence directly into the general clause
+ is even clearer.
+
+commit d5174d561b61304118cdf1042c5697ec6083c181
+Author: Jan Schultke <me@eisenwave.net>
+Date: Thu Oct 24 09:03:57 2024 +0200
+
+ [basic.link] Add commas between coordinate subclauses (#7342)
+
+commit 8ab0745b6099fd56288763e57ca47dee099db7cb
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Fri Oct 25 10:53:22 2024 +0200
+
+ [bit.cast] change "behaviour" to "behavior" (#7353)
+
+commit 95d491ed6ca7817423855be4f90b61094a1b4312
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Sat Oct 26 15:52:55 2024 +0200
+
+ [associative.reqmts.general] Fix punctuation (#7354)
+
+commit 3eb8c47d8f2fe050e221b5d4c36189d965273b37
+Author: Jan Schultke <me@eisenwave.net>
+Date: Sat Oct 26 16:00:12 2024 +0200
+
+ [basic.compound] Add comma to run-on sentence (#7348)
+
+commit 84af20dcd1976a8982d4418756d1ec9728306580
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Sun Oct 27 13:27:34 2024 +0100
+
+ [mdspan.layout.left.cons] Remove duplicate "Effects:" (#7355)
+
+commit ac5b25027266917de3fbb220fc9ecfa4470672f9
+Author: Jan Schultke <me@eisenwave.net>
+Date: Sun Oct 27 22:46:10 2024 +0100
+
+ [expr.prim.lambda.capture, expr.const, ostream.formatted.print] Reword "automatic variable" (#7358)
+
+commit 324f56439e951773e6ce7437e703fb3aafd5a90c
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Mon Oct 28 07:42:45 2024 -0400
+
+ [lex.pptoken] Reorder paragraphs to define terms before they are used (#7346)
+
+ First move p1 below p2, so that we do not refer to preprocessing tokens before they are defined.
+ Then move p4 up, as it is splitting some unrelated examples, neither of which use its contents.
+
+commit bf43925ff0d9e80997918e98989892b4c7bf15f7
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Tue Oct 29 11:52:02 2024 +0100
+
+ [mdspan.layout.left.cons] Fix typo (#7360)
+
+commit a42d1246936f6376acf6188c1b2053886cdaf3c2
+Author: Jan Schultke <me@eisenwave.net>
+Date: Sat Nov 2 14:38:54 2024 +0100
+
+ [lib.types.movedfrom] Add cross-reference to [defns.valid] (#7365)
+
+commit 6bfbb59e48b6bde05a78d257cbb943acdb2b6781
+Author: S. B. Tam <cpplearner@outlook.com>
+Date: Fri Apr 7 17:09:40 2023 +0800
+
+ [format.string.std] Replace "Derived Extracted Property" with simply "property"
+
+commit aa53618e39f16a6fbf147a8ac2d95a33cb8c5cbc
+Author: S. B. Tam <cpplearner@outlook.com>
+Date: Fri Aug 9 17:39:07 2024 +0800
+
+ [lex.name] Strike "Derived Core Properties"
+
+commit cb15975d133869eb18a8b7878343a990e63415e2
+Author: Ilya Burylov <burylov@gmail.com>
+Date: Wed Nov 6 01:44:54 2024 -0800
+
+ [linalg.helpers.mandates] Fix typos (#7372)
+
+commit fcf95f0f1cb3ae11274f1c3477447aadb76b54ca
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Wed Nov 6 13:27:56 2024 +0100
+
+ [exec.opstate.general] Fix typo (#7370)
+
+commit efa0bec63a2718967f7033217a757d536eba3c18
+Author: Jonathan Wakely <cxx@kayari.org>
+Date: Wed Nov 6 12:55:52 2024 +0000
+
+ [linalg.reqs.val] Fix use of \defnadjx for value types (#7374)
+
+commit 693835ad625acfdf2d610240b99d6d8fecdb8a6a
+Author: Casey Carter <Casey@Carter.net>
+Date: Sat Nov 16 06:21:27 2024 -0800
+
+ [fs.op.remove] Clarify "Returns" element (#7387)
+
+ To avoid confusion as in microsoft/STL#5088.
+
+commit 1788b3fcd8f3dbe7b31e6bbfbb968ad43d7ecec3
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date: Sun Nov 17 20:05:57 2024 +0000
+
+ [over.ics.ref] Fix formatting of 'cv T' (#7389)
+
+commit 16df53c4ab9a17942f5bf994031c98105959a5d5
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date: Mon Nov 18 17:37:02 2024 +0000
+
+ [defns.regex.primary.equivalence.class] Hyphenate 'locale-specific' (#7395)
+
+commit 4f0facdcd57b922510212ddf44ef39f46dcbe44d
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date: Mon Nov 18 17:38:09 2024 +0000
+
+ [temp.param] Fix typos (#7394)
+
+commit 99deb7022614be47cfcce4f003d8eb57c02b6926
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date: Tue Nov 19 05:21:45 2024 +0000
+
+ [over.ics.ref] Capitalize 'Exact Match' (#7392)
+
+commit fb8036b6dfe5ce4a99cd85fddac3f115a7fd96af
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date: Tue Nov 19 05:25:41 2024 +0000
+
+ [class] Avoid hyphenation for 'multidimensional' (#7391)
+
+commit 3f41cf86547b77854abddde7dcaddf2ff00405bf
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date: Tue Nov 19 05:26:53 2024 +0000
+
+ [lex.phases] Move cross-reference to the first use of the referenced term (#7393)
+
+commit a05b963e9fe12a8589502b4fbc951c119ae1b3b2
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Tue Jul 30 16:51:21 2024 -0400
+
+ [basic.life] Move definition of before and after from bottom to top of subclause
+
+ The last paragraph of this subclause changes the definition of English words
+ used throughout the preceding paragraphs. While it might be preferable
+ to replace all such usage with the new definitions, that would be a Core issue,
+ see paragraph 6 for an example of awkward usage. Hence, we move the
+ redefinition to the start of the subclause so we know how to read this text
+ from the start.
+
+commit 2981bd94f25ea2199fd6b8af7aa76e03cf427697
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Sat Oct 19 08:31:08 2024 -0400
+
+ [basic.align] Move the Alignment subclause adjacent to "Object model"
+
+ Alignment puts additional restrictions on object placement.
+
+commit eac0893a9a90a5704deef6db3deecae026f04271
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Wed Oct 2 14:59:41 2024 -0400
+
+ [except.terminate] Better describe the function
+
+ While 'std:terminate' was originally conceived as the way to
+ report failures in the exception handling machinery, it has
+ evolved to become a more general tool for reporting unrecoverable
+ failures in the C++ runtime. This rewording attempts to address
+ that evolving design, and in doing so addresses the outstanding
+ %FIXME% that the current text is not adequately descriptive in
+ the first place.
+
+commit f4c4c7cdfb7fba0a6ffbf8e55f2ea6debdf13e87
+Author: xmh0511 <970252187@qq.com>
+Date: Wed Nov 20 08:17:02 2024 +0800
+
+ [dcl.link] Change "objects" to "entities"
+
+ "Entities" is more appropriate since it includes functions.
+
+commit 38461e17588aff3c6851de6ffc7f3e89418e0e65
+Author: A. Jiang <de34@live.cn>
+Date: Thu Nov 7 18:50:10 2024 +0800
+
+ [reverse.iter.cons] Removed redundant wording
+
+commit 8caa49a8266d7ef6b4ef3132588d154de07bbabd
+Author: Eisenwave <me@eisenwave.net>
+Date: Fri Mar 1 20:49:37 2024 +0100
+
+ [rand.req.seedseq] Remove 'compile-time' complexity for typedefs
+
+commit e2ddc7ab689bdaf91d2b2aa6424cef2510d3677a
+Author: Eisenwave <me@eisenwave.net>
+Date: Fri Mar 1 20:50:27 2024 +0100
+
+ [rand.req.dist] Remove 'compile-time' complexity for typedefs
+
+commit c9155b214a51d069cf4a575f10af2b4c4caca5d7
+Author: Eisenwave <me@eisenwave.net>
+Date: Fri Mar 1 20:52:39 2024 +0100
+
+ [char.traits.require] Remove 'compile-time' complexity for typedefs
+
+commit 2cd11c5503e78251c0c0fb4147e2d8ccb0947727
+Author: Vlad Serebrennikov <serebrennikov.vladislav@gmail.com>
+Date: Tue Oct 8 15:30:13 2024 +0400
+
+ [temp.pre] Fix note about uniqueness of a template name in a scope
+
+commit 2edf50afeec8cf200504718646b2b12492dac8ec
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Mon Oct 21 08:33:19 2024 -0400
+
+ [lex.header] Modernize text around header names
+
+ The footnote better belongs in the main text as a regular note.
+ To make the notes flow consistently, switch the order of the
+ note and normative text in the first paragraph to lead with the
+ normative text.
+
+commit 4a5d988a24f6c9737ca076e790b05e22ba169a7a
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Fri Nov 22 12:55:43 2024 +0100
+
+ [refwrap.invoke] Place period at end (#7402)
+
+commit aed97568c63ad5c3c200eff34799413f3ad842f4
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Sat Nov 23 07:53:16 2024 +0100
+
+ [lex.ccon, except.spec] Remove extraneous trailing linebreaks (#7403)
+
+commit 219b959258b6314a3c96bee86b8a18b0f4a7c37e
+Author: mrussoLuxoft <117848841+mrussoLuxoft@users.noreply.github.com>
+Date: Sat Nov 30 19:36:56 2024 +0100
+
+ [dcl.spec.auto.general] Clarify sentence structure by adding bullets (#7450)
+
+commit 861071a824419b955c4efb2d07980e78c9fc62c7
+Author: Daniel Krügler <daniel.kruegler@gmail.com>
+Date: Wed Dec 4 15:05:03 2024 +0100
+
+ [iterator.requirements.general] Revert `indirectly_writable` to "writable" definition (#7471)
+
+ This fixes a misapplication of the 2019 Belfast meeting LWG motion 9 (P1878R1), which erroneously replaced the "writable" definition by the `indirectly_writable` concept.
+
+commit c530fd8e0f80029e88b0977bebbf70252d38795e
+Author: Hewill Kang <hewillk@gmail.com>
+Date: Fri Dec 6 21:52:45 2024 +0800
+
+ [text.encoding.overview] Add cross-reference text_encoding::aliases_view (#7476)
+
+commit 10668dceb8186d7990ff4966a6808bb20ba3eed7
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date: Thu Dec 12 18:47:14 2024 +0000
+
+ [vector.overview,vector.bool.pspc] Move`at() const` to after `at()` (#7484)
+
+ This is consistent with the ordering for operator[].
+
+commit 0b1256638ebf4f1c611c3ca6182bad69be4837ce
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Mon Dec 16 19:53:51 2024 +0100
+
+ [unique.ptr.single.general] Fix typo
+
+commit 76465d7e42f56f763901e3f6a79ae6d77162a510
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Mon Dec 16 12:17:46 2024 +0100
+
+ [expr.type] Fix typo
+
+commit c7fbd5974f4b5e8881d1dc3e8fdf0b59ecba3bab
+Author: S. B. Tam <cpplearner@outlook.com>
+Date: Sun Dec 8 07:34:44 2024 +0800
+
+ [locale.ctype.virtuals] Fix a decade-old typo
+
+commit f9c835be8299556ae5943dbb340b4929a6100b15
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Fri Dec 6 16:51:49 2024 +0100
+
+ [except.spec] Remove misleading restriction in list of examples
+
+commit e99e78d67b631fbb328770fbcd4882e683360cb1
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date: Fri Dec 6 10:57:01 2024 +0100
+
+ [basic.pre,basic.lookup.general] Cleanup definition of term 'name lookup'
+
+commit 57ba5a5f4095ec3df6292cfdc371f554e8b684ef
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Tue Dec 17 12:25:26 2024 -0500
+
+ [lex.phases] Reorder the first two sentences of phase 7 (#7432)
+
+ Currently, the first sentence refers to "tokens" that do not exist until after the second sentence.
+
+commit 55a58f9206e41a831c664747dbacebd25c01b034
+Author: Jan Schultke <me@eisenwave.net>
+Date: Tue Dec 17 19:34:54 2024 +0100
+
+ [class.conv.ctor] Turn last paragraph into a note (#6505)
+
+commit 3443cd8af21845e5a4fda6246c4c1bbc74cd007b
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Tue Dec 17 19:18:25 2024 +0100
+
+ [exec.envs] Fix typo
+
+commit 14199aed5adb4baaef28245b4de88e7ffe73a365
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Tue Dec 17 20:02:55 2024 +0100
+
+ [atomics.ref.int, atomics.ref.float] Minor \tcode fixes (#7499)
+
+commit daae8f9a9b959c099e99f248324af95bbaf11779
+Author: A. Jiang <de34@live.cn>
+Date: Wed Dec 18 03:09:10 2024 +0800
+
+ [flat.{map,multimap,set,multiset}] Exposition-only formatting (#6404)
+
+commit 7cbd07c13063b9730d51385198e13bb036d40377
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date: Mon Dec 16 11:08:10 2024 +0100
+
+ [depr.meta.types] Remove superfluous period
+
+commit 7fe908fa11ad69138975bfec2cf376c66a536d08
+Author: Alisdair Meredith <alisdairm@me.com>
+Date: Tue Dec 17 14:13:02 2024 -0500
+
+ [cpp] Distinguish "preprocessing token" from "token" (#7482)
+
+commit 9c9d19f6aef145cf2c074dcdd343e7a2446417a9
+Author: Jonathan Wakely <cxx@kayari.org>
+Date: Fri Dec 6 17:37:05 2024 +0000
+
+ [sequence.reqmts] Remove unnecessary qualification of which new element
+
+ There is only one new element, and this avoids having to decide whether it should say args....
+
+
+
diff --git a/papers/n5002.md b/papers/n5002.md
new file mode 100644
index 0000000000..f5c5e576b1
--- /dev/null
+++ b/papers/n5002.md
@@ -0,0 +1,697 @@
+# N5002 Editors' Report -- Programming Languages -- C++
+
+Date: 2024-12-17
+
+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.
+Special thanks to Andreas Krug for many timely editorial fixes.
+
+## New papers
+
+ * [N5001](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/n5001.pdf) is the
+ current working draft for C++26. It replaces
+ [N4993](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/n4993.pdf).
+ * N5002 is this Editors' Report.
+
+
+## Motions incorporated into working draft
+
+### Notes on motions
+
+CWG Poll 9 was retracted.
+
+Two LWG Polls, Poll 5 (P0472R2) and Poll 17 (P3019R11) have not been applied and
+are being sent back to WG21 for clarification. We expect to see revisions to be
+approved at the next meeting:
+
+* LWG Poll 5 accidentally polled for the obsolete revision P0472R2 instead of the
+ intended P0472R3. It is sent back due to unclear intentions, with a request for
+ WG21 to clarify, and the expectation that R3 will be approved.
+
+* LWG Poll 17 caused technical discussion after the meeting, in which some
+ oversights were observed. The paper authors and the LWG chair agreed that
+ further LWG review would be in everybody's best interest. The poll is sent back
+ due to unclear specification, with a request for WG21 to produce a revision,
+ which we expect to be approved at the next meeting.
+
+In CWG Poll 1, issue CWG1965 contains no wording changes since it is subsumed by CWG2879.
+
+### Core working group polls
+CWG Poll 1. Accept as Defect Reports and apply the proposed resolutions of all issues in
+[P3524R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3524r0.html)
+(Core Language Working Group "ready" Issues for the November, 2024 meeting) to the C++ Working Paper.
+
+CWG Poll 2. Apply the changes in
+[P3340R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3340r0.pdf)
+(A Consistent Grammar for Sequences) to the C++ Working Paper.
+
+CWG Poll 3. Apply the changes in
+[P2686R5](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2686r5.pdf)
+(constexpr structured bindings and references to constexpr variables) to the C++ Working Paper.
+
+CWG Poll 4. Apply the changes in
+[P3068R6](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3068r6.html)
+(Allowing exception throwing in constant-evaluation) to the C++ Working Paper.
+
+CWG Poll 5. Apply the changes in
+[P3247R2](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3247r2.html)
+(Deprecate the notion of trivial types) to the C++ Working Paper.
+
+CWG Poll 6. Apply the changes in
+[P2865R6](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2865r6.pdf)
+(Remove Deprecated Array Comparisons from C++26) to the C++ Working Paper.
+
+CWG Poll 7. Apply the changes in
+[P1061R10](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p1061r10.html)
+(Structured Bindings can introduce a Pack) to the C++ Working Paper.
+
+CWG Poll 8. Apply the changes in
+[P3176R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3176r1.html)
+(The Oxford variadic comma) to the C++ Working Paper.
+
+CWG Poll 9 was retracted.
+
+### Library working group polls
+
+LWG Poll 1. Apply the changes for all Ready and Tentatively Ready issues in
+[P3504R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3504r0.html)
+(C++ Standard Library Ready Issues to be moved in Wrocław, Nov. 2024) to the C++ working paper.
+
+LWG Poll 2. Apply the changes in
+[P3136R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3136r1.html)
+(Retiring niebloids) to the C++ working paper.
+
+LWG Poll 3. Apply the changes in
+[P3138R5](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3138r5.html)
+(`views::cache_latest`) to the C++ working paper.
+
+LWG Poll 4. Apply the changes in
+[P3379R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3379r0.html)
+(Constrain `std::expected` equality operators) to the C++ working paper.
+
+LWG Poll 5 was sent back (see above).
+
+LWG Poll 6. Apply the changes in
+[P2862R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2862r1.html)
+(`text_encoding::name()` should never return null values) to the C++ working paper.
+
+LWG Poll 7. Apply the changes in
+[P2897R7](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2897r7.html)
+(`aligned_accessor`: An `mdspan` accessor expressing pointer over-alignment) to the C++ working paper.
+
+LWG Poll 8. Apply the changes in
+[P3355R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3355r1.html)
+(Fix `submdspan` for C++26) to the C++ working paper.
+
+LWG Poll 9. Apply the changes in
+[P3222R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3222r0.html)
+(Fix C++26 by adding transposed special cases for P2642 layouts) to the C++ working paper.
+
+LWG Poll 10. Apply the changes in
+[P3050R2](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3050r2.html)
+(Fix C++26 by optimizing `linalg::conjugated` for noncomplex value types) to the C++ working paper.
+
+LWG Poll 11. Apply the changes in
+[P3396R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3396r1.html)
+(`std::execution` wording fixes) to the C++ working paper.
+
+LWG Poll 12. Apply the changes in
+[P2835R7](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2835r7.html)
+(Expose `std::atomic_ref`'s object address) to the C++ working paper.
+
+LWG Poll 13. Apply the changes in
+[P3323R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3323r1.html)
+(cv-qualified types in `atomic` and `atomic_ref`) to the C++ working paper.
+
+LWG Poll 14. Apply the changes in
+[P3508R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3508r0.html)
+(Wording for "constexpr for specialized memory algorithms") and
+[P3369R0](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3369r0.html)
+(`constexpr` for `uninitialized_default_construct`) to the C++ working paper.
+
+LWG Poll 15. Apply the changes in
+[P3370R1](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3370r1.html)
+(Add new library headers from C23) to the C++ working paper.
+
+LWG Poll 16. Apply the changes in
+[P3309R3](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3309r3.html)
+(constexpr `atomic` and `atomic_ref`) to the C++ working paper.
+
+LWG Poll 17 was sent back (see above).
+
+LWG Poll 18. Apply the changes in
+[P1928R15](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p1928r15.pdf)
+(`std::simd` — merge data-parallel types from the Parallelism TS 2) to the C++ working paper.
+
+LWG Poll 19. Apply the changes in
+[P3325R5](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3325r5.html)
+(A Utility for Creating Execution Environments) to the C++ working paper.
+
+## Editorial changes
+
+### Major editorial changes
+
+There have not been any major editorial changes.
+
+### Minor editorial changes
+
+A log of editorial fixes made to the working draft since N4993 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/n4993...n5001).
+
+ commit e9604bcd3d8325860a4db9d02c4f90d0ae70162e
+ Author: Thomas Köppe
+ Date: Wed Oct 16 21:12:40 2024 +0100
+
+ [depr.format.syn] Fix header reference
+
+ commit 0b296da823e7af4a987a0a870ae299420b9ae502
+ Author: Thomas Köppe
+ Date: Thu Oct 17 00:39:04 2024 +0100
+
+ [{localization,re}.general] Change "This Clause" to "Subclause".
+
+ These subclauses are no longer top-level clauses.
+
+ commit 629e10e2f4177dd24d513be71f2203de325a7e8a
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Thu Oct 17 08:57:39 2024 +0200
+
+ [inplace.vector.overview] Add missing ',' in comment
+
+ commit 726e07a3a99a87f5e89dd40a064f4a6bc84ed3ce
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Thu Oct 17 08:25:55 2024 +0200
+
+ [cpp.subst] Fix typo
+
+ commit 88b2b8dcbd145782cfab61e6dad9296c9294593d
+ Author: Jens Maurer
+ Date: Wed Oct 16 22:58:07 2024 +0200
+
+ [exec.domain.default] Add missing \pnum
+
+ commit 8698ea48e40acc2e18630e799bbb23c41b9344e6
+ Author: James Touton
+ Date: Mon Sep 16 21:47:30 2024 -0700
+
+ [over.match.best.general] Minor formatting fixes
+
+ commit 7ad39cbf374764a4e232f967e01541419230fedc
+ Author: Alisdair Meredith
+ Date: Thu Oct 17 11:16:28 2024 -0400
+
+ [lex.comment] Move the subclause earlier, to where it better fits
+
+ Comments should fit betweem character sets (to define the basic source
+ character set) and preprocessor tokens, that must already understand
+ comments in order to treat them as whitespace.
+
+ commit 7f7170cc9b96e9cc76bc0b765837978856936ab1
+ Author: Alisdair Meredith
+ Date: Sat Oct 5 16:21:15 2024 -0400
+
+ [depr] Reorder clauses by origin of deprecation
+
+ Reorders the deprecated features annex to follow the order
+ of the main clauses that the deprecates feature refers to.
+ Where multiple clauses are references, use the one named by
+ the [depr.XXX] stable label.
+
+ commit cd21b72788d9066f79f31fb6c4516481dfbb4925
+ Author: Hewill Kang
+ Date: Fri Oct 18 03:55:20 2024 +0800
+
+ [range.concat.iterator] Remove redundant \expos comments (#6942)
+
+ commit 801fb2c0aaf6693a06a9a9e38871bae9536dc194
+ Author: Alisdair Meredith
+ Date: Thu Oct 17 17:05:47 2024 -0400
+
+ [lex] Reorder subclauses to better follow phases of translation
+
+ This PR purely moves existing words around, and does not create any new content.
+
+ The proposed subclause ordering is now:
+
+ * 5 Lexical convensions
+ - 5.1 Separate translation
+ - 5.2 Phases of translation
+ - 5.3 Characters
+ - 5.3.1 Character sets
+ - 5.3.2 Universal character names
+ - 5.4 Comments
+ - 5.5 Preprocessing tokens
+ - 5.6 Header names
+ - 5.7 Preprocessing numbers
+ - 5.8 Operators and punctuators
+ - 5.9 Alternative tokens
+ - 5.10 Tokens
+ - 5.11 Identifiers
+ - 5.12 Keywords
+ - 5.13 Literals
+ - 5.13.1 Kinds of literals
+ - 5.13.2 ...
+
+ commit 49113a4a577b8d6aed7e5321f0c1fe68d0bd6480
+ Author: Jens Maurer
+ Date: Fri Oct 18 08:28:28 2024 +0200
+
+ [library.general] Adjust library overview for recent clause restructuring
+
+ commit a470ff890be232b9e2a15e44c406ef72c7d816c2
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Sat Oct 19 11:31:59 2024 +0200
+
+ [lex.pptoken] Fix indefinitive article for consistency (#7324)
+
+ commit 92594a81f021e76dce6acf7ea5d8176350a1e3fb
+ Author: Eelis van der Weegen
+ Date: Wed Mar 13 21:04:43 2019 +0100
+
+ [temp.deduct.call] Include surrounding code in math formula
+
+ commit 0451d08aefd5318254d7d204ad45700aa4d5a2e7
+ Author: A. Jiang
+ Date: Mon Oct 21 19:45:10 2024 +0800
+
+ [specialized.algorithms.general] Restore the note for potentially-overlapping objects and undefined behavior (#7326)
+
+ The original note was incorrect and removed (see #6157). But it turns out
+ that _some_ note is still helpful. This PR tries to find the right way to
+ describe storage reusing and potential subsequent undefined behavior.
+
+ commit f6b7ef3f1c6e483d97ad5a4f86b3efed38b74c99
+ Author: Alisdair Meredith
+ Date: Sat Oct 19 11:41:35 2024 -0400
+
+ [lex.phases] Add crossreferences from phases 3 and 4
+
+ The phases of translation use forward references to the rest
+ of the standard well, but phases 3 and 4 almost entirely lack
+ such crossreferences, despite doing significant work in the
+ process of translating a file.
+
+ commit a69507a54e67ae91424d9c621a9cb57ef3ba1512
+ Author: Jens Maurer
+ Date: Mon Oct 21 17:48:09 2024 +0200
+
+ [locale.codecvt.virtuals] Fix garbled sentence
+
+ commit e0576ed2411f36b0ba648afbf6953a0c72c9effb
+ Author: Alisdair Meredith
+ Date: Mon Oct 21 13:09:51 2024 -0400
+
+ [compliance] Sort the freestanding headers after clause reorganization
+
+ commit b0135f256e40d45faf1d1ac2aaa3abbda36a17c3
+ Author: timsong-cpp
+ Date: Tue Oct 22 02:14:47 2024 -0500
+
+ [exec.awaitables] Add missing word (#7340)
+
+ commit eb9872aedc581e82e804c0fe8ca7d478ba066b17
+ Author: Jan Schultke
+ Date: Tue Oct 22 12:09:22 2024 +0200
+
+ [func.wrap.func.con] Fix ill-formed postcondition (#7341)
+
+ commit ced2c3866cb3d410c812fa3c359058d185aec329
+ Author: Alisdair Meredith
+ Date: Wed Oct 23 13:47:18 2024 -0400
+
+ [allocator.requirements.general] Remove redundant template syntax (#5872)
+
+ commit e70d9d6b901457cae9f4f596393f4bf7cee4591a
+ Author: Eisenwave
+ Date: Mon Oct 21 20:29:10 2024 +0200
+
+ [intro.races] Clarify conflicts for the case where no bits are changed
+
+ commit 6ba0dc9b2bf4c3cebc51154e4d543eafb41a8064
+ Author: Eisenwave
+ Date: Sun Aug 20 00:52:57 2023 +0200
+
+ [intro.memory] remove stray definitions
+
+ commit 9dc7b3f30d2971ccb3bb38483a7cdb62065a2c3c
+ Author: Alisdair Meredith
+ Date: Tue Oct 22 17:12:25 2024 -0400
+
+ [basic.stc.inherit] Dissolve paragraph into [...general]
+
+ The whole subclause [basic.stc.inherit] is a single sentence that
+ belongs adjacent to the material in [basic.std.general] that
+ specifies how entities acquire a storage duration, wheras all the
+ remaining subclauses below [basic.stc] describe specific storage
+ durations. Folding that sentence directly into the general clause
+ is even clearer.
+
+ commit d5174d561b61304118cdf1042c5697ec6083c181
+ Author: Jan Schultke
+ Date: Thu Oct 24 09:03:57 2024 +0200
+
+ [basic.link] Add commas between coordinate subclauses (#7342)
+
+ commit 8ab0745b6099fd56288763e57ca47dee099db7cb
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Fri Oct 25 10:53:22 2024 +0200
+
+ [bit.cast] change "behaviour" to "behavior" (#7353)
+
+ commit 95d491ed6ca7817423855be4f90b61094a1b4312
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Sat Oct 26 15:52:55 2024 +0200
+
+ [associative.reqmts.general] Fix punctuation (#7354)
+
+ commit 3eb8c47d8f2fe050e221b5d4c36189d965273b37
+ Author: Jan Schultke
+ Date: Sat Oct 26 16:00:12 2024 +0200
+
+ [basic.compound] Add comma to run-on sentence (#7348)
+
+ commit 84af20dcd1976a8982d4418756d1ec9728306580
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Sun Oct 27 13:27:34 2024 +0100
+
+ [mdspan.layout.left.cons] Remove duplicate "Effects:" (#7355)
+
+ commit ac5b25027266917de3fbb220fc9ecfa4470672f9
+ Author: Jan Schultke
+ Date: Sun Oct 27 22:46:10 2024 +0100
+
+ [expr.prim.lambda.capture, expr.const, ostream.formatted.print] Reword "automatic variable" (#7358)
+
+ commit 324f56439e951773e6ce7437e703fb3aafd5a90c
+ Author: Alisdair Meredith
+ Date: Mon Oct 28 07:42:45 2024 -0400
+
+ [lex.pptoken] Reorder paragraphs to define terms before they are used (#7346)
+
+ First move p1 below p2, so that we do not refer to preprocessing tokens before they are defined.
+ Then move p4 up, as it is splitting some unrelated examples, neither of which use its contents.
+
+ commit bf43925ff0d9e80997918e98989892b4c7bf15f7
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Tue Oct 29 11:52:02 2024 +0100
+
+ [mdspan.layout.left.cons] Fix typo (#7360)
+
+ commit a42d1246936f6376acf6188c1b2053886cdaf3c2
+ Author: Jan Schultke
+ Date: Sat Nov 2 14:38:54 2024 +0100
+
+ [lib.types.movedfrom] Add cross-reference to [defns.valid] (#7365)
+
+ commit 6bfbb59e48b6bde05a78d257cbb943acdb2b6781
+ Author: S. B. Tam
+ Date: Fri Apr 7 17:09:40 2023 +0800
+
+ [format.string.std] Replace "Derived Extracted Property" with simply "property"
+
+ commit aa53618e39f16a6fbf147a8ac2d95a33cb8c5cbc
+ Author: S. B. Tam
+ Date: Fri Aug 9 17:39:07 2024 +0800
+
+ [lex.name] Strike "Derived Core Properties"
+
+ commit cb15975d133869eb18a8b7878343a990e63415e2
+ Author: Ilya Burylov
+ Date: Wed Nov 6 01:44:54 2024 -0800
+
+ [linalg.helpers.mandates] Fix typos (#7372)
+
+ commit fcf95f0f1cb3ae11274f1c3477447aadb76b54ca
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Wed Nov 6 13:27:56 2024 +0100
+
+ [exec.opstate.general] Fix typo (#7370)
+
+ commit efa0bec63a2718967f7033217a757d536eba3c18
+ Author: Jonathan Wakely
+ Date: Wed Nov 6 12:55:52 2024 +0000
+
+ [linalg.reqs.val] Fix use of \defnadjx for value types (#7374)
+
+ commit 693835ad625acfdf2d610240b99d6d8fecdb8a6a
+ Author: Casey Carter
+ Date: Sat Nov 16 06:21:27 2024 -0800
+
+ [fs.op.remove] Clarify "Returns" element (#7387)
+
+ To avoid confusion as in microsoft/STL#5088.
+
+ commit 1788b3fcd8f3dbe7b31e6bbfbb968ad43d7ecec3
+ Author: lprv <100177227+lprv@users.noreply.github.com>
+ Date: Sun Nov 17 20:05:57 2024 +0000
+
+ [over.ics.ref] Fix formatting of 'cv T' (#7389)
+
+ commit 16df53c4ab9a17942f5bf994031c98105959a5d5
+ Author: lprv <100177227+lprv@users.noreply.github.com>
+ Date: Mon Nov 18 17:37:02 2024 +0000
+
+ [defns.regex.primary.equivalence.class] Hyphenate 'locale-specific' (#7395)
+
+ commit 4f0facdcd57b922510212ddf44ef39f46dcbe44d
+ Author: lprv <100177227+lprv@users.noreply.github.com>
+ Date: Mon Nov 18 17:38:09 2024 +0000
+
+ [temp.param] Fix typos (#7394)
+
+ commit 99deb7022614be47cfcce4f003d8eb57c02b6926
+ Author: lprv <100177227+lprv@users.noreply.github.com>
+ Date: Tue Nov 19 05:21:45 2024 +0000
+
+ [over.ics.ref] Capitalize 'Exact Match' (#7392)
+
+ commit fb8036b6dfe5ce4a99cd85fddac3f115a7fd96af
+ Author: lprv <100177227+lprv@users.noreply.github.com>
+ Date: Tue Nov 19 05:25:41 2024 +0000
+
+ [class] Avoid hyphenation for 'multidimensional' (#7391)
+
+ commit 3f41cf86547b77854abddde7dcaddf2ff00405bf
+ Author: lprv <100177227+lprv@users.noreply.github.com>
+ Date: Tue Nov 19 05:26:53 2024 +0000
+
+ [lex.phases] Move cross-reference to the first use of the referenced term (#7393)
+
+ commit a05b963e9fe12a8589502b4fbc951c119ae1b3b2
+ Author: Alisdair Meredith
+ Date: Tue Jul 30 16:51:21 2024 -0400
+
+ [basic.life] Move definition of before and after from bottom to top of subclause
+
+ The last paragraph of this subclause changes the definition of English words
+ used throughout the preceding paragraphs. While it might be preferable
+ to replace all such usage with the new definitions, that would be a Core issue,
+ see paragraph 6 for an example of awkward usage. Hence, we move the
+ redefinition to the start of the subclause so we know how to read this text
+ from the start.
+
+ commit 2981bd94f25ea2199fd6b8af7aa76e03cf427697
+ Author: Alisdair Meredith
+ Date: Sat Oct 19 08:31:08 2024 -0400
+
+ [basic.align] Move the Alignment subclause adjacent to "Object model"
+
+ Alignment puts additional restrictions on object placement.
+
+ commit eac0893a9a90a5704deef6db3deecae026f04271
+ Author: Alisdair Meredith
+ Date: Wed Oct 2 14:59:41 2024 -0400
+
+ [except.terminate] Better describe the function
+
+ While 'std:terminate' was originally conceived as the way to
+ report failures in the exception handling machinery, it has
+ evolved to become a more general tool for reporting unrecoverable
+ failures in the C++ runtime. This rewording attempts to address
+ that evolving design, and in doing so addresses the outstanding
+ %FIXME% that the current text is not adequately descriptive in
+ the first place.
+
+ commit f4c4c7cdfb7fba0a6ffbf8e55f2ea6debdf13e87
+ Author: xmh0511 <970252187@qq.com>
+ Date: Wed Nov 20 08:17:02 2024 +0800
+
+ [dcl.link] Change "objects" to "entities"
+
+ "Entities" is more appropriate since it includes functions.
+
+ commit 38461e17588aff3c6851de6ffc7f3e89418e0e65
+ Author: A. Jiang
+ Date: Thu Nov 7 18:50:10 2024 +0800
+
+ [reverse.iter.cons] Removed redundant wording
+
+ commit 8caa49a8266d7ef6b4ef3132588d154de07bbabd
+ Author: Eisenwave
+ Date: Fri Mar 1 20:49:37 2024 +0100
+
+ [rand.req.seedseq] Remove 'compile-time' complexity for typedefs
+
+ commit e2ddc7ab689bdaf91d2b2aa6424cef2510d3677a
+ Author: Eisenwave
+ Date: Fri Mar 1 20:50:27 2024 +0100
+
+ [rand.req.dist] Remove 'compile-time' complexity for typedefs
+
+ commit c9155b214a51d069cf4a575f10af2b4c4caca5d7
+ Author: Eisenwave
+ Date: Fri Mar 1 20:52:39 2024 +0100
+
+ [char.traits.require] Remove 'compile-time' complexity for typedefs
+
+ commit 2cd11c5503e78251c0c0fb4147e2d8ccb0947727
+ Author: Vlad Serebrennikov
+ Date: Tue Oct 8 15:30:13 2024 +0400
+
+ [temp.pre] Fix note about uniqueness of a template name in a scope
+
+ commit 2edf50afeec8cf200504718646b2b12492dac8ec
+ Author: Alisdair Meredith
+ Date: Mon Oct 21 08:33:19 2024 -0400
+
+ [lex.header] Modernize text around header names
+
+ The footnote better belongs in the main text as a regular note.
+ To make the notes flow consistently, switch the order of the
+ note and normative text in the first paragraph to lead with the
+ normative text.
+
+ commit 4a5d988a24f6c9737ca076e790b05e22ba169a7a
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Fri Nov 22 12:55:43 2024 +0100
+
+ [refwrap.invoke] Place period at end (#7402)
+
+ commit aed97568c63ad5c3c200eff34799413f3ad842f4
+ Author: Alisdair Meredith
+ Date: Sat Nov 23 07:53:16 2024 +0100
+
+ [lex.ccon, except.spec] Remove extraneous trailing linebreaks (#7403)
+
+ commit 219b959258b6314a3c96bee86b8a18b0f4a7c37e
+ Author: mrussoLuxoft <117848841+mrussoLuxoft@users.noreply.github.com>
+ Date: Sat Nov 30 19:36:56 2024 +0100
+
+ [dcl.spec.auto.general] Clarify sentence structure by adding bullets (#7450)
+
+ commit 861071a824419b955c4efb2d07980e78c9fc62c7
+ Author: Daniel Krügler
+ Date: Wed Dec 4 15:05:03 2024 +0100
+
+ [iterator.requirements.general] Revert `indirectly_writable` to "writable" definition (#7471)
+
+ This fixes a misapplication of the 2019 Belfast meeting LWG motion 9 (P1878R1), which erroneously replaced the "writable" definition by the `indirectly_writable` concept.
+
+ commit c530fd8e0f80029e88b0977bebbf70252d38795e
+ Author: Hewill Kang
+ Date: Fri Dec 6 21:52:45 2024 +0800
+
+ [text.encoding.overview] Add cross-reference text_encoding::aliases_view (#7476)
+
+ commit 10668dceb8186d7990ff4966a6808bb20ba3eed7
+ Author: lprv <100177227+lprv@users.noreply.github.com>
+ Date: Thu Dec 12 18:47:14 2024 +0000
+
+ [vector.overview,vector.bool.pspc] Move`at() const` to after `at()` (#7484)
+
+ This is consistent with the ordering for operator[].
+
+ commit 0b1256638ebf4f1c611c3ca6182bad69be4837ce
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Mon Dec 16 19:53:51 2024 +0100
+
+ [unique.ptr.single.general] Fix typo
+
+ commit 76465d7e42f56f763901e3f6a79ae6d77162a510
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Mon Dec 16 12:17:46 2024 +0100
+
+ [expr.type] Fix typo
+
+ commit c7fbd5974f4b5e8881d1dc3e8fdf0b59ecba3bab
+ Author: S. B. Tam
+ Date: Sun Dec 8 07:34:44 2024 +0800
+
+ [locale.ctype.virtuals] Fix a decade-old typo
+
+ commit f9c835be8299556ae5943dbb340b4929a6100b15
+ Author: Jens Maurer
+ Date: Fri Dec 6 16:51:49 2024 +0100
+
+ [except.spec] Remove misleading restriction in list of examples
+
+ commit e99e78d67b631fbb328770fbcd4882e683360cb1
+ Author: Jens Maurer
+ Date: Fri Dec 6 10:57:01 2024 +0100
+
+ [basic.pre,basic.lookup.general] Cleanup definition of term 'name lookup'
+
+ commit 57ba5a5f4095ec3df6292cfdc371f554e8b684ef
+ Author: Alisdair Meredith
+ Date: Tue Dec 17 12:25:26 2024 -0500
+
+ [lex.phases] Reorder the first two sentences of phase 7 (#7432)
+
+ Currently, the first sentence refers to "tokens" that do not exist until after the second sentence.
+
+ commit 55a58f9206e41a831c664747dbacebd25c01b034
+ Author: Jan Schultke
+ Date: Tue Dec 17 19:34:54 2024 +0100
+
+ [class.conv.ctor] Turn last paragraph into a note (#6505)
+
+ commit 3443cd8af21845e5a4fda6246c4c1bbc74cd007b
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Tue Dec 17 19:18:25 2024 +0100
+
+ [exec.envs] Fix typo
+
+ commit 14199aed5adb4baaef28245b4de88e7ffe73a365
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Tue Dec 17 20:02:55 2024 +0100
+
+ [atomics.ref.int, atomics.ref.float] Minor \tcode fixes (#7499)
+
+ commit daae8f9a9b959c099e99f248324af95bbaf11779
+ Author: A. Jiang
+ Date: Wed Dec 18 03:09:10 2024 +0800
+
+ [flat.{map,multimap,set,multiset}] Exposition-only formatting (#6404)
+
+ commit 7cbd07c13063b9730d51385198e13bb036d40377
+ Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+ Date: Mon Dec 16 11:08:10 2024 +0100
+
+ [depr.meta.types] Remove superfluous period
+
+ commit 7fe908fa11ad69138975bfec2cf376c66a536d08
+ Author: Alisdair Meredith
+ Date: Tue Dec 17 14:13:02 2024 -0500
+
+ [cpp] Distinguish "preprocessing token" from "token" (#7482)
+
+ commit 9c9d19f6aef145cf2c074dcdd343e7a2446417a9
+ Author: Jonathan Wakely
+ Date: Fri Dec 6 17:37:05 2024 +0000
+
+ [sequence.reqmts] Remove unnecessary qualification of which new element
+
+ There is only one new element, and this avoids having to decide whether it should say args....
diff --git a/papers/wd-index.md b/papers/wd-index.md
index bf7c4b1679..8b21e73321 100644
--- a/papers/wd-index.md
+++ b/papers/wd-index.md
@@ -50,5 +50,6 @@
* [N4971](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/n4971.pdf) 2023-12 C++ Working Draft
* [N4981](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/n4981.pdf) 2024-03 C++ Working Draft
* [N4986](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/n4986.pdf) 2024-06 C++ Working Draft
- * [N4986](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/n4988.pdf) 2024-08 C++ Working Draft
- * [N4986](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/n4993.pdf) 2024-10 C++ Working Draft
+ * [N4988](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/n4988.pdf) 2024-08 C++ Working Draft
+ * [N4993](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/n4993.pdf) 2024-10 C++ Working Draft
+ * [N5001](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/n5001.pdf) 2024-12 C++ Working Draft
diff --git a/source/algorithms.tex b/source/algorithms.tex
index a8c3809b34..19a139e7ef 100644
--- a/source/algorithms.tex
+++ b/source/algorithms.tex
@@ -38,28 +38,9 @@
satisfying the assumptions on the algorithms.
\pnum
-The entities defined in the \tcode{std::ranges} namespace in this Clause
-are not found by argument-dependent name lookup\iref{basic.lookup.argdep}.
-When found by unqualified\iref{basic.lookup.unqual} name lookup
-for the \grammarterm{postfix-expression} in a function call\iref{expr.call},
-they inhibit argument-dependent name lookup.
-
-\begin{example}
-\begin{codeblock}
-void foo() {
- using namespace std::ranges;
- std::vector vec{1,2,3};
- find(begin(vec), end(vec), 2); // \#1
-}
-\end{codeblock}
-The function call expression at \tcode{\#1} invokes \tcode{std::ranges::find},
-not \tcode{std::find}, despite that
-(a) the iterator type returned from \tcode{begin(vec)} and \tcode{end(vec)}
-may be associated with namespace \tcode{std} and
-(b) \tcode{std::find} is more specialized\iref{temp.func.order} than
-\tcode{std::ranges::find} since the former requires
-its first two parameters to have the same type.
-\end{example}
+The entities defined in the \tcode{std::ranges} namespace in this Clause and
+specified as function templates are
+algorithm function objects\iref{alg.func.obj}.
\pnum
For purposes of determining the existence of data races,
@@ -11156,15 +11137,31 @@
are destroyed in an unspecified order
before allowing the exception to propagate.
+\pnum
+\begin{note}
+When new objects are created by
+the algorithms specified in \ref{specialized.algorithms},
+the lifetime ends for any existing objects
+(including potentially-overlapping subobjects \ref{intro.object})
+in storage that is reused \ref{basic.life}.
+\end{note}
+
\pnum
Some algorithms specified in \ref{specialized.algorithms}
-make use of the exposition-only function template
-\tcode{\placeholdernc{voidify}}:
+make use of the following exposition-only function templates:
\begin{codeblock}
template
constexpr void* @\placeholdernc{voidify}@(T& obj) noexcept {
return addressof(obj);
}
+
+template
+ decltype(auto) @\exposid{deref-move}@(I& it) {
+ if constexpr (is_lvalue_reference_v)
+ return std::move(*it);
+ else
+ return *it;
+ }
\end{codeblock}
\rSec2[special.mem.concepts]{Special memory concepts}
@@ -11258,7 +11255,8 @@
\indexlibraryglobal{uninitialized_default_construct}%
\begin{itemdecl}
template
- void uninitialized_default_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
+ constexpr void uninitialized_default_construct(NoThrowForwardIterator first,
+ NoThrowForwardIterator last);
\end{itemdecl}
\begin{itemdescr}
@@ -11277,10 +11275,10 @@
namespace ranges {
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@ S>
requires @\libconcept{default_initializable}@>
- I uninitialized_default_construct(I first, S last);
+ constexpr I uninitialized_default_construct(I first, S last);
template<@\exposconcept{nothrow-forward-range}@ R>
requires @\libconcept{default_initializable}@>
- borrowed_iterator_t uninitialized_default_construct(R&& r);
+ constexpr borrowed_iterator_t uninitialized_default_construct(R&& r);
}
\end{itemdecl}
@@ -11298,7 +11296,8 @@
\indexlibraryglobal{uninitialized_default_construct_n}%
\begin{itemdecl}
template
- NoThrowForwardIterator uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
+ constexpr NoThrowForwardIterator
+ uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
\end{itemdecl}
\begin{itemdescr}
@@ -11318,7 +11317,7 @@
namespace ranges {
template<@\exposconcept{nothrow-forward-iterator}@ I>
requires @\libconcept{default_initializable}@>
- I uninitialized_default_construct_n(I first, iter_difference_t n);
+ constexpr I uninitialized_default_construct_n(I first, iter_difference_t n);
}
\end{itemdecl}
@@ -11337,7 +11336,8 @@
\indexlibraryglobal{uninitialized_value_construct}%
\begin{itemdecl}
template
- void uninitialized_value_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
+ constexpr void uninitialized_value_construct(NoThrowForwardIterator first,
+ NoThrowForwardIterator last);
\end{itemdecl}
\begin{itemdescr}
@@ -11356,10 +11356,10 @@
namespace ranges {
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@ S>
requires @\libconcept{default_initializable}@>
- I uninitialized_value_construct(I first, S last);
+ constexpr I uninitialized_value_construct(I first, S last);
template<@\exposconcept{nothrow-forward-range}@ R>
requires @\libconcept{default_initializable}@>
- borrowed_iterator_t uninitialized_value_construct(R&& r);
+ constexpr borrowed_iterator_t uninitialized_value_construct(R&& r);
}
\end{itemdecl}
@@ -11377,7 +11377,8 @@
\indexlibraryglobal{uninitialized_value_construct_n}%
\begin{itemdecl}
template
- NoThrowForwardIterator uninitialized_value_construct_n(NoThrowForwardIterator first, Size n);
+ constexpr NoThrowForwardIterator
+ uninitialized_value_construct_n(NoThrowForwardIterator first, Size n);
\end{itemdecl}
\begin{itemdescr}
@@ -11397,7 +11398,7 @@
namespace ranges {
template<@\exposconcept{nothrow-forward-iterator}@ I>
requires @\libconcept{default_initializable}@>
- I uninitialized_value_construct_n(I first, iter_difference_t n);
+ constexpr I uninitialized_value_construct_n(I first, iter_difference_t n);
}
\end{itemdecl}
@@ -11416,8 +11417,8 @@
\indexlibraryglobal{uninitialized_copy}%
\begin{itemdecl}
template
- NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
- NoThrowForwardIterator result);
+ constexpr NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
+ NoThrowForwardIterator result);
\end{itemdecl}
\begin{itemdescr}
@@ -11445,11 +11446,11 @@
template<@\libconcept{input_iterator}@ I, @\libconcept{sentinel_for}@ S1,
@\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@ S2>
requires @\libconcept{constructible_from}@, iter_reference_t>
- uninitialized_copy_result
+ constexpr uninitialized_copy_result
uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast);
template<@\libconcept{input_range}@ IR, @\exposconcept{nothrow-forward-range}@ OR>
requires @\libconcept{constructible_from}@, range_reference_t>
- uninitialized_copy_result, borrowed_iterator_t>
+ constexpr uninitialized_copy_result, borrowed_iterator_t>
uninitialized_copy(IR&& in_range, OR&& out_range);
}
\end{itemdecl}
@@ -11472,8 +11473,8 @@
\indexlibraryglobal{uninitialized_copy_n}%
\begin{itemdecl}
template
- NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n,
- NoThrowForwardIterator result);
+ constexpr NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n,
+ NoThrowForwardIterator result);
\end{itemdecl}
\begin{itemdescr}
@@ -11500,7 +11501,7 @@
namespace ranges {
template<@\libconcept{input_iterator}@ I, @\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@ S>
requires @\libconcept{constructible_from}@, iter_reference_t>
- uninitialized_copy_n_result
+ constexpr uninitialized_copy_n_result
uninitialized_copy_n(I ifirst, iter_difference_t n, O ofirst, S olast);
}
\end{itemdecl}
@@ -11526,8 +11527,8 @@
\indexlibraryglobal{uninitialized_move}%
\begin{itemdecl}
template
- NoThrowForwardIterator uninitialized_move(InputIterator first, InputIterator last,
- NoThrowForwardIterator result);
+ constexpr NoThrowForwardIterator uninitialized_move(InputIterator first, InputIterator last,
+ NoThrowForwardIterator result);
\end{itemdecl}
\begin{itemdescr}
@@ -11541,7 +11542,7 @@
\begin{codeblock}
for (; first != last; (void)++result, ++first)
::new (@\placeholdernc{voidify}@(*result))
- typename iterator_traits::value_type(std::move(*first));
+ typename iterator_traits::value_type(@\exposid{deref-move}@(first));
return result;
\end{codeblock}
\end{itemdescr}
@@ -11552,11 +11553,11 @@
template<@\libconcept{input_iterator}@ I, @\libconcept{sentinel_for}@ S1,
@\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@ S2>
requires @\libconcept{constructible_from}@, iter_rvalue_reference_t>
- uninitialized_move_result
+ constexpr uninitialized_move_result
uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast);
template<@\libconcept{input_range}@ IR, @\exposconcept{nothrow-forward-range}@ OR>
requires @\libconcept{constructible_from}@, range_rvalue_reference_t>
- uninitialized_move_result, borrowed_iterator_t>
+ constexpr uninitialized_move_result, borrowed_iterator_t>
uninitialized_move(IR&& in_range, OR&& out_range);
}
\end{itemdecl}
@@ -11586,7 +11587,7 @@
\indexlibraryglobal{uninitialized_move_n}%
\begin{itemdecl}
template
- pair
+ constexpr pair
uninitialized_move_n(InputIterator first, Size n, NoThrowForwardIterator result);
\end{itemdecl}
@@ -11601,7 +11602,7 @@
\begin{codeblock}
for (; n > 0; ++result, (void) ++first, --n)
::new (@\placeholdernc{voidify}@(*result))
- typename iterator_traits::value_type(std::move(*first));
+ typename iterator_traits::value_type(@\exposid{deref-move}@(first));
return {first, result};
\end{codeblock}
\end{itemdescr}
@@ -11611,7 +11612,7 @@
namespace ranges {
template<@\libconcept{input_iterator}@ I, @\exposconcept{nothrow-forward-iterator}@ O, @\exposconcept{nothrow-sentinel-for}@ S>
requires @\libconcept{constructible_from}@, iter_rvalue_reference_t>
- uninitialized_move_n_result
+ constexpr uninitialized_move_n_result
uninitialized_move_n(I ifirst, iter_difference_t n, O ofirst, S olast);
}
\end{itemdecl}
@@ -11643,7 +11644,8 @@
\indexlibraryglobal{uninitialized_fill}%
\begin{itemdecl}
template
- void uninitialized_fill(NoThrowForwardIterator first, NoThrowForwardIterator last, const T& x);
+ constexpr void uninitialized_fill(NoThrowForwardIterator first,
+ NoThrowForwardIterator last, const T& x);
\end{itemdecl}
\begin{itemdescr}
@@ -11662,10 +11664,10 @@
namespace ranges {
template<@\exposconcept{nothrow-forward-iterator}@ I, @\exposconcept{nothrow-sentinel-for}@ S, class T>
requires @\libconcept{constructible_from}@, const T&>
- I uninitialized_fill(I first, S last, const T& x);
+ constexpr I uninitialized_fill(I first, S last, const T& x);
template<@\exposconcept{nothrow-forward-range}@ R, class T>
requires @\libconcept{constructible_from}@, const T&>
- borrowed_iterator_t uninitialized_fill(R&& r, const T& x);
+ constexpr borrowed_iterator_t uninitialized_fill(R&& r, const T& x);
}
\end{itemdecl}
@@ -11683,7 +11685,8 @@
\indexlibraryglobal{uninitialized_fill_n}%
\begin{itemdecl}
template
- NoThrowForwardIterator uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x);
+ constexpr NoThrowForwardIterator
+ uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x);
\end{itemdecl}
\begin{itemdescr}
@@ -11703,7 +11706,7 @@
namespace ranges {
template<@\exposconcept{nothrow-forward-iterator}@ I, class T>
requires @\libconcept{constructible_from}@, const T&>
- I uninitialized_fill_n(I first, iter_difference_t n, const T& x);
+ constexpr I uninitialized_fill_n(I first, iter_difference_t n, const T& x);
}
\end{itemdecl}
@@ -11732,14 +11735,22 @@
\begin{itemdescr}
\pnum
\constraints
-The expression \tcode{::new (declval()) T(declval()...)}
+\tcode{is_unbounded_array_v} is \tcode{false}.
+The expression \tcode{::new (declval()) T(\linebreak{}declval()...)}
is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}.
+\pnum
+\mandates
+If \tcode{is_array_v} is \tcode{true}, \tcode{sizeof...(Args)} is zero.
+
\pnum
\effects
Equivalent to:
\begin{codeblock}
-return ::new (@\placeholdernc{voidify}@(*location)) T(std::forward(args)...);
+if constexpr (is_array_v)
+ return ::new (@\placeholdernc{voidify}@(*location)) T[1]();
+else
+ return ::new (@\placeholdernc{voidify}@(*location)) T(std::forward(args)...);
\end{codeblock}
\end{itemdescr}
@@ -11910,7 +11921,8 @@
\begin{itemdecl}
template
requires @\libconcept{output_range}@> && @\libconcept{invocable}@ &&
- @\libconcept{uniform_random_bit_generator}@>
+ @\libconcept{uniform_random_bit_generator}@> &&
+ is_arithmetic_v>
constexpr borrowed_iterator_t ranges::generate_random(R&& r, G&& g, D&& d);
\end{itemdecl}
@@ -11959,7 +11971,8 @@
\begin{itemdecl}
template> O, @\libconcept{sentinel_for}@ S>
- requires @\libconcept{invocable}@ && @\libconcept{uniform_random_bit_generator}@>
+ requires @\libconcept{invocable}@ && @\libconcept{uniform_random_bit_generator}@> &&
+ is_arithmetic_v>
constexpr O ranges::generate_random(O first, S last, G&& g, D&& d);
\end{itemdecl}
diff --git a/source/basic.tex b/source/basic.tex
index 9524265f81..748f040876 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -103,11 +103,13 @@
or the \tcode{*\keyword{this}} object\iref{expr.prim.this}.
\pnum
-Some names denote types or templates. In general,
-whenever a name is encountered it is necessary to determine whether that name denotes
-one of these entities before continuing to parse the program that contains it. The
-process that determines this is called
-\defnx{name lookup}{lookup!name}\iref{basic.lookup}.
+\begin{note}
+Some names denote types or templates.
+In general, whenever a name is encountered
+it is necessary to look it up\iref{basic.lookup}
+to determine whether that name denotes one of these entities
+before continuing to parse the program that contains it.
+\end{note}
\pnum
Two names are \defnx{the same}{name!same} if
@@ -441,24 +443,59 @@
A variable is named by an expression
if the expression is an \grammarterm{id-expression} that denotes it.
A variable \tcode{x} that is named by a
-potentially-evaluated expression $E$
-is \defnx{odr-used}{odr-use} by $E$ unless
+potentially-evaluated expression $N$
+that appears at a point $P$
+is \defnx{odr-used}{odr-use} by $N$ unless
\begin{itemize}
\item
- \tcode{x} is a reference that is
- usable in constant expressions\iref{expr.const}, or
+\tcode{x} is a reference
+that is usable in constant expressions at $P$\iref{expr.const} or
\item
- \tcode{x} is a variable of non-reference type that is
- usable in constant expressions and has no mutable subobjects, and
- $E$ is an element of the set of potential results of an expression
- of non-volatile-qualified non-class type
- to which the lvalue-to-rvalue conversion\iref{conv.lval} is applied, or
+$N$ is an element of the set of potential results of an expression $E$, where
+\begin{itemize}
\item
- \tcode{x} is a variable of non-reference type, and
- $E$ is an element of the set of potential results
- of a discarded-value expression\iref{expr.context}
- to which the lvalue-to-rvalue conversion is not applied.
+$E$ is a discarded-value expression\iref{expr.context}
+to which the lvalue-to-rvalue conversion is not applied or
+\item
+\tcode{x} is a non-volatile object
+that is usable in constant expressions at $P$ and
+has no mutable subobjects and
+\begin{itemize}
+\item
+$E$ is a class member access expression\iref{expr.ref}
+naming a non-static data member of reference type and
+whose object expression has non-volatile-qualified type or
+\item
+the lvalue-to-rvalue conversion\iref{conv.lval} is applied to $E$ and
+$E$ has non-volatile-qualified non-class type
+\end{itemize}
+\end{itemize}
\end{itemize}
+\begin{example}
+\begin{codeblock}
+int f(int);
+int g(int&);
+struct A {
+ int x;
+};
+struct B {
+ int& r;
+};
+int h(bool cond) {
+ constexpr A a = {1};
+ constexpr const volatile A& r = a; // odr-uses \tcode{a}
+ int _ = f(cond ? a.x : r.x); // does not odr-use \tcode{a} or \tcode{r}
+ int x, y;
+ constexpr B b1 = {x}, b2 = {y}; // odr-uses \tcode{x} and \tcode{y}
+ int _ = g(cond ? b1.r : b2.r); // does not odr-use \tcode{b1} or \tcode{b2}
+ int _ = ((cond ? x : y), 0); // does not odr-use \tcode{x} or \tcode{y}
+ return [] {
+ return b1.r; // error: \tcode{b1} is odr-used here because the object
+ // referred to by \tcode{b1.r} is not constexpr-referenceable here
+ }();
+}
+\end{codeblock}
+\end{example}
\pnum
A structured binding is odr-used if it appears as a potentially-evaluated expression.
@@ -511,7 +548,8 @@
either:
\begin{itemize}
\item the intervening scope is a block scope, or
-\item the intervening scope is the function parameter scope of a \grammarterm{lambda-expression}, or
+\item the intervening scope is the function parameter scope of
+a \grammarterm{lambda-expression} or \grammarterm{requires-expression}, or
\item the intervening scope is the lambda scope of
a \grammarterm{lambda-expression}
that has a \grammarterm{simple-capture}
@@ -1483,13 +1521,13 @@
\indextext{scope!name lookup and|see{lookup, name}}%
\pnum
+\defnx{Name lookup}{lookup!name} associates the use of a name
+with a set of declarations\iref{basic.def} of that name.
The name lookup rules apply uniformly to all names (including
\grammarterm{typedef-name}{s}\iref{dcl.typedef},
\grammarterm{namespace-name}{s}\iref{basic.namespace}, and
\grammarterm{class-name}{s}\iref{class.name}) wherever the grammar allows
-such names in the context discussed by a particular rule. Name lookup
-associates the use of a name with a set of declarations\iref{basic.def} of
-that name.
+such names in the context discussed by a particular rule.
Unless otherwise specified,
the program is ill-formed if no declarations are found.
If the declarations found by name lookup
@@ -2714,8 +2752,8 @@
\pnum
An unnamed namespace or a namespace declared directly or indirectly within an
unnamed namespace has internal linkage. All other namespaces have external linkage.
-The name of an entity that belongs to a namespace scope
-that has not been given internal linkage above
+The name of an entity that belongs to a namespace scope,
+that has not been given internal linkage above,
and that is the name of
\begin{itemize}
\item a variable; or
@@ -3103,11 +3141,10 @@
The number of bits in a byte is reported by the macro
\tcode{CHAR_BIT} in the header \libheaderref{climits}.
\end{footnote}
-the number of which is \impldef{bits in a byte}. The least
-significant bit is called the \defn{low-order bit}; the most
-significant bit is called the \defn{high-order bit}. The memory
-available to a \Cpp{} program consists of one or more sequences of
-contiguous bytes. Every byte has a unique address.
+the number of which is \impldef{bits in a byte}.
+The memory available to a \Cpp{} program consists of one or more sequences of
+contiguous bytes.
+Every byte has a unique address.
\pnum
\begin{note}
@@ -3116,7 +3153,9 @@
\end{note}
\pnum
-A \defn{memory location} is either an object of scalar type that is not a bit-field
+A \defn{memory location} is
+the storage occupied by the object representation of
+either an object of scalar type that is not a bit-field
or a maximal sequence of adjacent bit-fields all having nonzero width.
\begin{note}
Various
@@ -3454,8 +3493,106 @@
\end{note}
\indextext{object model|)}
+\rSec2[basic.align]{Alignment}
+
+\pnum
+Object types have \defnx{alignment requirements}{alignment requirement!implementation-defined}\iref{basic.fundamental,basic.compound}
+which place restrictions on the addresses at which an object of that type
+may be allocated. An \defn{alignment} is an \impldef{alignment}
+integer value representing the number of bytes between successive addresses
+at which a given object can be allocated. An object type imposes an alignment
+requirement on every object of that type; stricter alignment can be requested
+using the alignment specifier\iref{dcl.align}.
+Attempting to create an object\iref{intro.object} in storage that
+does not meet the alignment requirements of the object's type
+is undefined behavior.
+
+\pnum
+A \defnadj{fundamental}{alignment} is represented by an alignment
+less than or equal to the greatest alignment supported by the implementation in
+all contexts, which is equal to
+\tcode{\keyword{alignof}(std::max_align_t)}\iref{support.types}.
+The alignment required for a type may be different when it is used as the type
+of a complete object and when it is used as the type of a subobject.
+\begin{example}
+\begin{codeblock}
+struct B { long double d; };
+struct D : virtual B { char c; };
+\end{codeblock}
+
+When \tcode{D} is the type of a complete object, it will have a subobject of
+type \tcode{B}, so it must be aligned appropriately for a \tcode{\keyword{long} \keyword{double}}.
+If \tcode{D} appears as a subobject of another object that also has \tcode{B}
+as a virtual base class, the \tcode{B} subobject might be part of a different
+subobject, reducing the alignment requirements on the \tcode{D} subobject.
+\end{example}
+The result of the \keyword{alignof} operator reflects the alignment
+requirement of the type in the complete-object case.
+
+\pnum
+An \defnadj{extended}{alignment} is represented by an alignment
+greater than \tcode{\keyword{alignof}(std::max_align_t)}. It is \impldef{support for extended alignments}
+whether any extended alignments are supported and the contexts in which they are
+supported\iref{dcl.align}. A type having an extended alignment
+requirement is an \defnadj{over-aligned}{type}.
+\begin{note}
+Every over-aligned type is or contains a class type
+to which extended alignment applies (possibly through a non-static data member).
+\end{note}
+A \defnadj{new-extended}{alignment} is represented by
+an alignment greater than \mname{STDCPP_DEFAULT_NEW_ALIGNMENT}\iref{cpp.predefined}.
+
+\pnum
+Alignments are represented as values of the type \tcode{std::size_t}.
+Valid alignments include only those values returned by an \keyword{alignof}
+expression for the fundamental types plus an additional \impldef{alignment additional
+values}
+set of values, which may be empty.
+Every alignment value shall be a non-negative integral power of two.
+
+\pnum
+Alignments have an order from \defnx{weaker}{alignment!weaker} to
+\defnx{stronger}{alignment!stronger} or \defnx{stricter}{alignment!stricter} alignments. Stricter
+alignments have larger alignment values. An address that satisfies an alignment
+requirement also satisfies any weaker valid alignment requirement.
+
+\pnum
+The alignment requirement of a complete type can be queried using an
+\keyword{alignof} expression\iref{expr.alignof}. Furthermore,
+the narrow character types\iref{basic.fundamental} shall have the weakest
+alignment requirement.
+\begin{note}
+This enables the ordinary character types to be used as the
+underlying type for an aligned memory area\iref{dcl.align}.
+\end{note}
+
+\pnum
+Comparing alignments is meaningful and provides the obvious results:
+
+\begin{itemize}
+\item Two alignments are equal when their numeric values are equal.
+\item Two alignments are different when their numeric values are not equal.
+\item When an alignment is larger than another it represents a stricter alignment.
+\end{itemize}
+
+\pnum
+\begin{note}
+The runtime pointer alignment function\iref{ptr.align}
+can be used to obtain an aligned pointer within a buffer;
+an \grammarterm{alignment-specifier}\iref{dcl.align}
+can be used to align storage explicitly.
+\end{note}
+
+\pnum
+If a request for a specific extended alignment in a specific context is not
+supported by an implementation, the program is ill-formed.
+
\rSec2[basic.life]{Lifetime}
+\pnum
+In this subclause, ``before'' and ``after'' refer to the ``happens before''
+relation\iref{intro.multithread}.
+
\pnum
\indextext{object lifetime|(}%
The \defn{lifetime} of an object or reference is a runtime property of the
@@ -3631,6 +3768,12 @@
\keyword{typeid}.
\end{itemize}
+\begin{note}
+Therefore, undefined behavior results
+if an object that is being constructed in one thread is referenced from another
+thread without adequate synchronization.
+\end{note}
+
\pnum
An object $o_1$ is \defn{transparently replaceable} by an object $o_2$ if
\begin{itemize}
@@ -3741,15 +3884,6 @@
}
\end{codeblock}
\end{example}
-
-\pnum
-In this subclause, ``before'' and ``after'' refer to the ``happens before''
-relation\iref{intro.multithread}.
-\begin{note}
-Therefore, undefined behavior results
-if an object that is being constructed in one thread is referenced from another
-thread without adequate synchronization.
-\end{note}
\indextext{object lifetime|)}
\rSec2[basic.indet]{Indeterminate and erroneous values}
@@ -3912,6 +4046,12 @@
\pnum
The storage duration categories apply to references as well.
+\pnum
+\indextext{storage duration!class member}%
+The storage duration of subobjects and reference members
+is that of their complete object\iref{intro.object}.
+\indextext{storage duration|)}%
+
\rSec3[basic.stc.static]{Static storage duration}
\pnum
@@ -4244,108 +4384,6 @@
deallocation function shall deallocate the storage referenced by the
pointer, ending the duration of the region of storage.
-\rSec3[basic.stc.inherit]{Duration of subobjects}
-
-\pnum
-\indextext{storage duration!class member}%
-The storage duration of subobjects and reference members
-is that of their complete object\iref{intro.object}.
-\indextext{storage duration|)}%
-
-\rSec2[basic.align]{Alignment}
-
-\pnum
-Object types have \defnx{alignment requirements}{alignment requirement!implementation-defined}\iref{basic.fundamental,basic.compound}
-which place restrictions on the addresses at which an object of that type
-may be allocated. An \defn{alignment} is an \impldef{alignment}
-integer value representing the number of bytes between successive addresses
-at which a given object can be allocated. An object type imposes an alignment
-requirement on every object of that type; stricter alignment can be requested
-using the alignment specifier\iref{dcl.align}.
-Attempting to create an object\iref{intro.object} in storage that
-does not meet the alignment requirements of the object's type
-is undefined behavior.
-
-\pnum
-A \defnadj{fundamental}{alignment} is represented by an alignment
-less than or equal to the greatest alignment supported by the implementation in
-all contexts, which is equal to
-\tcode{\keyword{alignof}(std::max_align_t)}\iref{support.types}.
-The alignment required for a type may be different when it is used as the type
-of a complete object and when it is used as the type of a subobject.
-\begin{example}
-\begin{codeblock}
-struct B { long double d; };
-struct D : virtual B { char c; };
-\end{codeblock}
-
-When \tcode{D} is the type of a complete object, it will have a subobject of
-type \tcode{B}, so it must be aligned appropriately for a \tcode{\keyword{long} \keyword{double}}.
-If \tcode{D} appears as a subobject of another object that also has \tcode{B}
-as a virtual base class, the \tcode{B} subobject might be part of a different
-subobject, reducing the alignment requirements on the \tcode{D} subobject.
-\end{example}
-The result of the \keyword{alignof} operator reflects the alignment
-requirement of the type in the complete-object case.
-
-\pnum
-An \defnadj{extended}{alignment} is represented by an alignment
-greater than \tcode{\keyword{alignof}(std::max_align_t)}. It is \impldef{support for extended alignments}
-whether any extended alignments are supported and the contexts in which they are
-supported\iref{dcl.align}. A type having an extended alignment
-requirement is an \defnadj{over-aligned}{type}.
-\begin{note}
-Every over-aligned type is or contains a class type
-to which extended alignment applies (possibly through a non-static data member).
-\end{note}
-A \defnadj{new-extended}{alignment} is represented by
-an alignment greater than \mname{STDCPP_DEFAULT_NEW_ALIGNMENT}\iref{cpp.predefined}.
-
-\pnum
-Alignments are represented as values of the type \tcode{std::size_t}.
-Valid alignments include only those values returned by an \keyword{alignof}
-expression for the fundamental types plus an additional \impldef{alignment additional
-values}
-set of values, which may be empty.
-Every alignment value shall be a non-negative integral power of two.
-
-\pnum
-Alignments have an order from \defnx{weaker}{alignment!weaker} to
-\defnx{stronger}{alignment!stronger} or \defnx{stricter}{alignment!stricter} alignments. Stricter
-alignments have larger alignment values. An address that satisfies an alignment
-requirement also satisfies any weaker valid alignment requirement.
-
-\pnum
-The alignment requirement of a complete type can be queried using an
-\keyword{alignof} expression\iref{expr.alignof}. Furthermore,
-the narrow character types\iref{basic.fundamental} shall have the weakest
-alignment requirement.
-\begin{note}
-This enables the ordinary character types to be used as the
-underlying type for an aligned memory area\iref{dcl.align}.
-\end{note}
-
-\pnum
-Comparing alignments is meaningful and provides the obvious results:
-
-\begin{itemize}
-\item Two alignments are equal when their numeric values are equal.
-\item Two alignments are different when their numeric values are not equal.
-\item When an alignment is larger than another it represents a stricter alignment.
-\end{itemize}
-
-\pnum
-\begin{note}
-The runtime pointer alignment function\iref{ptr.align}
-can be used to obtain an aligned pointer within a buffer;
-an \grammarterm{alignment-specifier}\iref{dcl.align}
-can be used to align storage explicitly.
-\end{note}
-
-\pnum
-If a request for a specific extended alignment in a specific context is not
-supported by an implementation, the program is ill-formed.
-
\rSec2[class.temporary]{Temporary objects}
\pnum
@@ -4923,11 +4961,6 @@
Scalar types, trivially copyable class types\iref{class.prop},
arrays of such types, and cv-qualified versions of these
types are collectively called \defnadjx{trivially copyable}{types}{type}.
-\label{term.trivial.type}%
-Scalar types, trivial class types\iref{class.prop},
-arrays of such types, and cv-qualified versions of these
-types are collectively called
-\defnadjx{trivial}{types}{type}.
\label{term.standard.layout.type}%
Scalar types, standard-layout class
types\iref{class.prop}, arrays of such types, and
@@ -5499,7 +5532,7 @@
a pointer past the end of the last element of
an array \tcode{x} of $n$ elements
is considered to be equivalent to
-a pointer to a hypothetical array element $n$ of \tcode{x} and
+a pointer to a hypothetical array element $n$ of \tcode{x}, and
an object of type \tcode{T} that is not an array element
is considered to belong to an array with one element of type \tcode{T}.
The value representation of
@@ -5517,7 +5550,7 @@
A pointer value $P$ is
\indextext{value!valid in the context of an evaluation}%
\defn{valid in the context of} an evaluation $E$
-if $P$ is a null pointer value, or
+if $P$ is a pointer to function or a null pointer value, or
if it is a pointer to or past the end of an object $O$ and
$E$ happens before the end of the duration of the region of storage for $O$.
If a pointer value $P$ is used in an evaluation $E$ and
@@ -6039,13 +6072,30 @@
\end{note}
The value computations of the operands of an
operator are sequenced before the value computation of the result of the
-operator. If a
+operator.
+The behavior is undefined if
+\begin{itemize}
+\item
\indextext{side effects}%
-side effect on a memory location\iref{intro.memory} is unsequenced
-relative to either another side effect on the same memory location or
+a side effect on a memory location\iref{intro.memory} or
+\item
+starting or ending the lifetime of an object in a memory location
+\end{itemize}
+is unsequenced relative to
+\begin{itemize}
+\item
+another side effect on the same memory location,
+\item
+starting or ending the lifetime of an object occupying storage that
+overlaps with the memory location, or
+\item
a value computation using the value of any object in the same memory location,
-and they are not potentially concurrent\iref{intro.multithread},
-the behavior is undefined.
+\end{itemize}
+and the two evaluations are not potentially concurrent\iref{intro.multithread}.
+\begin{note}
+Starting the lifetime of an object in a memory location can end the lifetime of
+objects in other memory locations\iref{basic.life}.
+\end{note}
\begin{note}
The next subclause imposes similar, but more complex restrictions on
potentially concurrent computations.
@@ -6059,6 +6109,9 @@
i = i++ + 1; // the value of \tcode{i} is incremented
i = i++ + i; // undefined behavior
i = i + 1; // the value of \tcode{i} is incremented
+
+ union U { int x, y; } u;
+ (u.x = 1, 0) + (u.y = 2, 0); // undefined behavior
}
\end{codeblock}
\end{example}
@@ -6069,8 +6122,13 @@
the postfix expression designating the called function
are sequenced before every expression or statement
in the body of the called function.
-For each function invocation or
-evaluation of an \grammarterm{await-expression} \placeholder{F},
+For each
+\begin{itemize}
+\item function invocation,
+\item evaluation of an \grammarterm{await-expression}\iref{expr.await}, or
+\item evaluation of a \grammarterm{throw-expression}\iref{expr.throw}
+\end{itemize}
+\placeholder{F},
each evaluation that does not occur within \placeholder{F} but
is evaluated on the same thread and as part of the same signal handler (if any)
is either sequenced before all evaluations that occur within \placeholder{F}
@@ -6169,9 +6227,25 @@
\end{note}
\pnum
-Two expression evaluations \defn{conflict} if one of them modifies a memory
-location\iref{intro.memory} and the other one reads or modifies the same
-memory location.
+Two expression evaluations \defn{conflict} if one of them
+\begin{itemize}
+\item
+modifies\iref{defns.access} a memory location\iref{intro.memory} or
+\item
+starts or ends the lifetime of an object in a memory location
+\end{itemize}
+and the other one
+\begin{itemize}
+\item
+reads or modifies the same memory location or
+\item
+starts or ends the lifetime of an object occupying storage that
+overlaps with the memory location.
+\end{itemize}
+\begin{note}
+A modification can still conflict
+even if it does not alter the value of any bits.
+\end{note}
\pnum
The library defines a number of atomic operations\iref{atomics} and
@@ -6884,7 +6958,7 @@
\pnum
\indextext{initialization!constant}%
\defnx{Constant initialization}{constant initialization} is performed
-if a variable or temporary object with static or thread storage duration
+if a variable with static or thread storage duration
is constant-initialized\iref{expr.const}.
\indextext{initialization!zero-initialization}%
If constant initialization is not performed, a variable with static
diff --git a/source/classes.tex b/source/classes.tex
index d5d733168e..c534b96c0a 100644
--- a/source/classes.tex
+++ b/source/classes.tex
@@ -172,15 +172,6 @@
\item that has a trivial, non-deleted destructor\iref{class.dtor}.
\end{itemize}
-\pnum
-A \defnadj{trivial}{class} is a class that is trivially copyable and
-has one or more eligible default constructors\iref{class.default.ctor},
-all of which are trivial.
-\begin{note}
-In particular, a trivially copyable or trivial class does not have
-virtual functions or virtual base classes.
-\end{note}
-
\pnum
A class \tcode{S} is a \defnadj{standard-layout}{class} if it:
\begin{itemize}
@@ -272,25 +263,25 @@
\pnum
\begin{example}
\begin{codeblock}
-struct N { // neither trivial nor standard-layout
+struct N { // neither trivially copyable nor standard-layout
int i;
int j;
virtual ~N();
};
-struct T { // trivial but not standard-layout
+struct T { // trivially copyable but not standard-layout
int i;
private:
int j;
};
-struct SL { // standard-layout but not trivial
+struct SL { // standard-layout but not trivially copyable
int i;
int j;
~SL();
};
-struct POD { // both trivial and standard-layout
+struct POD { // both trivially copyable and standard-layout
int i;
int j;
};
@@ -492,8 +483,7 @@
\begin{bnf}
\nontermdef{virt-specifier-seq}\br
- virt-specifier\br
- virt-specifier-seq virt-specifier
+ virt-specifier \opt{virt-specifier-seq}
\end{bnf}
\begin{bnf}
@@ -1231,28 +1221,28 @@
of reference type,
\item any non-variant non-static data member of const-qualified type
-(or possibly multi-dimensional array thereof)
+(or possibly multidimensional array thereof)
with no \grammarterm{brace-or-equal-initializer}
is not const-default-constructible\iref{dcl.init},
\item \tcode{X} is a union and all of its variant members are of const-qualified
-type (or possibly multi-dimensional array thereof),
+type (or possibly multidimensional array thereof),
\item \tcode{X} is a non-union class and all members of any anonymous union member are
-of const-qualified type (or possibly multi-dimensional array thereof),
+of const-qualified type (or possibly multidimensional array thereof),
\item any potentially constructed subobject, except for a non-static data member
with a \grammarterm{brace-or-equal-initializer}
or a variant member of a union where another non-static data member
has a \grammarterm{brace-or-equal-initializer},
-has class type \tcode{M} (or possibly multi-dimensional array thereof)
+has class type \tcode{M} (or possibly multidimensional array thereof)
and overload resolution\iref{over.match}
as applied to find \tcode{M}'s corresponding constructor
either does not result in a usable candidate\iref{over.match.general}
or, in the case of a variant member, selects a non-trivial function, or
\item any potentially constructed subobject has
-class type \tcode{M} (or possibly multi-dimensional array thereof) and
+class type \tcode{M} (or possibly multidimensional array thereof) and
\tcode{M} has
a destructor that is deleted or inaccessible from the defaulted default
constructor.
@@ -1519,14 +1509,14 @@
\tcode{X} is defined as deleted\iref{dcl.fct.def.delete} if \tcode{X} has:
\begin{itemize}
\item a potentially constructed subobject of type
- \tcode{M} (or possibly multi-dimensional array thereof) for which
+ \tcode{M} (or possibly multidimensional array thereof) for which
overload resolution\iref{over.match}, as applied to find
\tcode{M}'s corresponding constructor,
either does not result in a usable candidate\iref{over.match.general} or,
in the case of a variant member, selects a non-trivial function,
\item any potentially constructed subobject of
- class type \tcode{M} (or possibly multi-dimensional array thereof)
+ class type \tcode{M} (or possibly multidimensional array thereof)
where \tcode{M} has
a destructor that is deleted or inaccessible from the defaulted
constructor, or,
@@ -1789,12 +1779,12 @@
class \tcode{X} is defined as deleted if \tcode{X} has:
\begin{itemize}
\item a non-static data member of \keyword{const} non-class
- type (or possibly multi-dimensional array thereof), or
+ type (or possibly multidimensional array thereof), or
\item a non-static data member of reference type, or
\item a direct non-static data member of class type \tcode{M}
- (or possibly multi-dimensional array thereof) or
+ (or possibly multidimensional array thereof) or
a direct base class \tcode{M}
that cannot be copied/moved because overload resolution
\iref{over.match}, as applied to find \tcode{M}'s corresponding
@@ -2033,7 +2023,7 @@
\tcode{X} is defined as deleted if
\begin{itemize}
\item any potentially constructed subobject has class type
- \tcode{M} (or possibly multi-dimensional array thereof) and
+ \tcode{M} (or possibly multidimensional array thereof) and
\tcode{M} has a destructor that is deleted or
is inaccessible from the defaulted destructor or,
in the case of a variant member, is non-trivial,
@@ -2378,11 +2368,10 @@
\end{note}
\pnum
-A non-explicit copy/move constructor\iref{class.copy.ctor} is
-a converting constructor.
\begin{note}
-An implicitly-declared copy/move constructor is not an explicit constructor;
-it can be called for implicit type conversions.
+A non-explicit copy/move constructor\iref{class.copy.ctor},
+including one implicitly declared,
+is a converting constructor.
\end{note}
\rSec3[class.conv.fct]{Conversion functions}%
@@ -3331,13 +3320,13 @@
\pnum
\indextext{nested class!local class}%
-If class \tcode{X} is a local class, a nested class \tcode{Y} may be
-declared in class \tcode{X} and later defined in the definition of class
-\tcode{X} or be later defined in the same scope as the definition of
-class \tcode{X}.
\indextext{restriction!local class}%
A class nested within
a local class is a local class.
+A member of a local class \tcode{X} shall be
+declared only in the definition of \tcode{X} or,
+if the member is a nested class,
+in the nearest enclosing block scope of \tcode{X}.
\pnum
\indextext{restriction!static member local class}%
@@ -5942,7 +5931,7 @@
B bobj; // definition of \tcode{bobj}
extern X xobj;
-int* p3 = &xobj.i; // OK, \tcode{X} is a trivial class
+int* p3 = &xobj.i; // OK, all constructors of \tcode{X} are trivial
X xobj;
\end{codeblock}
For another example,
@@ -6178,25 +6167,26 @@
\indextext{constructor!copy!elision}%
\indextext{constructor!move!elision}%
When certain criteria are met, an implementation is
-allowed to omit the copy/move construction of a class object,
-even if the constructor selected for the copy/move operation and/or the
+allowed to omit the creation of a class object from
+a source object of the same type (ignoring cv-qualification),
+even if the selected constructor and/or the
destructor for the object have
\indextext{side effects}%
side effects. In such cases, the
implementation treats the source and target of the
-omitted copy/move operation as simply two different ways of
+omitted initialization as simply two different ways of
referring to the same object. If the first parameter of the
selected constructor is an rvalue reference to the object's type,
the destruction of that object occurs when the target would have been destroyed;
otherwise, the destruction occurs at the later of the times when the
two objects would have been destroyed without the
optimization.
-\begin{footnote}
+\begin{note}
Because only one object is destroyed instead of two,
-and one copy/move constructor
-is not executed, there is still one object destroyed for each one constructed.
-\end{footnote}
-This elision of copy/move operations, called
+and the creation of one object is omitted,
+there is still one object destroyed for each one constructed.
+\end{note}
+This elision of object creation, called
\indexdefn{copy elision|see{constructor, copy, elision}}%
\indexdefn{elision!copy|see{constructor, copy, elision}}%
\indexdefn{constructor!copy!elision}\indexdefn{constructor!move!elision}\term{copy elision},
@@ -6204,34 +6194,35 @@
following circumstances (which may be combined to
eliminate multiple copies):
\begin{itemize}
-\item in a \tcode{return} statement in a function with a class return type,
+\item in a \tcode{return} statement\iref{stmt.return} in
+a function with a class return type,
when the \grammarterm{expression} is the name of a non-volatile
-object with automatic storage duration (other than a function parameter or a variable
+object $o$ with automatic storage duration (other than a function parameter or a variable
introduced by the \grammarterm{exception-declaration} of a
-\grammarterm{handler}\iref{except.handle})
-with the same type (ignoring cv-qualification) as
-the function return type, the copy/move operation can be
-omitted by constructing the object directly
-into the function call's return object
+\grammarterm{handler}\iref{except.handle}),
+the copy-initialization of the result object can be
+omitted by constructing $o$ directly
+into the function call's result object;
\item in a \grammarterm{throw-expression}\iref{expr.throw}, when the operand
-is the name of a non-volatile object with automatic storage duration
-(other than a function or catch-clause parameter)
+is the name of a non-volatile object $o$ with automatic storage duration
+(other than a function parameter or
+a variable introduced by
+the \grammarterm{exception-declaration} of a \grammarterm{handler})
that belongs to a scope that does not contain
the innermost enclosing \grammarterm{compound-statement}
associated with a \grammarterm{try-block} (if there is one),
-the copy/move operation can be omitted by
-constructing the object directly into the exception object
+the copy-initialization of the exception object can be omitted by
+constructing $o$ directly into the exception object;
\item in a coroutine\iref{dcl.fct.def.coroutine}, a copy of a coroutine parameter
can be omitted and references to that copy replaced with references to the
corresponding parameter if the meaning of the program will be unchanged except for
-the execution of a constructor and destructor for the parameter copy object
+the execution of a constructor and destructor for the parameter copy object;
\item when the \grammarterm{exception-declaration} of a
-\grammarterm{handler}\iref{except.handle} declares an object of the same
-type (except for cv-qualification) as the exception
-object\iref{except.throw}, the copy operation can be omitted by treating
+\grammarterm{handler}\iref{except.handle} declares an object $o$,
+the copy-initialization of $o$ can be omitted by treating
the \grammarterm{exception-declaration} as an alias for the exception
object if the meaning of the program will be unchanged except for the execution
of constructors and destructors for the object declared by the
diff --git a/source/compatibility.tex b/source/compatibility.tex
index 93baac8554..51ba5f6b24 100644
--- a/source/compatibility.tex
+++ b/source/compatibility.tex
@@ -33,6 +33,25 @@
\end{codeblock}
\end{example}
+\diffref{expr.rel,expr.eq}
+\change
+Comparing two objects of array type is no longer valid.
+\rationale
+The old behavior was confusing since it compared not the contents of the two
+arrays, but their addresses.
+\effect
+A valid \CppXXIII{} program directly comparing two array objects is rejected as
+ill-formed in this document.
+\begin{example}
+\begin{codeblock}
+int arr1[5];
+int arr2[5];
+bool same = arr1 == arr2; // ill-formed; previously well-formed
+bool idem = arr1 == +arr2; // compare addresses
+bool less = arr1 < +arr2; // compare addresses, unspecified result
+\end{codeblock}
+\end{example}
+
\diffref{expr.delete}
\change
Calling \tcode{delete} on a pointer to an incomplete class is ill-formed.
@@ -122,6 +141,38 @@
\end{codeblock}
\end{example}
+\diffref{temp.deduct.call}
+\change
+Template argument deduction from overload sets succeeds in more cases.
+\rationale
+Allow consideration of constraints to disambiguate overload sets
+used as parameters in function calls.
+\effect
+Valid \CppXXIII{} code may become ill-formed.
+\begin{example}
+\begin{codeblock}
+template
+void f(T &&, void (*)(T &&));
+
+void g(int &); // \#1
+inline namespace A {
+ void g(short &&); // \#2
+}
+inline namespace B {
+ void g(short &&); // \#3
+}
+
+void q() {
+ int x;
+ f(x, g); // ill-formed; previously well-formed, deducing \tcode{T = int\&}
+}
+\end{codeblock}
+There is no change to the applicable deduction rules for
+the individual \tcode{g} candidates:
+Type deduction from \#1 does not succeed;
+type deductions from \#2 and \#3 both succeed.
+\end{example}
+
\rSec2[diff.cpp23.library]{\ref{library}: library introduction}
\diffref{headers}
@@ -135,7 +186,8 @@
\libheaderrefx{hazard_pointer}{hazard.pointer.syn},
\libheaderrefx{inplace_vector}{inplace.vector.syn},
\libheaderref{linalg},
-\libheaderref{rcu}, and
+\libheaderref{rcu},
+\libheaderref{simd}, and
\libheaderrefx{text_encoding}{text.encoding.syn}.
Valid \CppXXIII{} code that \tcode{\#include}{s} headers with these names may be
invalid in this revision of \Cpp{}.
@@ -2893,6 +2945,30 @@
\howwide
Seldom.
+\diffref{expr.rel,expr.eq}
+\change
+C allows directly comparing two objects of array type; \Cpp{} does not.
+\rationale
+The behavior is confusing because it compares not the contents of the two
+arrays, but their addresses.
+\effect
+Deletion of semantically well-defined feature that had unspecified behavior
+in common use cases.
+\difficulty
+Violations will be diagnosed by the \Cpp{} translator. The original behavior
+can be replicated by explicitly casting either array to a pointer, such as by
+using a unary \tcode{+}.
+\begin{example}
+\begin{codeblock}
+int arr1[5];
+int arr2[5];
+int same = arr1 == arr2; // valid C, ill-formed C++
+int idem = arr1 == +arr2; // valid in both C and C++
+\end{codeblock}
+\end{example}
+\howwide
+Rare.
+
\diffref{expr.cond,expr.ass,expr.comma}
\indextext{conversion!lvalue-to-rvalue}%
\indextext{rvalue!lvalue conversion to}%
diff --git a/source/config.tex b/source/config.tex
index 8253638e61..c67f5c5823 100644
--- a/source/config.tex
+++ b/source/config.tex
@@ -1,13 +1,16 @@
%!TEX root = std.tex
%%--------------------------------------------------
%% Version numbers
-\newcommand{\docno}{N4993}
-\newcommand{\prevdocno}{N4988}
+\newcommand{\docno}{N5001}
+\newcommand{\prevdocno}{N4993}
\newcommand{\cppver}{202302L}
%% Release date
\newcommand{\reldate}{\today}
+%% Core chapters
+\newcommand{\lastcorechapter}{cpp}
+
%% Library chapters
\newcommand{\firstlibchapter}{support}
\newcommand{\lastlibchapter}{exec}
diff --git a/source/containers.tex b/source/containers.tex
index f43cc92f3b..c7cc854452 100644
--- a/source/containers.tex
+++ b/source/containers.tex
@@ -1463,7 +1463,7 @@
\pnum
\expects
\tcode{T} is \oldconcept{EmplaceConstructible} into \tcode{X} from \tcode{args}.
-For \tcode{vector} and \tcode{deque},
+For \tcode{vector}, \tcode{inplace_vector}, and \tcode{deque},
\tcode{T} is also \oldconcept{MoveInsertable} into \tcode{X} and
\oldconcept{MoveAssignable}.
@@ -1478,8 +1478,7 @@
\pnum
\returns
-An iterator that points to
-the new element constructed from \tcode{args} into \tcode{a}.
+An iterator that points to the new element.
\end{itemdescr}
\indexcont{insert}%
@@ -3873,7 +3872,7 @@
\pnum
\complexity
-Logarithmic,
+Logarithmic.
\end{itemdescr}
\indexordmem{upper_bound}%
@@ -7200,10 +7199,13 @@
\rSec3[forward.list.modifiers]{Modifiers}
\pnum
-None of the overloads of \tcode{insert_after} shall affect the validity of iterators and
-references, and \tcode{erase_after} shall invalidate only iterators and references to
-the erased elements. If an exception is thrown during \tcode{insert_after} there shall
-be no effect. Inserting \tcode{n} elements into a \tcode{forward_list} is linear in
+The member functions in this subclause
+do not affect the validity of iterators and references
+when inserting elements, and when erasing elements
+invalidate iterators and references to the erased elements only.
+If an exception is thrown by any of these member functions
+there is no effect on the container.
+Inserting \tcode{n} elements into a \tcode{forward_list} is linear in
\tcode{n}, and the number of calls to the copy or move constructor of \tcode{T} is
exactly equal to \tcode{n}. Erasing \tcode{n} elements from a \tcode{forward_list} is
linear in \tcode{n} and the number of calls to the destructor of type \tcode{T} is
@@ -7780,7 +7782,7 @@
\begin{itemdescr}
\pnum
\effects
-Equivalent to: \tcode{return erase_if(c, [\&](auto\& elem) \{ return elem == value; \});}
+Equivalent to: \tcode{return erase_if(c, [\&](const auto\& elem) -> bool \{ return elem == value; \});}
\end{itemdescr}
\indexlibrarymember{erase_if}{forward_list}%
@@ -8215,7 +8217,6 @@
\begin{itemdecl}
iterator erase(const_iterator position);
iterator erase(const_iterator first, const_iterator last);
-
void pop_front();
void pop_back();
void clear() noexcept;
@@ -8565,7 +8566,7 @@
\begin{itemdescr}
\pnum
\effects
-Equivalent to: \tcode{return erase_if(c, [\&](auto\& elem) \{ return elem == value; \});}
+Equivalent to: \tcode{return erase_if(c, [\&](const auto\& elem) -> bool \{ return elem == value; \});}
\end{itemdescr}
\indexlibrarymember{erase_if}{list}%
@@ -8741,8 +8742,8 @@
// element access
constexpr reference operator[](size_type n);
constexpr const_reference operator[](size_type n) const;
- constexpr const_reference at(size_type n) const;
constexpr reference at(size_type n);
+ constexpr const_reference at(size_type n) const;
constexpr reference front();
constexpr const_reference front() const;
constexpr reference back();
@@ -9256,8 +9257,6 @@
// bit reference
class @\libmember{reference}{vector}@ {
- constexpr reference() noexcept;
-
public:
constexpr reference(const reference&) = default;
constexpr ~reference();
@@ -9323,8 +9322,8 @@
// element access
constexpr reference operator[](size_type n);
constexpr const_reference operator[](size_type n) const;
- constexpr const_reference at(size_type n) const;
constexpr reference at(size_type n);
+ constexpr const_reference at(size_type n) const;
constexpr reference front();
constexpr const_reference front() const;
constexpr reference back();
@@ -9537,8 +9536,9 @@
\pnum
For any $\tcode{N} > 0$,
-if \tcode{is_trivial_v} is \tcode{false}, then
-no \tcode{inplace_vector} member functions
+if \tcode{T} is not trivially copyable or
+\tcode{is_trivially_default_constructible_v} is \tcode{false},
+then no \tcode{inplace_vector} member functions
are usable in constant expressions.
\pnum
@@ -9638,7 +9638,7 @@
constexpr const_reverse_iterator crbegin() const noexcept;
constexpr const_reverse_iterator crend() const noexcept;
- // \ref{inplace.vector.capacity} size/capacity
+ // \ref{inplace.vector.capacity}, size/capacity
constexpr bool empty() const noexcept;
constexpr size_type size() const noexcept;
static constexpr size_type max_size() noexcept;
@@ -15857,12 +15857,12 @@
class value_compare {
private:
- key_compare comp; // \expos
- value_compare(key_compare c) : comp(c) { } // \expos
+ key_compare @\exposid{comp}@; // \expos
+ value_compare(key_compare c) : @\exposid{comp}@(c) { } // \expos
public:
bool operator()(const_reference x, const_reference y) const {
- return comp(x.first, y.first);
+ return @\exposid{comp}@(x.first, y.first);
}
};
@@ -15875,7 +15875,7 @@
flat_map() : flat_map(key_compare()) { }
explicit flat_map(const key_compare& comp)
- : c(), compare(comp) { }
+ : @\exposid{c}@(), @\exposid{compare}@(comp) { }
flat_map(key_container_type key_cont, mapped_container_type mapped_cont,
const key_compare& comp = key_compare());
@@ -15885,12 +15885,12 @@
template
flat_map(InputIterator first, InputIterator last, const key_compare& comp = key_compare())
- : c(), compare(comp) { insert(first, last); }
+ : @\exposid{c}@(), @\exposid{compare}@(comp) { insert(first, last); }
template
flat_map(sorted_unique_t s, InputIterator first, InputIterator last,
const key_compare& comp = key_compare())
- : c(), compare(comp) { insert(s, first, last); }
+ : @\exposid{c}@(), @\exposid{compare}@(comp) { insert(s, first, last); }
template<@\exposconcept{container-compatible-range}@ R>
flat_map(from_range_t fr, R&& rg)
@@ -16055,8 +16055,8 @@
key_compare key_comp() const;
value_compare value_comp() const;
- const key_container_type& keys() const noexcept { return c.keys; }
- const mapped_container_type& values() const noexcept { return c.values; }
+ const key_container_type& keys() const noexcept { return @\exposid{c}@.keys; }
+ const mapped_container_type& values() const noexcept { return @\exposid{c}@.values; }
// map operations
iterator find(const key_type& x);
@@ -16094,11 +16094,11 @@
{ x.swap(y); }
private:
- containers c; // \expos
- key_compare compare; // \expos
+ containers @\exposid{c}@; // \expos
+ key_compare @\exposid{compare}@; // \expos
- struct key_equiv { // \expos
- key_equiv(key_compare c) : comp(c) { }
+ struct @\exposid{key-equiv}@ { // \expos
+ @\exposid{key-equiv}@(key_compare c) : comp(c) { }
bool operator()(const_reference x, const_reference y) const {
return !comp(x.first, y.first) && !comp(y.first, x.first);
}
@@ -16190,17 +16190,17 @@
\pnum
\effects
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};
+\tcode{\exposid{c}.keys} with \tcode{std::move(key_cont)},
+\tcode{\exposid{c}.values} with \tcode{std::move(mapped_cont)}, and
+\exposid{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}
-auto zv = views::zip(c.keys, c.values);
-auto it = ranges::unique(zv, key_equiv(compare)).begin();
+auto zv = views::zip(@\exposid{c}@.keys, @\exposid{c}@.values);
+auto it = ranges::unique(zv, @\exposid{key-equiv}@(@\exposid{compare}@)).begin();
auto dist = distance(zv.begin(), it);
-c.keys.erase(c.keys.begin() + dist, c.keys.end());
-c.values.erase(c.values.begin() + dist, c.values.end());
+@\exposid{c}@.keys.erase(@\exposid{c}@.keys.begin() + dist, @\exposid{c}@.keys.end());
+@\exposid{c}@.values.erase(@\exposid{c}@.values.begin() + dist, @\exposid{c}@.values.end());
\end{codeblock}
\pnum
@@ -16220,9 +16220,9 @@
\pnum
\effects
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}.
+\tcode{\exposid{c}.keys} with \tcode{std::move(key_cont)},
+\tcode{\exposid{c}.values} with \tcode{std::move(mapped_cont)}, and
+\exposid{compare} with \tcode{comp}.
\pnum
\complexity
@@ -16251,7 +16251,7 @@
\effects
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
+except that \tcode{\exposid{c}.keys} and \tcode{\exposid{c}.values} are constructed with
uses-allocator construction\iref{allocator.uses.construction}.
\pnum
@@ -16276,7 +16276,7 @@
\effects
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
+except that \tcode{\exposid{c}.keys} and \tcode{\exposid{c}.values} are constructed
with uses-allocator construction\iref{allocator.uses.construction}.
\pnum
@@ -16322,7 +16322,7 @@
\pnum
\effects
Equivalent to the corresponding non-allocator constructors
-except that \tcode{c.keys} and \tcode{c.values} are constructed
+except that \tcode{\exposid{c}.keys} and \tcode{\exposid{c}.values} are constructed
with uses-allocator construction\iref{allocator.uses.construction}.
\end{itemdescr}
@@ -16336,7 +16336,7 @@
\begin{itemdescr}
\pnum
\returns
-\tcode{c.keys.size()}.
+\tcode{\exposid{c}.keys.size()}.
\end{itemdescr}
\indexlibrarymember{max_size}{flat_map}%
@@ -16347,7 +16347,7 @@
\begin{itemdescr}
\pnum
\returns
-\tcode{min(c.keys.max_size(), c.values.max_size())}.
+\tcode{min(\exposid{c}.keys.max_size(), \exposid{c}.values.max_size())}.
\end{itemdescr}
\rSec3[flat.map.access]{Access}
@@ -16464,10 +16464,10 @@
\tcode{*this} is unchanged.
Otherwise, equivalent to:
\begin{codeblock}
-auto key_it = ranges::upper_bound(c.keys, t.first, compare);
-auto value_it = c.values.begin() + distance(c.keys.begin(), key_it);
-c.keys.insert(key_it, std::move(t.first));
-c.values.insert(value_it, std::move(t.second));
+auto key_it = ranges::upper_bound(@\exposid{c}@.keys, t.first, @\exposid{compare}@);
+auto value_it = @\exposid{c}@.values.begin() + distance(@\exposid{c}@.keys.begin(), key_it);
+@\exposid{c}@.keys.insert(key_it, std::move(t.first));
+@\exposid{c}@.values.insert(value_it, std::move(t.second));
\end{codeblock}
\pnum
@@ -16505,12 +16505,12 @@
\begin{itemdescr}
\pnum
\effects
-Adds elements to \tcode{c} as if by:
+Adds elements to \exposid{c} as if by:
\begin{codeblock}
for (; first != last; ++first) {
value_type value = *first;
- c.keys.insert(c.keys.end(), std::move(value.first));
- c.values.insert(c.values.end(), std::move(value.second));
+ @\exposid{c}@.keys.insert(@\exposid{c}@.keys.end(), std::move(value.first));
+ @\exposid{c}@.values.insert(@\exposid{c}@.values.end(), std::move(value.second));
}
\end{codeblock}
Then, sorts the range of newly inserted elements
@@ -16519,11 +16519,11 @@
the sorted range of pre-existing elements into a single sorted range; and
finally erases the duplicate elements as if by:
\begin{codeblock}
-auto zv = views::zip(c.keys, c.values);
-auto it = ranges::unique(zv, key_equiv(compare)).begin();
+auto zv = views::zip(@\exposid{c}@.keys, @\exposid{c}@.values);
+auto it = ranges::unique(zv, @\exposid{key-equiv}@(@\exposid{compare}@)).begin();
auto dist = distance(zv.begin(), it);
-c.keys.erase(c.keys.begin() + dist, c.keys.end());
-c.values.erase(c.values.begin() + dist, c.values.end());
+@\exposid{c}@.keys.erase(@\exposid{c}@.keys.begin() + dist, @\exposid{c}@.keys.end());
+@\exposid{c}@.values.erase(@\exposid{c}@.values.begin() + dist, @\exposid{c}@.values.end());
\end{codeblock}
\pnum
@@ -16546,23 +16546,23 @@
\begin{itemdescr}
\pnum
\effects
-Adds elements to \tcode{c} as if by:
+Adds elements to \exposid{c} as if by:
\begin{codeblock}
for (; first != last; ++first) {
value_type value = *first;
- c.keys.insert(c.keys.end(), std::move(value.first));
- c.values.insert(c.values.end(), std::move(value.second));
+ @\exposid{c}@.keys.insert(@\exposid{c}@.keys.end(), std::move(value.first));
+ @\exposid{c}@.values.insert(@\exposid{c}@.values.end(), std::move(value.second));
}
\end{codeblock}
Then, merges the sorted range of newly added elements and
the sorted range of pre-existing elements into a single sorted range; and
finally erases the duplicate elements as if by:
\begin{codeblock}
-auto zv = views::zip(c.keys, c.values);
-auto it = ranges::unique(zv, key_equiv(compare)).begin();
+auto zv = views::zip(@\exposid{c}@.keys, @\exposid{c}@.values);
+auto it = ranges::unique(zv, @\exposid{key-equiv}@(@\exposid{compare}@)).begin();
auto dist = distance(zv.begin(), it);
-c.keys.erase(c.keys.begin() + dist, c.keys.end());
-c.values.erase(c.values.begin() + dist, c.values.end());
+@\exposid{c}@.keys.erase(@\exposid{c}@.keys.begin() + dist, @\exposid{c}@.keys.end());
+@\exposid{c}@.values.erase(@\exposid{c}@.values.begin() + dist, @\exposid{c}@.values.end());
\end{codeblock}
\pnum
@@ -16583,11 +16583,11 @@
\begin{itemdescr}
\pnum
\effects
-Adds elements to \tcode{c} as if by:
+Adds elements to \exposid{c} as if by:
\begin{codeblock}
for (const auto& e : rg) {
- c.keys.insert(c.keys.end(), e.first);
- c.values.insert(c.values.end(), e.second);
+ @\exposid{c}@.keys.insert(@\exposid{c}@.keys.end(), e.first);
+ @\exposid{c}@.values.insert(@\exposid{c}@.values.end(), e.second);
}
\end{codeblock}
Then, sorts the range of newly inserted elements
@@ -16596,11 +16596,11 @@
the sorted range of pre-existing elements into a single sorted range; and
finally erases the duplicate elements as if by:
\begin{codeblock}
-auto zv = views::zip(c.keys, c.values);
-auto it = ranges::unique(zv, key_equiv(compare)).begin();
+auto zv = views::zip(@\exposid{c}@.keys, @\exposid{c}@.values);
+auto it = ranges::unique(zv, @\exposid{key-equiv}@(@\exposid{compare}@)).begin();
auto dist = distance(zv.begin(), it);
-c.keys.erase(c.keys.begin() + dist, c.keys.end());
-c.values.erase(c.values.begin() + dist, c.values.end());
+@\exposid{c}@.keys.erase(@\exposid{c}@.keys.begin() + dist, @\exposid{c}@.keys.end());
+@\exposid{c}@.values.erase(@\exposid{c}@.values.begin() + dist, @\exposid{c}@.values.end());
\end{codeblock}
\pnum
@@ -16637,10 +16637,10 @@
\tcode{*this} and \tcode{args...} are unchanged.
Otherwise equivalent to:
\begin{codeblock}
-auto key_it = ranges::upper_bound(c.keys, k, compare);
-auto value_it = c.values.begin() + distance(c.keys.begin(), key_it);
-c.keys.insert(key_it, std::forward(k));
-c.values.emplace(value_it, std::forward(args)...);
+auto key_it = ranges::upper_bound(@\exposid{c}@.keys, k, @\exposid{compare}@);
+auto value_it = @\exposid{c}@.values.begin() + distance(@\exposid{c}@.keys.begin(), key_it);
+@\exposid{c}@.keys.insert(key_it, std::forward(k));
+@\exposid{c}@.values.emplace(value_it, std::forward(args)...);
\end{codeblock}
\pnum
@@ -16694,10 +16694,10 @@
\tcode{*this} and \tcode{args...} are unchanged.
Otherwise equivalent to:
\begin{codeblock}
-auto key_it = ranges::upper_bound(c.keys, k, compare);
-auto value_it = c.values.begin() + distance(c.keys.begin(), key_it);
-c.keys.emplace(key_it, std::forward(k));
-c.values.emplace(value_it, std::forward(args)...);
+auto key_it = ranges::upper_bound(@\exposid{c}@.keys, k, @\exposid{compare}@);
+auto value_it = @\exposid{c}@.values.begin() + distance(@\exposid{c}@.keys.begin(), key_it);
+@\exposid{c}@.keys.emplace(key_it, std::forward(k));
+@\exposid{c}@.values.emplace(value_it, std::forward(args)...);
\end{codeblock}
\pnum
@@ -16824,9 +16824,9 @@
\effects
Equivalent to:
\begin{codeblock}
-ranges::swap(compare, y.compare);
-ranges::swap(c.keys, y.c.keys);
-ranges::swap(c.values, y.c.values);
+ranges::swap(@\exposid{compare}@, y.@\exposid{compare}@);
+ranges::swap(@\exposid{c}@.keys, y.@\exposid{c}@.keys);
+ranges::swap(@\exposid{c}@.values, y.@\exposid{c}@.values);
\end{codeblock}
\end{itemdescr}
@@ -16842,7 +16842,7 @@
\pnum
\returns
-\tcode{std::move(c)}.
+\tcode{std::move(\exposid{c})}.
\end{itemdescr}
\indexlibrarymember{replace}{flat_map}%
@@ -16854,15 +16854,15 @@
\pnum
\expects
\tcode{key_cont.size() == mapped_cont.size()} is \tcode{true},
-the elements of \tcode{key_cont} are sorted with respect to \tcode{compare}, and
+the elements of \tcode{key_cont} are sorted with respect to \exposid{compare}, and
\tcode{key_cont} contains no equal elements.
\pnum
\effects
Equivalent to:
\begin{codeblock}
-c.keys = std::move(key_cont);
-c.values = std::move(mapped_cont);
+@\exposid{c}@.keys = std::move(key_cont);
+@\exposid{c}@.values = std::move(mapped_cont);
\end{codeblock}
\end{itemdescr}
@@ -17040,12 +17040,12 @@
class value_compare {
private:
- key_compare comp; // \expos
- value_compare(key_compare c) : comp(c) { } // \expos
+ key_compare @\exposid{comp}@; // \expos
+ value_compare(key_compare c) : @\exposid{comp}@(c) { } // \expos
public:
bool operator()(const_reference x, const_reference y) const {
- return comp(x.first, y.first);
+ return @\exposid{comp}@(x.first, y.first);
}
};
@@ -17058,7 +17058,7 @@
flat_multimap() : flat_multimap(key_compare()) { }
explicit flat_multimap(const key_compare& comp)
- : c(), compare(comp) { }
+ : @\exposid{c}@(), @\exposid{compare}@(comp) { }
flat_multimap(key_container_type key_cont, mapped_container_type mapped_cont,
const key_compare& comp = key_compare());
@@ -17070,13 +17070,13 @@
template
flat_multimap(InputIterator first, InputIterator last,
const key_compare& comp = key_compare())
- : c(), compare(comp)
+ : @\exposid{c}@(), @\exposid{compare}@(comp)
{ insert(first, last); }
template
flat_multimap(sorted_equivalent_t s, InputIterator first, InputIterator last,
const key_compare& comp = key_compare())
- : c(), compare(comp) { insert(s, first, last); }
+ : @\exposid{c}@(), @\exposid{compare}@(comp) { insert(s, first, last); }
template<@\exposconcept{container-compatible-range}@ R>
flat_multimap(from_range_t fr, R&& rg)
@@ -17209,8 +17209,8 @@
key_compare key_comp() const;
value_compare value_comp() const;
- const key_container_type& keys() const noexcept { return c.keys; }
- const mapped_container_type& values() const noexcept { return c.values; }
+ const key_container_type& keys() const noexcept { return @\exposid{c}@.keys; }
+ const mapped_container_type& values() const noexcept { return @\exposid{c}@.values; }
// map operations
iterator find(const key_type& x);
@@ -17250,8 +17250,8 @@
{ x.swap(y); }
private:
- containers c; // \expos
- key_compare compare; // \expos
+ containers @\exposid{c}@; // \expos
+ key_compare @\exposid{compare}@; // \expos
};
template(args)...},
then inserts \tcode{t} as if by:
\begin{codeblock}
-auto it = ranges::upper_bound(c, t, compare);
-c.insert(it, std::move(t));
+auto it = ranges::upper_bound(@\exposid{c}@, t, @\exposid{compare}@);
+@\exposid{c}@.insert(it, std::move(t));
\end{codeblock}
\pnum
@@ -18715,7 +18715,7 @@
\effects
Adds elements to \exposid{c} as if by:
\begin{codeblock}
-c.insert(c.end(), first, last);
+@\exposid{c}@.insert(@\exposid{c}@.end(), first, last);
\end{codeblock}
Then, sorts the range of newly inserted elements with respect to \exposid{compare},
and merges the resulting sorted range and
@@ -18757,8 +18757,8 @@
\effects
Equivalent to:
\begin{codeblock}
-ranges::swap(compare, y.compare);
-ranges::swap(c, y.c);
+ranges::swap(@\exposid{compare}@, y.@\exposid{compare}@);
+ranges::swap(@\exposid{c}@, y.@\exposid{c}@);
\end{codeblock}
\end{itemdescr}
@@ -18774,7 +18774,7 @@
\pnum
\returns
-\tcode{std::move(c)}.
+\tcode{std::move(\exposid{c})}.
\end{itemdescr}
\indexlibrarymember{replace}{flat_multiset}%
@@ -18789,7 +18789,7 @@
\pnum
\effects
-Equivalent to: \tcode{c = std::move(cont);}
+Equivalent to: \tcode{\exposid{c} = std::move(cont);}
\end{itemdescr}
\rSec3[flat.multiset.erasure]{Erasure}
@@ -19778,6 +19778,10 @@
template
class default_accessor;
+ // \ref{mdspan.accessor.aligned}, class template \tcode{aligned_accessor}
+ template
+ class aligned_accessor;
+
// \ref{mdspan.mdspan}, class template \tcode{mdspan}
template>
@@ -20618,13 +20622,13 @@
\end{codeblock}
\pnum
-Each of \tcode{layout_left}, \tcode{layout_right}, and \tcode{layout_stride}
-meets the layout mapping policy requirements and is a trivial type.
-
-\pnum
-Each specialization of
-\tcode{layout_left_padded} and \tcode{layout_right_padded}
-meets the layout mapping policy requirements and is a trivial type.
+Each of \tcode{layout_left}, \tcode{layout_right}, and \tcode{layout_stride},
+as well as each specialization of
+\tcode{layout_left_padded} and \tcode{layout_right_padded},
+meets the layout mapping policy requirements and is a trivially copyable type.
+Furthermore,
+\tcode{is_trivially_default_constructible_v} is \tcode{true}
+for any such type \tcode{T}.
\rSec4[mdspan.layout.left]{Class template \tcode{layout_left::mapping}}
@@ -20760,7 +20764,7 @@
\indexlibraryctor{layout_left::mapping}%
\begin{itemdecl}
-template
+template
constexpr explicit(!is_convertible_v)
mapping(const layout_right::mapping& other) noexcept;
\end{itemdecl}
@@ -20831,8 +20835,7 @@
\pnum
\effects
-Effects: Direct-non-list-initializes
-\tcode{extents_} with \tcode{other.extents()}.
+Direct-non-list-initializes \tcode{extents_} with \tcode{other.extents()}.
\end{itemdescr}
\indexlibraryctor{layout_left::mapping}%
@@ -23151,6 +23154,195 @@
Equivalent to: \tcode{return p + i;}
\end{itemdescr}
+\rSec4[mdspan.accessor.aligned]{Class template \tcode{aligned_accessor}}
+
+\rSec5[mdspan.accessor.aligned.overview]{Overview}
+
+\begin{codeblock}
+namespace std {
+ template
+ struct @\libglobal{aligned_accessor}@ {
+ using offset_policy = default_accessor;
+ using element_type = ElementType;
+ using reference = ElementType&;
+ using data_handle_type = ElementType*;
+
+ static constexpr size_t byte_alignment = ByteAlignment;
+
+ constexpr aligned_accessor() noexcept = default;
+ template
+ constexpr aligned_accessor(
+ aligned_accessor) noexcept;
+ template
+ constexpr explicit aligned_accessor(default_accessor) noexcept;
+
+ template
+ constexpr operator default_accessor() const noexcept;
+
+ constexpr reference access(data_handle_type p, size_t i) const noexcept;
+
+ constexpr typename offset_policy::data_handle_type offset(
+ data_handle_type p, size_t i) const noexcept;
+ };
+}
+\end{codeblock}
+
+\pnum
+\mandates
+\begin{itemize}
+\item \tcode{byte_alignment} is a power of two, and
+\item \tcode{byte_alignment >= alignof(ElementType)} is \tcode{true}.
+\end{itemize}
+
+\pnum
+\tcode{aligned_accessor} meets the accessor policy requirements.
+
+\pnum
+\tcode{ElementType} is required to be a complete object type
+that is neither an abstract class type nor an array type.
+
+\pnum
+Each specialization of \tcode{aligned_accessor} is
+a trivially copyable type that models \libconcept{semiregular}.
+
+\pnum
+\range{0}{$n$} is an accessible range
+for an object \tcode{p} of type \tcode{data_handle_type} and
+an object of type \tcode{aligned_accessor} if and only if
+\begin{itemize}
+\item
+\range{p}{p + $n$} is a valid range, and,
+\item
+if $n$ is greater than zero,
+then \tcode{is_sufficiently_aligned(p)} is \tcode{true}.
+\end{itemize}
+
+\pnum
+\begin{example}
+The following function \tcode{compute}
+uses \tcode{is_sufficiently_aligned} to check
+whether a given \tcode{mdspan} with \tcode{default_accessor} has
+a data handle with sufficient alignment
+to be used with \tcode{aligned_accessor}.
+If so, the function dispatches to
+a function \tcode{compute_using_fourfold_overalignment}
+that requires fourfold over-alignment of arrays,
+but can therefore use hardware-specific instructions,
+such as four-wide SIMD (Single Instruction Multiple Data) instructions.
+Otherwise, \tcode{compute} dispatches to a
+possibly less optimized function \tcode{compute_without_requiring_overalignment}
+that has no over-alignment requirement.
+\begin{codeblock}
+void compute_using_fourfold_overalignment(
+ std::mdspan, std::layout_right,
+ std::aligned_accessor> x);
+
+void compute_without_requiring_overalignment(
+ std::mdspan, std::layout_right> x);
+
+void compute(std::mdspan> x) {
+ constexpr auto byte_alignment = 4 * sizeof(float);
+ auto accessor = std::aligned_accessor{};
+ auto x_handle = x.data_handle();
+
+ if (std::is_sufficiently_aligned(x_handle)) {
+ compute_using_fourfold_overalignment(std::mdspan{x_handle, x.mapping(), accessor});
+ } else {
+ compute_without_requiring_overalignment(x);
+ }
+}
+\end{codeblock}
+\end{example}
+
+\rSec5[mdspan.accessor.aligned.members]{Members}
+
+\indexlibraryctor{aligned_accessor}%
+\begin{itemdecl}
+template
+ constexpr aligned_accessor(aligned_accessor) noexcept;
+\end{itemdecl}
+
+\begin{itemdescr}
+\pnum
+\constraints
+\begin{itemize}
+\item
+\tcode{is_convertible_v}
+is \tcode{true}.
+\item
+\tcode{OtherByteAlignment >= byte_alignment} is \tcode{true}.
+\end{itemize}
+
+\pnum
+\effects
+None.
+\end{itemdescr}
+
+\indexlibraryctor{aligned_accessor}%
+\begin{itemdecl}
+template
+ constexpr explicit aligned_accessor(default_accessor) noexcept;
+\end{itemdecl}
+
+\begin{itemdescr}
+\pnum
+\constraints
+\tcode{is_convertible_v}
+is \tcode{true}.
+
+\pnum
+\effects
+None.
+\end{itemdescr}
+
+\indexlibrarymember{access}{aligned_accessor}%
+\begin{itemdecl}
+constexpr reference access(data_handle_type p, size_t i) const noexcept;
+\end{itemdecl}
+
+\begin{itemdescr}
+\pnum
+\expects
+\range{0}{i + 1} is an accessible range for \tcode{p} and \tcode{*this}.
+
+\pnum
+\effects
+Equivalent to: \tcode{return assume_aligned(p)[i];}
+\end{itemdescr}
+
+\indexlibrarymember{operator default_accessor}{aligned_accessor}%
+\begin{itemdecl}
+template
+ constexpr operator default_accessor() const noexcept;
+\end{itemdecl}
+
+\begin{itemdescr}
+\pnum
+\constraints
+\tcode{is_convertible_v}
+is \tcode{true}.
+
+\pnum
+\effects
+Equivalent to: \tcode{return \{\};}
+\end{itemdescr}
+
+\indexlibrarymember{offset}{aligned_accessor}%
+\begin{itemdecl}
+constexpr typename offset_policy::data_handle_type
+ offset(data_handle_type p, size_t i) const noexcept;
+\end{itemdecl}
+
+\begin{itemdescr}
+\pnum
+\expects
+\range{0}{i + 1} is an accessible range for \tcode{p} and \tcode{*this}.
+
+\pnum
+\effects
+Equivalent to: \tcode{return assume_aligned(p) + i;}
+\end{itemdescr}
+
\rSec3[mdspan.mdspan]{Class template \tcode{mdspan}}
\rSec4[mdspan.mdspan.overview]{Overview}
@@ -24126,6 +24318,17 @@
let \tcode{offset} be a value of type \tcode{size_t} equal to
\tcode{(*this)(\exposid{first_}(slices...)...)}.
+\pnum
+Given a layout mapping type \tcode{M}, a type \tcode{S} is a
+\defnadjx{unit-stride}{slice for \tcode{M}}{slice} if
+\begin{itemize}
+\item \tcode{S} is a specialization of \tcode{strided_slice}
+where \tcode{S::stride_type} models \exposconcept{integral-constant-like}
+and \tcode{S::stride_type::value} equals \tcode{1},
+\item \tcode{S} models \tcode{\exposconcept{index-pair-like}}, or
+\item \tcode{is_convertible_v} is \tcode{true}.
+\end{itemize}
+
\rSec5[mdspan.sub.map.left]{\tcode{layout_left} specialization of \tcode{submdspan_mapping}}
\indexlibrarymemberexpos{layout_left::mapping}{submdspan-mapping-impl}%
@@ -24157,8 +24360,7 @@
\tcode{is_convertible_v<$S_k$, full_ext\-ent_t>} is \tcode{true}; and
\item
for $k$ equal to \tcode{SubExtents::rank() - 1},
- $S_k$ models \tcode{\exposconcept{index-pair-like}} or
- \tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
+ $S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
\begin{note}
If the above conditions are true,
@@ -24173,21 +24375,17 @@
\end{codeblock}
if for a value $u$ for which $u+1$ is
the smallest value $p$ larger than zero
-for which $S_p$ models
-\tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
+for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
the following conditions are met:
\begin{itemize}
\item
-$S_0$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_0$, full_extent_t>} is \tcode{true}; and
+$S_0$ is a unit-stride slice for \tcode{decltype(*this)}; and
\item
for each $k$ in the range \range{$u$ + 1}{$u$ + SubExtents::rank() - 1},
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
\item
for $k$ equal to \tcode{$u$ + SubExtents::rank() - 1},
-$S_k$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
+$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
and where \tcode{S_static} is:
\begin{itemize}
@@ -24238,8 +24436,7 @@
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
\item
for $k$ equal to \exposid{_rank} - \tcode{SubExtents::rank()},
- $S_k$ models \tcode{\exposconcept{index-pair-like}} or
- \tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
+ $S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
\begin{note}
If the above conditions are true,
@@ -24254,23 +24451,19 @@
\end{codeblock}
if for a value $u$ for which $\exposid{rank_} - u - 2$ is
the largest value $p$ smaller than \tcode{\exposid{rank_} - 1}
-for which $S_p$ models
-\tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
+for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
the following conditions are met:
\begin{itemize}
\item
for $k$ equal to \tcode{\exposid{rank_} - 1},
-$S_k$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_k$, full_extent_t> }is \tcode{true}; and
+$S_k$ is a unit-stride slice for \tcode{decltype(*this)}; and
\item
for each $k$ in the range
\range{\exposid{rank_} - SubExtents::rank() - $u$ + 1}{\exposid{rank_} - $u$ - 1},
\tcode{is_con\-vertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
\item
-for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},
-$S_k$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
+for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},\newline
+$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
and where \tcode{S_static} is:
\begin{itemize}
@@ -24346,8 +24539,7 @@
\item
\tcode{SubExtents::rank() == 1} is \tcode{true} and
\item
-$S_0$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_0$ , full_extent_t>} is \tcode{true};
+$S_0$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
\item
otherwise,
@@ -24357,20 +24549,17 @@
\end{codeblock}
if for a value $u$
for which \tcode{$u$ + 1} is the smallest value $p$ larger than zero
-for which $S_p$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
+for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
the following conditions are met:
\begin{itemize}
\item
-$S_0$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_0$, full_extent_t>} is \tcode{true}; and
+$S_0$ is a unit-stride slice for \tcode{decltype(*this)}; and
\item
for each $k$ in the range \range{$u$ + 1}{$u$ + SubExtents::rank() - 1},
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
\item
for $k$ equal to \tcode{$u$ + SubExtents::rank() - 1},
-$S_k$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v} is \tcode{true};
+$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
where \tcode{S_static} is:
\begin{itemize}
@@ -24422,8 +24611,7 @@
\tcode{SubExtents::rank() == 1} is \tcode{true} and
\item
for $k$ equal to \tcode{\exposid{rank_} - 1},
-$S_k$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_k$ , full_extent_t>} is \tcode{true};
+$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
\item
otherwise,
@@ -24434,22 +24622,19 @@
if for a value $u$
for which \tcode{\exposid{rank_} - $u$ - 2}
is the largest value p smaller than \tcode{\exposid{rank_} - 1}
-for which $S_p$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_p$, full_extent_t>} is \tcode{true},
+for which $S_p$ is a unit-stride slice for \tcode{decltype(*this)},
the following conditions are met:
\begin{itemize}
\item
for $k$ equal to \tcode{\exposid{rank_} - 1},
-$S_k$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
+$S_k$ is a unit-stride slice for \tcode{decltype(*this)}; and
\item
for each $k$ in the range
\range{\exposid{rank_} - SubExtents::rank() - $u$ + 1}{\exposid{rank_} - $u$ - 1)},
\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true}; and
\item
-for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},
-$S_k$ models \tcode{\exposconcept{index-pair-like}} or
-\tcode{is_convertible_v<$S_k$, full_extent_t>} is \tcode{true};
+for $k$ equal to \tcode{\exposid{rank_} - SubExtents::rank() - $u$},\newline
+$S_k$ is a unit-stride slice for \tcode{decltype(*this)};
\end{itemize}
and where \tcode{S_static} is:
\begin{itemize}
diff --git a/source/declarations.tex b/source/declarations.tex
index 446aebd3aa..7cbe7fb501 100644
--- a/source/declarations.tex
+++ b/source/declarations.tex
@@ -13,8 +13,7 @@
the form
\begin{bnf}
\nontermdef{declaration-seq}\br
- declaration\br
- declaration-seq declaration
+ declaration \opt{declaration-seq}
\end{bnf}
\begin{bnf}
@@ -69,19 +68,19 @@
\end{bnf}
\begin{bnf}
-\nontermdef{attributed-identifier}\br
- identifier \opt{attribute-specifier-seq}
+\nontermdef{sb-identifier}\br
+ \opt{\terminal{...}} identifier \opt{attribute-specifier-seq}
\end{bnf}
\begin{bnf}
-\nontermdef{attributed-identifier-list}\br
- attributed-identifier\br
- attributed-identifier-list \terminal{,} attributed-identifier
+\nontermdef{sb-identifier-list}\br
+ sb-identifier\br
+ sb-identifier-list \terminal{,} sb-identifier
\end{bnf}
\begin{bnf}
\nontermdef{structured-binding-declaration}\br
- \opt{attribute-specifier-seq} decl-specifier-seq \opt{ref-qualifier} \terminal{[} attributed-identifier-list \terminal{]}
+ \opt{attribute-specifier-seq} decl-specifier-seq \opt{ref-qualifier} \terminal{[} sb-identifier-list \terminal{]}
\end{bnf}
\begin{bnf}
@@ -213,10 +212,16 @@
a \defn{structured binding declaration}\iref{dcl.struct.bind}.
Each \grammarterm{decl-specifier} in the \grammarterm{decl-specifier-seq}
shall be
+\tcode{constexpr},
+\tcode{constinit},
\tcode{static},
\tcode{thread_local},
\tcode{auto}\iref{dcl.spec.auto}, or
a \grammarterm{cv-qualifier}.
+The declaration shall contain at most one \grammarterm{sb-identifier}
+whose \grammarterm{identifier} is preceded by an ellipsis.
+If the declaration contains any such \grammarterm{sb-identifier},
+it shall declare a templated entity\iref{temp.pre}.
\begin{example}
\begin{codeblock}
template concept C = true;
@@ -850,7 +855,8 @@
\pnum
The \keyword{constexpr} specifier shall be applied only to
-the definition of a variable or variable template or
+the definition of a variable or variable template,
+a structured binding declaration, or
the declaration of a function or function template.
The \keyword{consteval} specifier shall be applied only to
the declaration of a function or function template.
@@ -995,9 +1001,7 @@
Such an object
shall have literal type and
shall be initialized.
-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 be constant-initializable\iref{expr.const}.
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.
@@ -1008,6 +1012,16 @@
};
constexpr pixel ur = { 1294, 1024 }; // OK
constexpr pixel origin; // error: initializer missing
+
+namespace N {
+ void f() {
+ int x;
+ constexpr int& ar = x; // OK
+ static constexpr int& sr = x; // error: \tcode{x} is not constexpr-representable
+ // at the point indicated below
+ }
+ // immediate scope here is that of \tcode{N}
+}
\end{codeblock}
\end{example}
@@ -1016,7 +1030,12 @@
\pnum
The \keyword{constinit} specifier shall be applied only
-to a declaration of a variable with static or thread storage duration.
+to a declaration of a variable with static or thread storage duration
+or to a structured binding declaration\iref{dcl.struct.bind}.
+\begin{note}
+A structured binding declaration introduces a uniquely named variable,
+to which the \tcode{constinit} specifier applies.
+\end{note}
If the specifier is applied to any declaration of a variable,
it shall be applied to the initializing declaration.
No diagnostic is required if no \keyword{constinit} declaration
@@ -1771,9 +1790,11 @@
\pnum
The type of a \grammarterm{parameter-declaration} of a
-function declaration\iref{dcl.fct},
-\grammarterm{lambda-expression}\iref{expr.prim.lambda}, or
-\grammarterm{template-parameter}\iref{temp.param}
+\begin{itemize}
+ \item function declaration\iref{dcl.fct},
+ \item \grammarterm{lambda-expression}\iref{expr.prim.lambda}, or
+ \item \grammarterm{template-parameter}\iref{temp.param}
+\end{itemize}
can be declared using
a \grammarterm{placeholder-type-specifier} of the form
\opt{\grammarterm{type-constraint}} \keyword{auto}.
@@ -3602,8 +3623,10 @@
\indextext{declaration!function}%
\begin{bnf}
\nontermdef{parameter-declaration-clause}\br
- \opt{parameter-declaration-list} \opt{\terminal{...}}\br
- parameter-declaration-list \terminal{,} \terminal{...}
+ \terminal{...}\br
+ \opt{parameter-declaration-list}\br
+ parameter-declaration-list \terminal{,} \terminal{...}\br
+ parameter-declaration-list \terminal{...}
\end{bnf}
\begin{bnf}
@@ -3639,7 +3662,7 @@
If the
\grammarterm{parameter-declaration-clause}
is empty, the function takes no arguments.
-A parameter list consisting of a single unnamed parameter of
+A parameter list consisting of a single unnamed non-object parameter of
non-dependent type \keyword{void} is equivalent to an empty parameter
list.
\indextext{parameter!\idxcode{void}}%
@@ -3659,9 +3682,13 @@
argument and are not function parameter packs.
Where syntactically correct and where ``\tcode{...}'' is not
part of an \grammarterm{abstract-declarator},
-``\tcode{, ...}''
+``\tcode{...}''
is synonymous with
-``\tcode{...}''.
+``\tcode{, ...}''.
+A \grammarterm{parameter-declaration-clause}
+of the form
+\grammarterm{parameter-declaration-list} \tcode{...}
+is deprecated\iref{depr.ellipsis.comma}.
\begin{example}
The declaration
\begin{codeblock}
@@ -5808,6 +5835,10 @@
return x;
}
constexpr int z = f(); // error: not a constant expression
+
+typedef int *A[3]; // array of 3 pointer to \tcode{int}
+typedef const int *const CA[3]; // array of 3 const pointer to \tcode{const int}
+ACPC &&r = AP{}; // binds directly
\end{codeblock}
\end{example}
@@ -7019,17 +7050,23 @@
\pnum
A structured binding declaration introduces the \grammarterm{identifier}{s}
-$\tcode{v}_0$, $\tcode{v}_1$, $\tcode{v}_2, \dotsc$
+$\tcode{v}_0$, $\tcode{v}_1$, $\tcode{v}_2, \dotsc, \tcode{v}_{N-1}$
of the
-\grammarterm{attributed-identifier-list} as names
-of \defn{structured binding}{s}.
+\grammarterm{sb-identifier-list} as names.
+An \grammarterm{sb-identifier} that contains an ellipsis
+introduces a structured binding pack\iref{temp.variadic}.
+A \defn{structured binding} is either
+an \grammarterm{sb-identifier} that does not contain an ellipsis or
+an element of a structured binding pack.
The optional \grammarterm{attribute-specifier-seq} of
-an \grammarterm{attributed-identifier}
-appertains to the structured binding so introduced.
+an \grammarterm{sb-identifier}
+appertains to the associated structured bindings.
Let \cv{} denote the \grammarterm{cv-qualifier}{s} in
the \grammarterm{decl-specifier-seq} and
-\placeholder{S} consist of the \grammarterm{storage-class-specifier}{s} of
-the \grammarterm{decl-specifier-seq} (if any).
+\placeholder{S} consist of
+each \grammarterm{decl-specifier} of the \grammarterm{decl-specifier-seq}
+that is \tcode{constexpr}, \tcode{constinit}, or
+a \grammarterm{storage-class-specifier}.
A \cv{} that includes \tcode{volatile} is deprecated;
see~\ref{depr.volatile.type}.
First, a variable with a unique name \exposid{e} is introduced. If the
@@ -7057,6 +7094,42 @@
\tcode{E} is never a reference type\iref{expr.prop}.
\end{note}
+\pnum
+The \defn{structured binding size} of \tcode{E}, as defined below,
+is the number of structured bindings
+that need to be introduced by the structured binding declaration.
+If there is no structured binding pack,
+then the number of elements in the \grammarterm{sb-identifier-list}
+shall be equal to the structured binding size of \tcode{E}.
+Otherwise, the number of non-pack elements shall be no more than
+the structured binding size of \tcode{E};
+the number of elements of the structured binding pack is
+the structured binding size of \tcode{E} less
+the number of non-pack elements in the\grammarterm{sb-identifier-list}.
+
+\pnum
+Let $\textrm{SB}_i$ denote
+the $i^\textrm{th}$ structured binding in the structured binding declaration
+after expanding the structured binding pack, if any.
+\begin{note}
+If there is no structured binding pack,
+then $\textrm{SB}_i$ denotes $\tcode{v}_i$.
+\end{note}
+\begin{example}
+\begin{codeblock}
+struct C { int x, y, z; };
+
+template
+void now_i_know_my() {
+ auto [a, b, c] = C(); // OK, $\textrm{SB}_0$ is \tcode{a}, $\textrm{SB}_1$ is \tcode{b}, and $\textrm{SB}_2$ is \tcode{c}
+ auto [d, ...e] = C(); // OK, $\textrm{SB}_0$ is \tcode{d}, the pack \tcode{e} $(\tcode{v}_1)$ contains two structured bindings: $\textrm{SB}_1$ and $\textrm{SB}_2$
+ auto [...f, g] = C(); // OK, the pack \tcode{f} $(\tcode{v}_0)$ contains two structured bindings: $\textrm{SB}_0$ and $\textrm{SB}_1$, and $\textrm{SB}_2$ is \tcode{g}
+ auto [h, i, j, ...k] = C(); // OK, the pack \tcode{k} is empty
+ auto [l, m, n, o, ...p] = C(); // error: structured binding size is too small
+}
+\end{codeblock}
+\end{example}
+
\pnum
If a structured binding declaration appears as a \grammarterm{condition},
the decision variable\iref{stmt.pre} of the condition is \exposid{e}.
@@ -7067,9 +7140,10 @@
the program is ill-formed.
\pnum
-If \tcode{E} is an array type with element type \tcode{T}, the number
-of elements in the \grammarterm{attributed-identifier-list} shall be equal to the
-number of elements of \tcode{E}. Each $\tcode{v}_i$ is the name of an
+If \tcode{E} is an array type with element type \tcode{T},
+the structured binding size of \tcode{E} is equal to the
+number of elements of \tcode{E}.
+Each $\textrm{SB}_i$ is the name of an
lvalue that refers to the element $i$ of the array and whose type
is \tcode{T}; the referenced type is \tcode{T}.
\begin{note}
@@ -7080,6 +7154,19 @@
auto f() -> int(&)[2];
auto [ x, y ] = f(); // \tcode{x} and \tcode{y} refer to elements in a copy of the array return value
auto& [ xr, yr ] = f(); // \tcode{xr} and \tcode{yr} refer to elements in the array referred to by \tcode{f}'s return value
+
+auto g() -> int(&)[4];
+
+template
+void h(int (&arr)[N]) {
+ auto [a, ...b, c] = arr; // \tcode{a} names the first element of the array, \tcode{b} is a pack referring to the second and
+ // third elements, and \tcode{c} names the fourth element
+ auto& [...e] = arr; // \tcode{e} is a pack referring to the four elements of the array
+}
+
+void call_h() {
+ h(g());
+}
\end{codeblock}
\end{example}
@@ -7090,8 +7177,7 @@
the expression \tcode{std::tuple_size::value}
shall be a well-formed integral constant expression
and
-the number of elements in
-the \grammarterm{attributed-identifier-list} shall be equal to the value of that
+the structured binding size of \tcode{E} is equal to the value of that
expression.
Let \tcode{i} be an index prvalue of type \tcode{std::size_t}
corresponding to $\tcode{v}_i$.
@@ -7121,7 +7207,7 @@
\placeholder{S} \terminal{U$_i$ r$_i$ =} initializer \terminal{;}
\end{ncbnf}
-Each $\tcode{v}_i$ is the name of an lvalue of type $\tcode{T}_i$
+Each $\textrm{SB}_i$ is the name of an lvalue of type $\tcode{T}_i$
that refers to the object bound to $\tcode{r}_i$;
the referenced type is $\tcode{T}_i$.
The initialization of \exposid{e} and
@@ -7139,12 +7225,12 @@
well-formed when named as \tcode{\exposidnc{e}.\placeholder{name}}
in the context of the structured binding,
\tcode{E} shall not have an anonymous union member, and
-the number of elements in the \grammarterm{attributed-identifier-list} shall be
+the structured binding size of \tcode{E} is
equal to the number of non-static data members of \tcode{E}.
Designating the non-static data members of \tcode{E} as
$\tcode{m}_0$, $\tcode{m}_1$, $\tcode{m}_2, \dotsc$
(in declaration order),
-each $\tcode{v}_i$ is the
+each $\textrm{SB}_i$ is the
name of an lvalue that refers to the member \tcode{m}$_i$ of \exposid{e} and
whose type is
that of \tcode{\exposidnc{e}.$\tcode{m}_i$}\iref{expr.ref};
@@ -8699,8 +8785,8 @@
\pnum
\indextext{object!linkage specification}%
\indextext{linkage!implementation-defined object}%
-Linkage from \Cpp{} to objects defined in other languages and to objects
-defined in \Cpp{} from other languages is \impldef{linkage of objects between \Cpp{} and other languages} and
+Linkage from \Cpp{} to entities defined in other languages and to entities
+defined in \Cpp{} from other languages is \impldef{linkage of entities between \Cpp{} and other languages} and
language-dependent. Only where the object layout strategies of two
language implementations are similar enough can such linkage be
achieved.%
@@ -8718,7 +8804,7 @@
\begin{bnf}
\nontermdef{attribute-specifier-seq}\br
- \opt{attribute-specifier-seq} attribute-specifier
+ attribute-specifier \opt{attribute-specifier-seq}
\end{bnf}
\begin{bnf}
@@ -8774,8 +8860,7 @@
\begin{bnf}
\nontermdef{balanced-token-seq}\br
- balanced-token\br
- balanced-token-seq balanced-token
+ balanced-token \opt{balanced-token-seq}
\end{bnf}
\begin{bnf}
@@ -9009,6 +9094,7 @@
\rSec2[dcl.attr.assume]{Assumption attribute}
+\pnum
The \grammarterm{attribute-token} \tcode{assume} may be applied to a null statement;
such a statement is an \defn{assumption}.
An \grammarterm{attribute-argument-clause} shall be present and
@@ -9021,7 +9107,10 @@
If the converted expression would evaluate to \tcode{true}
at the point where the assumption appears,
the assumption has no effect.
-Otherwise, the behavior is undefined.
+Otherwise,
+evaluation of the assumption has runtime-undefined behavior.
+
+\pnum
\begin{note}
The expression is potentially evaluated\iref{basic.def.odr}.
The use of assumptions is intended to allow implementations
@@ -9035,6 +9124,8 @@
if an implementation does not attempt to deduce
any such information from assumptions.
\end{note}
+
+\pnum
\begin{example}
\begin{codeblock}
int divide_by_32(int x) {
@@ -9528,8 +9619,9 @@
translation unit, the program is ill-formed, no diagnostic required.
\pnum
-If a function \tcode{f} is called where \tcode{f} was previously declared with the \tcode{noreturn}
-attribute and \tcode{f} eventually returns, the behavior is undefined.
+If a function \tcode{f} is invoked where \tcode{f} was previously declared with the \tcode{noreturn}
+attribute and that invocation eventually returns,
+the behavior is runtime-undefined.
\begin{note}
The function can
terminate by throwing an exception.
diff --git a/source/diagnostics.tex b/source/diagnostics.tex
index ef695fddef..e421b207f4 100644
--- a/source/diagnostics.tex
+++ b/source/diagnostics.tex
@@ -713,9 +713,6 @@
\indexlibraryglobal{error_code}%
\indexlibraryglobal{error_condition}%
\indexlibraryglobal{system_error}%
-\indexlibraryglobal{is_error_code_enum}%
-\indexlibraryglobal{is_error_condition_enum}%
-\indexlibraryglobal{errc}%
\begin{codeblock}
#include // see \ref{compare.syn}
@@ -729,12 +726,12 @@
class system_error;
template
- struct is_error_code_enum : public false_type {};
+ struct @\libglobal{is_error_code_enum}@ : public false_type {};
template
- struct is_error_condition_enum : public false_type {};
+ struct @\libglobal{is_error_condition_enum}@ : public false_type {};
- enum class errc { // freestanding
+ enum class @\libglobal{errc}@ { // freestanding
address_family_not_supported, // \tcode{EAFNOSUPPORT}
address_in_use, // \tcode{EADDRINUSE}
address_not_available, // \tcode{EADDRNOTAVAIL}
@@ -837,7 +834,7 @@
// \ref{syserr}, system error support
template
- constexpr bool is_error_code_enum_v = is_error_code_enum::value;
+ constexpr bool @\libglobal{is_error_code_enum_v}@ = is_error_code_enum::value;
template
constexpr bool is_error_condition_enum_v = is_error_condition_enum::value;
}
diff --git a/source/exceptions.tex b/source/exceptions.tex
index a462fe0bff..c14df21e84 100644
--- a/source/exceptions.tex
+++ b/source/exceptions.tex
@@ -751,7 +751,7 @@
\begin{bnf}
\nontermdef{noexcept-specifier}\br
\keyword{noexcept} \terminal{(} constant-expression \terminal{)}\br
- \keyword{noexcept}\br
+ \keyword{noexcept}
\end{bnf}
\pnum
@@ -846,7 +846,7 @@
(such as an overloaded operator,
an allocation function in a \grammarterm{new-expression},
a constructor for a function argument,
-or a destructor if $E$ is a full-expression\iref{intro.execution})
+or a destructor)
that has a potentially-throwing exception specification,
or
\item
@@ -1012,9 +1012,10 @@
\pnum
\indextext{\idxcode{terminate}}%
-% FIXME: What does it mean to abandon exception handling?
-In some situations, exception handling is abandoned
-for less subtle error handling techniques.
+Some errors in a program cannot be recovered from, such as when an exception
+is not handled or a \tcode{std::thread} object is destroyed while its thread
+function is still executing. In such cases,
+the function \tcode{std::terminate}\iref{exception.terminate} is invoked.
\begin{note}
These situations are:
\indextext{\idxcode{terminate}!called}%
@@ -1108,8 +1109,6 @@
\pnum
\indextext{\idxcode{terminate}}%
-In such cases,
-the function \tcode{std::terminate} is invoked\iref{exception.terminate}.
In the situation where no matching handler is found, it is
\impldef{stack unwinding before invocation of \tcode{std::terminate}}
whether or not the stack is unwound
diff --git a/source/exec.tex b/source/exec.tex
index 8608dd9624..e4bb77d9db 100644
--- a/source/exec.tex
+++ b/source/exec.tex
@@ -91,8 +91,8 @@
\item
\tcode{err} if \tcode{decay_t} denotes the type \tcode{exception_ptr}.
-\mandates
-\tcode{err != exception_ptr()} is \tcode{true}.
+\expects
+\tcode{!err} is \tcode{false}.
\item
Otherwise,
\tcode{make_exception_ptr(system_error(err))}
@@ -155,7 +155,7 @@
\pnum
Let \tcode{env} be an object of type \tcode{Env}.
-The type \tcode{Env} models queryable
+The type \tcode{Env} models \exposconcept{queryable}
if for each callable object \tcode{q} and a pack of subexpressions \tcode{args},
if \tcode{requires \{ q(env, args...) \}} is \tcode{true} then
\tcode{q(env, args...)} meets any semantic requirements imposed by \tcode{q}.
@@ -229,7 +229,6 @@
representing the execution-time properties of the operation's caller.
The caller of an asynchronous operation is
its parent operation or the function that created it.
-An asynchronous operation's operation state owns the operation's environment.
\pnum
An asynchronous operation has an associated receiver.
@@ -434,13 +433,13 @@
concept @\exposconceptnc{queryable}@ = @\seebelownc@; // \expos
// \ref{exec.queries}, queries
- struct forwarding_query_t { @\unspec@ };
- struct get_allocator_t { @\unspec@ };
- struct get_stop_token_t { @\unspec@ };
+ struct @\libglobal{forwarding_query_t}@ { @\unspec@ };
+ struct @\libglobal{get_allocator_t}@ { @\unspec@ };
+ struct @\libglobal{get_stop_token_t}@ { @\unspec@ };
- inline constexpr forwarding_query_t forwarding_query{};
- inline constexpr get_allocator_t get_allocator{};
- inline constexpr get_stop_token_t get_stop_token{};
+ inline constexpr forwarding_query_t @\libglobal{forwarding_query}@{};
+ inline constexpr get_allocator_t @\libglobal{get_allocator}@{};
+ inline constexpr get_stop_token_t @\libglobal{get_stop_token}@{};
template
using stop_token_of_t = remove_cvref_t()))>;
@@ -451,39 +450,46 @@
namespace std::execution {
// \ref{exec.queries}, queries
- struct get_domain_t { @\unspec@ };
- struct get_scheduler_t { @\unspec@ };
- struct get_delegation_scheduler_t { @\unspec@ };
- struct get_forward_progress_guarantee_t { @\unspec@ };
+ struct @\libglobal{get_domain_t}@ { @\unspec@ };
+ struct @\libglobal{get_scheduler_t}@ { @\unspec@ };
+ struct @\libglobal{get_delegation_scheduler_t}@ { @\unspec@ };
+ struct @\libglobal{get_forward_progress_guarantee_t}@ { @\unspec@ };
template
- struct get_completion_scheduler_t { @\unspec@ };
+ struct @\libglobal{get_completion_scheduler_t}@ { @\unspec@ };
- inline constexpr get_domain_t get_domain{};
- inline constexpr get_scheduler_t get_scheduler{};
- inline constexpr get_delegation_scheduler_t get_delegation_scheduler{};
+ inline constexpr get_domain_t @\libglobal{get_domain}@{};
+ inline constexpr get_scheduler_t @\libglobal{get_scheduler}@{};
+ inline constexpr get_delegation_scheduler_t @\libglobal{get_delegation_scheduler}@{};
enum class forward_progress_guarantee;
- inline constexpr get_forward_progress_guarantee_t get_forward_progress_guarantee{};
+ inline constexpr get_forward_progress_guarantee_t @\libglobal{get_forward_progress_guarantee}@{};
template
- constexpr get_completion_scheduler_t get_completion_scheduler{};
+ constexpr get_completion_scheduler_t @\libglobal{get_completion_scheduler}@{};
- struct empty_env {};
- struct get_env_t { @\unspec@ };
- inline constexpr get_env_t get_env{};
+ struct @\libglobal{get_env_t}@ { @\unspec@ };
+ inline constexpr get_env_t @\libglobal{get_env}@{};
template
- using env_of_t = decltype(get_env(declval()));
+ using @\libglobal{env_of_t}@ = decltype(get_env(declval()));
+
+ // \ref{exec.prop}, class template \tcode{prop}
+ template