diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e6fa6d7203..acd96b5047 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -22,7 +22,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: install GNU tools if: matrix.cfg.os == 'macos-15' @@ -67,7 +67,7 @@ jobs: - name: upload PDF if: matrix.cfg.os == 'ubuntu-24.04' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: draft-snapshot path: source/std.pdf diff --git a/papers/n5047.html b/papers/n5047.html new file mode 100644 index 0000000000..6bb2b38ca2 --- /dev/null +++ b/papers/n5047.html @@ -0,0 +1,1787 @@ + + + + + +N5047 + + +

N5047 Editors’ Report:
Programming Languages — C++

+ +

Date: 2026-05-12

+ +

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

+ +

Acknowledgments

+ +

Thanks to all those who have +submitted editorial issues, +to those who have provided pull requests with fixes, +and to everyone who drafted motion applications. +Special thanks to Jan Schultke for drafting a lot of motion applications, +to Andreas Krug for ongoing careful reviews, +and to Daniel Krügler for an exceptionally thorough review +that spotted many mistakes in the motion applications.

+ +

New papers

+ + + + +

The Draft International Standard that will be sent for the ISO ballot has not +yet been completed, but will include the changes from N5046. As usual, since +N5046 has not yet been approved in a WG21 meeting, it is instead being reviewed +by an editorial review committee that was selected in Croydon, as per WG21 +Poll 3. N5046 includes some, but not all of the review committee’s feedback.

+ +

Motions incorporated into working draft

+ +

Notes on motions

+ +

All motions were applied cleanly.

+ +

Some reconciliation was needed among LWG motions (in particular starting at +motion 28), but paper authors and LWG had already included relevant merging +instructions in the papers.

+ +

The wording of P3980R1 from LWG Motion 29 has been reconciled with intervening +changes from issues LWG 4339 and LWG 4347 from LWG Motion 2.

+ +

Core working group polls

+ +

CWG Poll 1 does not change the working draft.

+ +

CWG Poll 2. Accept as Defect Reports and apply the proposed resolutions of all issues +except issues 3088, 3119, 3122, 3123, 3124, 3131, 3135, 3140, 3141, 3143, 3145, 3149, 3162, and 3172 in +P4160R0 +(Core Language Working Group “ready” Issues for the March, 2026 meeting) to the C++ Working Paper.

+ +

CWG Poll 3. Apply the proposed resolutions of issues +3088, 3119, 3122, 3123, 3124, 3131, 3135, 3140, 3143, 3145, 3149, 3162, and 3172 in +P4160R0 +(Core Language Working Group “ready” Issues for the March, 2026 meeting) to the C++ Working Paper.

+ +

CWG Poll 4. Accept as a Defect Report and apply the changes in +P3924R1 +(Fix inappropriate font choices for “declaration”) to the C++ Working Paper. +This addresses ballot comment US 11-400.

+ +

CWG Poll 5. Accept as a Defect Report and apply the changes in +P4136R2 +(#line is not in line with existing implementation) to the C++ Working Paper. +This addresses ballot comment FR-009-108.

+ +

CWG Poll 6. Accept as a Defect Report and apply the changes in +P4004R1 +(Reconsider CWG 1395 “Partial ordering of variadic templates reconsidered”) to the C++ Working Paper.

+ +

CWG Poll 7. Accept as a Defect Report and apply the changes in +P3865R3 +(Class template argument deduction (CTAD) for type template template parameters) to the C++ Working Paper.

+ +

CWG Poll 8. Apply the changes in +P3598R0 +(CWG 3158 – const-ification of Splice Expressions) to the C++ Working Paper.

+ +

CWG Poll 9. Apply the changes in +P3726R2 +(Adjustments to Union Lifetime Rules) to the C++ Working Paper. +This addresses ballot comment DE 087.

+ +

CWG Poll 10. Accept as a Defect Report and apply the changes in +P4143R0 +(Constant evaluation when?) to the C++ Working Paper. +This partially addresses ballot comment US 33-065.

+ +

CWG Poll 11. Accept as a Defect Report and apply the changes in +P4149R1 +(Define “immediate context”) to the C++ Working Paper. +This addresses ballot comment US 54-100 and core issues 1844 and 2296.

+ +

CWG Poll 12. Accept as a Defect Report and apply the changes in +P3769R1 +(Clarification of placement new deallocation) to the C++ Working Paper.

+ +

CWG Poll 13. Apply the proposed resolution of issue 3141 in +P4160R0 +(Core Language Working Group “ready” Issues for the March, 2026 meeting) to the C++ Working Paper.

+ +

Library working group polls

+ +

LWG Poll 1. Apply the changes in +P4145R0 +(C++ Standard Library Ready Issues to be moved in Croydon, Mar. 2026) to the C++ working paper.

+ +

LWG Poll 2. Apply the changes in +P4146R0 +(C++ Standard Library Immediate Issues to be moved in Croydon, Mar. 2026) to the C++ working paper.

+ +

LWG Poll 3. Apply the changes in +P3690R1 +(Consistency fix: Make simd reductions SIMD-generic) to the C++ working paper. +This addresses ballot comment AT8-279.

+ +

LWG Poll 4. Apply the changes in +P3844R4 +(Reword [simd.math] for consteval conversions) to the C++ working paper. +This addresses ballot comment DE-286.

+ +

LWG Poll 5. Apply the changes in +P3932R0 +(Fix LWG4470: Fix integer-from in [simd]) to the C++ working paper.

+ +

LWG Poll 6. Apply the changes in +P4012R1 +(Value-preserving consteval broadcast to simd::vec) to the C++ working paper. +This addresses ballot comment DE-286.

+ +

LWG Poll 7. Apply the changes in +P3886R0 +(Wording for AT1-057) to the C++ working paper. +This addresses ballot comment AT 1-057.

+ +

LWG Poll 8. Apply the changes in +P3936R1 +(Safer atomic_ref::address (FR-030-310)) to the C++ working paper +and update the value of the __cpp_lib_atomic_ref macro. +This addresses ballot comment FR-030-310.

+ +

LWG Poll 9. Apply the changes in +P4140R0 +(Proposed resolution for US70-126: allow incomplete types in type_order) to the C++ working paper. +This addresses ballot comment US 70-126.

+ +

LWG Poll 10. Apply the changes in +P3373R4 +(Of Operation States and Their Lifetimes) to the C++ working paper. +CA-338.

+ +

LWG Poll 11. Apply the changes in +P3986R1 +(A Wording Strategy for Inlinable Receivers) to the C++ working paper. +This addresses ballot comment CA-318.

+ +

LWG Poll 12. Accept as a Defect Report and apply the changes in +P3059R2 +(Making user-defined constructors of view iterators/sentinels private) to the C++ working paper. +This addresses ballot comment GB 09-257.

+ +

LWG Poll 13. Accept as a Defect Report and apply the changes in +P3725R3 +(Filter View Extensions for Safer Use, Rev 3) to the C++ working paper. +This addresses ballot comments AT9-249, RU-250, DE-251.

+ +

LWG Poll 14. Apply the changes in +P3828R1 +(Rename the to_input view to as_input) to the C++ working paper. +This addresses ballot comment DE-248.

+ +

LWG Poll 15. Apply the changes in +P3795R2 +(Miscellaneous Reflection Cleanup) to the C++ working paper. +This addresses ballot comments US 42-078 and US 85-150 and US 122-184 and US 128-192 and US 95-202 and US 131-195.

+ +

LWG Poll 16. Apply the changes in +P3948R1 +(constant_wrapper is the only tool needed for passing constant expressions +via function arguments) to the C++ working paper. +This addresses ballot comments FR-019-210 and FR-021-218.

+ +

LWG Poll 17. Apply the changes in +P3978R3 +(constant_wrapper should unwrap on call and subscript) to the C++ working paper.

+ +

LWG Poll 18. Apply the changes in +P3961R1 +(Less double indirection in function_ref) to the C++ working paper. +This addresses ballot comment RU-220.

+ +

LWG Poll 19. Apply the changes in +P3981R2 +(Better return types in std::inplace_vector and std::exception_ptr_cast) to the C++ working paper. +This addresses ballot comments PL-006 and US 68-122 and US 150-228 and GB 08-225.

+ +

LWG Poll 20. Apply the changes in +P4022R0 +(Remove try_append_range from inplace_vector for now) to the C++ working paper. +This addresses ballot comment PL-006.

+ +

LWG Poll 21. Apply the changes in +P4037R1 +(Supporting signed char and unsigned char in random number generation) to the C++ working paper. +This addresses ballot comment RU-272.

+ +

LWG Poll 22. Apply the changes in +P3450R1 +(Extend std::is_within_lifetime) to the C++ working paper. +This addresses ballot comment US 82-145.

+ +

LWG Poll 23. Apply the changes in +P3982R2 +(Split strided_slice into extent_slice and range_slice for C++26) to the C++ working paper. +This addresses ballot comment PL-007.

+ +

LWG Poll 24. Apply the changes in +P4144R1 +(Remove span’s initializer_list constructor for C++26) to the C++ working paper.

+ +

LWG Poll 25. Apply the changes in +P3804R2 +(Iterating on parallel_scheduler) to the C++ working paper. +This addresses ballot comment RO 4-395.

+ +

LWG Poll 26. Apply the changes in +P3787R2 +(Adjoints to “Enabling list-initialization for algorithms”: uninitialized_fill) to the C++ working paper. +This addresses ballot comment FR-027-267.

+ +

LWG Poll 27. Apply the changes in +P3842R2 +(A conservative fix for constexpr uncaught_exceptions() and current_exception()) to the C++ working paper. +This addresses ballot comments PL-012 and GB 03-119 and DE-120 and US 67-118 and FI-121.

+ +

LWG Poll 28. Apply the changes in +P3826R5 +(Fix Sender Algorithm Customization) to the C++ working paper. +This addresses ballot comments US 207-328 and US 202-326 and FR-031-219 and FI-331 and CA-358.

+ +

LWG Poll 29. Apply the changes in +P3980R1 +(Task’s Allocator Use) to the C++ working paper. +This addresses ballot comments US 254-385 and US 253-386 and US 255-384 and US 261-391.

+ +

LWG Poll 30. Apply the changes in +P4156R0 +(Rename meta::has_ellipsis_parameter to meta::is_vararg_function) to the C++ working paper. +This addresses ballot comment FR-017-155.

+ +

LWG Poll 31. Apply the changes in +P3953R3 +(Rename std::runtime_format) to the C++ working paper.

+ +

LWG Poll 32. Apply the changes in +P4052R0 +(Renaming saturation arithmetic functions) to the C++ working paper. +This addresses ballot comment FR-026-265.

+ +

LWG Poll 33. Apply the changes in +P3941R4 +(Scheduler Affinity) to the C++ working paper. +This addresses ballot comments US 232-366 and US 233-365 and US 234-364 and US 235-363 and US 236-362.

+ +

LWG Poll 34. Apply the changes in +P3856R8 +(New reflection metafunction - is_structural_type) to the C++ working paper. +This addresses ballot comment US 49-090.

+ +

LWG Poll 35. Apply the changes in +P3927R2 +(task_scheduler support for parallel bulk execution) to the C++ working paper. +This addresses ballot comment US 238-368.

+ +

LWG Poll 36. Apply the changes in +P4151R1 +(Rename affine_on) to the C++ working paper.

+ +

LWG Poll 37. Apply the changes in +P4159R0 +(Make sender_in and receiver_of exposition-only) to the C++ working paper.

+ +

LWG Poll 38. Apply the changes in +P4154R0 +(Renaming various execution things) to the C++ working paper. +This addresses ballot comments US 205-320 and RO 4-395.

+ +

National body comment resolution

+ +

A large number of national body comments for the C++26 Committee Draft have been +addressed in this working draft.

+ +

Editorial comments

+ +

Most editorial national body comments were addressed before the Kona 2025 meeting, +see Editor’s Report N5033 +for the full list.

+ +

A few additional national body comments have since been found editorial +and have now been addressed:

+ + + + +

Non-editorial comments

+ +

The following national body comments were addressed by the motions approved at the Croydon 2026 meeting:

+ + + + +

Editorial changes

+ +

Major editorial changes

+ +

The subclause [expr.const], formerly titled “Constant expressions”, +has been renamed to “Constant evaluation” and its contents have been +divided into smaller subclauses; see commit +98a668efc2ab0bea86dcf9a2d8bf583dddc35e32.

+ +

Minor editorial changes

+ +

A log of editorial fixes made to the working draft since N5008 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 cc2efebb57ea02ea2eac19220c873c158f855859
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Mon Dec 15 15:43:02 2025 +0000
+
+    [basic.start.dynamic] Fix typo (#8654)
+
+commit 3e6cad293e448f7d9f9d859d07b5371b7e054789
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Mon Dec 15 15:47:37 2025 +0000
+
+    [basic.types.general] Improve presentation of comments in example (#8636)
+
+    - put "sizeof" in code font
+    - use a comma after "OK"
+
+commit f6319760f3f6d9a710fdb4be5e54c111abfc1e92
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 16:21:20 2025 +0000
+
+    [basic.link] Modernize wording about type aliases
+
+commit f66f4c675c0c60f822bb24543cd607e14be24a93
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 16:31:25 2025 +0000
+
+    [intro.memory] Update outdated example
+
+commit 176528f688cec22566f1de8286f1c3fae43887ce
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 16:46:10 2025 +0000
+
+    [intro.object] Remove redundant "non-bit-field"
+
+commit 1d9fdb066e95b7be58881f24977a20a51359097c
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 17:40:14 2025 +0000
+
+    [basic.types.general] Remove unused meta-variable
+
+commit 2dbe5a3247b100a6e4cdddab46eda5595d9d3de1
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Mon Dec 15 21:58:39 2025 +0000
+
+    [basic.start.dynamic] Add cross-reference for "interface dependency" (#8653)
+
+commit 166fd7efa129ce139e2a859758410fd7fd0955b3
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Mon Dec 15 20:46:26 2025 +0100
+
+    [exec.scope.concepts] Fix typos
+
+commit d8a8c5ad3b354087a416c02c2059b9ef62534c72
+Author: A. Jiang <de34@live.cn>
+Date:   Thu Apr 25 00:30:02 2024 +0800
+
+    [expos.only.entity] Say typedef-names are declared
+
+    Also use "provided for exposition only" from @W-E-Brown's suggestion.
+
+commit 7fcd646f6d82721e32f5fb5dc11994b8b0cf1d64
+Author: A. Jiang <de34@live.cn>
+Date:   Thu Aug 3 00:37:14 2023 +0800
+
+    [type.descriptions.general] Use "shown" for impl-def types
+
+commit 34c7cffe9e7d1807df4b986e648392bb3a1dfae0
+Author: A. Jiang <de34@live.cn>
+Date:   Thu Aug 3 00:38:04 2023 +0800
+
+    [enumerated.types] Reword enumerated types
+
+    Also mention [re].
+
+commit cc2ecb3a2c85b2e196ca5697287270e9f62878c8
+Author: A. Jiang <de34@live.cn>
+Date:   Thu Aug 3 00:38:45 2023 +0800
+
+    [bitmask.types] Reword bitmask types
+
+commit 03545f10f200193e15d3f0227b289ff037146abf
+Author: A. Jiang <de34@live.cn>
+Date:   Thu Apr 25 00:33:17 2024 +0800
+
+    [extern.types] Use "declared" for C library types
+
+commit d21a84cc95a9a3e619139a1c53d7937474ea03b8
+Author: A. Jiang <de34@live.cn>
+Date:   Fri Jul 28 23:51:45 2023 +0800
+
+    [cstdint.syn] Use "declare" for typedef-names
+
+commit ad83c0b2bc498eac0fc4d97850143581dbfa703c
+Author: A. Jiang <de34@live.cn>
+Date:   Fri Jul 28 23:52:27 2023 +0800
+
+    [stdfloat.syn] Use "declare" for typedef-names
+
+commit 30000d169f5b6db54d7d61ed35aa825fbbdfa70d
+Author: A. Jiang <de34@live.cn>
+Date:   Fri Jul 28 23:58:28 2023 +0800
+
+    [meta.rqmts] Use "declare" for typedef-names
+
+commit c5eac2a7d176110d63e153fa1d5abcee9681943e
+Author: A. Jiang <de34@live.cn>
+Date:   Sat Jul 29 00:02:58 2023 +0800
+
+    [meta.trans.other] Use "declare" for typedef-names
+
+    In the example, it seems a bit verbose to say "declarations and
+    definitions".
+
+commit cbd6e735fdea46f312d27ae802e83766d8dc43f8
+Author: A. Jiang <de34@live.cn>
+Date:   Sat Jul 29 00:03:49 2023 +0800
+
+    [ratio.si] Use "declare" for typedef-names
+
+commit 8210a2cc6ff0bb2a90c9b20cf60ee1d369156c4b
+Author: A. Jiang <de34@live.cn>
+Date:   Sat Jul 29 00:12:12 2023 +0800
+
+    [readable.traits] Use "declare" for typedef-names
+
+commit c5b55216c7a80fe7187bdbc4f5e62b6ef53e6008
+Author: A. Jiang <de34@live.cn>
+Date:   Sat Jul 29 00:14:51 2023 +0800
+
+    [iterator.traits] Use "declare" for typedef-names
+
+commit b892cf9dd9a5d0e8d9046d0e99b72487f3316b51
+Author: A. Jiang <de34@live.cn>
+Date:   Sat Jul 29 00:16:03 2023 +0800
+
+    [std.iterator.tags] Use "declare" for typedef-names
+
+commit 535f5a348bf4eab6c0d71673209bc853103880c2
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Apr 24 00:28:25 2024 +0800
+
+    [const.iterators.types] Avoid "defining" `iterator_category`
+
+    Use "declare" instead.
+
+commit af81d11662c4b7dfb135176c5282788f6e3f50d4
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Apr 24 00:28:58 2024 +0800
+
+    [move.iterator] Avoid "defining" `iterator_category`
+
+    Use "declare" instead.
+
+commit 45a31c6e70f49792ee3650a106ad03a8a95d7e03
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Apr 24 00:29:32 2024 +0800
+
+    [common.iter.types] Avoid "defining" typedef-names
+
+commit 5253ec6c6229c704303d682c4bd1d0e197506716
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Apr 24 00:30:51 2024 +0800
+
+    [range.filter.iterator] Avoid "defining" typedef-names
+
+    Use declared" instead.
+
+commit 251d0c7ef52327f628086e228a244792a467f27c
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Apr 24 00:31:39 2024 +0800
+
+    [range.transform.iterator] Avoid "defining" typedef-names
+
+    Use "declare" instead.
+
+commit 1fa1d4afe6111b03aeec7ced79ed0bf7f6a2569b
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Apr 24 00:32:17 2024 +0800
+
+    [range.join.iterator] Avoid "defining" typedef-names
+
+    Use "declare" instead.
+
+commit 55e740c366d1c691c31fda455f6acfcfe7e60979
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Apr 24 00:33:09 2024 +0800
+
+    [range.join.with.iterator] Avoid "defining" typedef-names
+
+    Use "declare" instead.
+
+commit ff0957c1a71f4b668acf9d316efcb31d59495398
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Apr 24 00:45:09 2024 +0800
+
+    [range.concat.iterator] Avoid "defining" typedef-names
+
+    Use "declare" instead.
+
+commit 293648ef77f2533187a1ca89f9649c21da0c06b1
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Apr 24 00:33:37 2024 +0800
+
+    [range.elements.iterator] Avoid "defining" typedef-names
+
+    Use "declare" instead.
+
+commit ae40e054b0ad38993c52f454862682bcdd3bee14
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Apr 24 00:34:43 2024 +0800
+
+    [range.zip.transform.iterator] Avoid "defining" `iterator_category`
+
+    Use "declare" instead.
+
+commit 20564e2186a5f237f1a89fb0b470eb19f662fe2d
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Apr 24 00:35:44 2024 +0800
+
+    [range.stride.iterator] Avoid "defining" typedef-names
+
+    Use "declare" instead.
+
+commit da9cc238aa051d127e7ea0d196622a161cab77f1
+Author: A. Jiang <de34@live.cn>
+Date:   Thu Oct 17 19:19:03 2024 +0800
+
+    [format.string.std] Use "declare" for typedef-names
+
+commit b77796b42a5d2854a186858d8a36c558ddc18da4
+Author: A. Jiang <de34@live.cn>
+Date:   Sat Jul 29 00:47:45 2023 +0800
+
+    [atomics.alias] Use "declare" for typedef-names
+
+commit ae8e81dfc21ead75c8d4fcfdb75c4638b14a7fdb
+Author: A. Jiang <de34@live.cn>
+Date:   Sat Jul 29 00:48:28 2023 +0800
+
+    [stdatomic.h.syn] Use "declare" for typedef-names
+
+commit 7d4d7f37aa2122fe6e292fcc9520b022fba70d13
+Author: Hubert Tong <hubert.reinterpretcast@gmail.com>
+Date:   Fri Dec 19 03:50:07 2025 -0400
+
+    [expr.const] Fix typo "with [...]" => "within the evaluation" (#8669)
+
+commit e9fa860d3af7236fbe43d56ffef4abec93b6a0c9
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 23:54:38 2025 +0000
+
+    [basic.contract.eval] Replace "operation" with "evaluation"
+
+commit 4dc76ac3cc9895782b199af745dd42614a7d0327
+Author: Hewill Kang <hewillk@gmail.com>
+Date:   Tue Dec 23 01:15:15 2025 +0800
+
+    [flat.multiset.modifiers] Add missing constexpr (#8675)
+
+commit a4fbfa2a689dbd2f0d7a16b29af92dc74574381d
+Author: Andrey Ali Khan Bolshakov <bolsh.andrey@yandex.ru>
+Date:   Tue Dec 23 09:57:57 2025 +0300
+
+    [time.syn] Add missing namespace qualification (#8677)
+
+commit 7abca25d03460cd35e880f29fc7001c69218594a
+Author: Alisdair Meredith <alisdairm@me.com>
+Date:   Tue Dec 23 13:21:13 2025 -0500
+
+    [expr.new] Precise cross-reference for throwing exceptions (#8681)
+
+commit db380b0d4015eb7d2956e73e59c1c5c26f3651a4
+Author: A. Jiang <de34@live.cn>
+Date:   Mon Dec 29 09:54:10 2025 +0800
+
+    [version.syn] Reformat a comment to avoid splitting `<type_traits>`
+
+    Co-authored-by: Alisdair Meredith <alisdairm@me.com>
+
+commit c59d8c8e9d6fe8adba2142d1344b0e142c9d6ff4
+Author: A. Jiang <de34@live.cn>
+Date:   Mon Dec 29 09:54:36 2025 +0800
+
+    [initializer.list.syn] Drop redundant comments
+
+commit 3dc04f5cda1c8470c0da7c6f9ffcd6d463429ef2
+Author: Hana Dusíková <hanicka@hanicka.net>
+Date:   Fri Jan 2 16:35:49 2026 +0100
+
+    [hive.cons] Fix typo "allocator_traits<alloc>" -> "allocator_traits<Allocator>" (#8689)
+
+commit 7c8a960f3f06d5c565b0976402ce534848926181
+Author: Hewill Kang <hewillk@gmail.com>
+Date:   Sat Jan 24 00:52:07 2026 +0800
+
+    [forward.list.overview] Add missing constexpr (#8717)
+
+commit f3b76296f598bc5266e649f8fb0a2c5ef19ae0c3
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Mon Jan 26 15:52:54 2026 +0100
+
+    [temp.dep.type] Add period to end of sentence (#8723)
+
+commit 6704d82cd336baaa4f6fe45013c390453991ee86
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Fri Jan 30 21:57:16 2026 +0100
+
+    [except.handle] Add commas (#8727)
+
+commit 16f4265888fd30e59512a21a5391327d6b525de1
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Sat Jan 31 19:28:43 2026 +0100
+
+    [value.error.codes] Fix indefinite article (#8730)
+
+commit 91156093a76177329a990dfdf38f19dad3531688
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Tue Feb 3 23:19:25 2026 +0100
+
+    [concept.comparisoncommontype] Add period to end of sentence (#8731)
+
+commit 15fc5a2f7106963d8e7904eee03bebe2aaf7a81b
+Author: Giuseppe D'Angelo <dangelog@users.noreply.github.com>
+Date:   Sun Feb 22 20:45:53 2026 +0100
+
+    [alg.remove] Use E(i) for predicate on iterator i (#8760)
+
+    The `E` in the code is actually meant to be a function on an
+    iterator `i`; amend both usages to `E(i)`. This was already done
+    everywhere else (for instance in copy_if or unique_copy).
+
+commit 5b07f42565be7972f2b5d729a740da12c5e6b202
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Tue Feb 24 10:35:57 2026 +0000
+
+    [thread.mutex.requirements.mutex.general] Fix grammar (#8765)
+
+commit 4ce955bd576f6a9d68da494e8b560ca8b9375005
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Tue Feb 24 10:38:03 2026 +0000
+
+    [exec.snd.expos] Fix order of make_obj_using_allocator arguments (#8766)
+
+commit 3f6372b97bcdee30b8591077c8479a56bb50fc67
+Author: timsong-cpp <rs2740@gmail.com>
+Date:   Wed Feb 25 15:35:49 2026 -0600
+
+    [const.wrap.class] Add missing this to compound assignment operators (#8758)
+
+    This corrects a misapplication of LWG4383 in commit bdcfe2c9a54ca350e9bfc59227bb0285a59c635d.
+
+commit 8338b7caa5a38ef79e5c2f8316078f6f74d1b8ad
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Thu Mar 5 08:58:29 2026 +0100
+
+    [text.encoding.id] Add colon after "as follows" (#8776)
+
+commit eba89bc9b32d230168571737d6aa86c06329502b
+Author: Alisdair Meredith <alisdairm@me.com>
+Date:   Mon Dec 22 17:59:19 2025 -0500
+
+    [lex.phases] Make note on the notion of file more prominent
+
+    The notion that when the standard refers to files does not
+    necessarily imply a file in a traditional filing system is
+    more fundamental than its late appearance in the middle of
+    phase 7 of translation.  Move that note right to the top of
+    [lex] where we first talk of storing the program text in
+    source files, where is will be understood even before the
+    phases of translation.
+
+commit 13cad628c5c3883c8fb8dcb4256199b21c13be1d
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Thu Mar 12 08:08:56 2026 +0100
+
+    [istream.unformatted] Add right parenthesis
+
+commit 981d32246c951b18dc816cecfdb3ffbb5d72ad54
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Tue Mar 17 21:04:34 2026 +0100
+
+    [stoptoken.concepts] Remove superfluous \item (#8790)
+
+commit 92b3a22228ffb3db219debace0e5fbe82c592354
+Author: Can <cancagri.dev@gmail.com>
+Date:   Fri Mar 20 10:32:30 2026 +0300
+
+    [utility.intcmp] Fix name of type parameter (#8770)
+
+    Introduced by commit 93914a36c1945d330a7c7d5c4488e1d10e5bbe75 .
+
+commit 11106fc54b79e1ee21805ea77596908ca4f3a8f3
+Author: Abhinav Agarwal <abhinavagarwal07@users.noreply.github.com>
+Date:   Fri Mar 20 10:56:06 2026 -0700
+
+    [mdspan.sub.map.common,mdspan.sub.map.left] Fix S(p)liceSpecifiers typos (#8799)
+
+commit 36ce9cbe82d472997ca9b978e69e64d6ddd99dcd
+Author: Abhinav Agarwal <abhinavagarwal07@users.noreply.github.com>
+Date:   Fri Mar 20 10:56:49 2026 -0700
+
+    [linalg.algs.blas3.rank2k] Add missing \pnum and \effects (#8801)
+
+commit cda7c18d2b83b354bae6001cdf7cb7d3f9203f32
+Author: A. Jiang <de34@live.cn>
+Date:   Sat Mar 21 17:36:47 2026 +0800
+
+    [lib] Replace bad uses of "instantiation" with "specialization" (#8379)
+
+    Affected sections:
+    - [allocator.requirements.general]
+    - [namespace.std]
+    - [pointer.traits.types]
+    - [allocator.traits.types]
+    - [tuple.general]
+    - [format.context]
+    - [numeric.requirements]
+    - [rand.util.canonical]
+    - [thread.req.lockable.timed]
+    - [thread.sharedtimedmutex.requirements.general]
+
+    - In [tuple.general], change "is similar to" to "behaves similarly to"
+    to avoid confusing with "similar types" in the core specification.
+
+commit dc5928bdac7e3301d78c8fae5f4cae655a9a06fb
+Author: A. Jiang <de34@live.cn>
+Date:   Sun Mar 22 14:14:40 2026 +0800
+
+    [vector.bool.fmt][container.adaptors.format] Add missing `constexpr` and other missed edits (#8768)
+
+    Fixes edits from P3391R2 missed by commit cc63c64cba30089a366b024ffc8cc0532b4fb508 .
+
+commit c6fecf491063eef95384e54813812f6c6aaeab6a
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Mon Mar 23 11:40:36 2026 +0000
+
+    [expected.object.eq] Add missing negation (misapplied wording).
+
+    The negation was accidentally omitted in the application of P3905R0,
+    approved in Kona 2025 (265b4774c754b36e50bec7a528cbbc87676b0c85).
+
+commit 6913287752040f7adecdac5af60c90e2701a04e0
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Feb 25 15:04:34 2026 +0800
+
+    [format] Consistently add `constexpr` to function descriptions
+
+    P3391R2 only added `constexpr` to synopses but not descriptions for some
+    formatting functions. This PR consistently adds `constexpr` to the
+    descriptions.
+
+commit 45c820b6a9d87b18f3ad5c445c5e61e2ee806a6d
+Author: Hubert Tong <hubert.reinterpretcast@gmail.com>
+Date:   Tue Dec 16 23:52:12 2025 -0500
+
+    [diff.basic] Use enum example instead of example outdated since C99
+
+    C99 subclause 6.2.7, "Compatible type and composite type", had this
+    sentence:
+    > If one is declared with a tag, the other shall be declared with the
+    > same tag.
+
+commit 3e53098c0ef22b62ab2dd393411141fceeda03bd
+Author: Hubert Tong <hubert.reinterpretcast@gmail.com>
+Date:   Tue Dec 16 23:57:14 2025 -0500
+
+    [diff.basic] Stop claiming, as harmless, type-based aliasing violations
+
+commit c40c5f03a02c7e0f2564de46aea4ceebb1c799e4
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Fri Feb 13 12:21:45 2026 +0100
+
+    [intro.compliance.general] Mark documentation encouragement as recommended practice
+
+commit d8ff3c08615932a207f956a61ebd6e5805f9a9bd
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 17:15:48 2025 +0000
+
+    [basic.stc.dynamic] Spell out compound type names
+
+commit e70a19ba60ccf3eeed62bf82e4b33584272a1c86
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Thu Feb 26 08:30:31 2026 +0100
+
+    [lex.key] Emphasize that keywords are created in phase 6
+
+    This was overlooked in CWG3094, applied with commit 94055b39a90285d8ae15f8f864a39a328f42a359.
+
+commit 0807a339b8bcae60a9d2285f0a08aab61aeece0d
+Author: Barry Revzin <barry.revzin@gmail.com>
+Date:   Thu Jan 29 07:59:28 2026 -0600
+
+    Clarify pack-index-specifier rules
+
+commit f55d63dcef1640f292451a3efe98f56d4afa2383
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 17:56:03 2025 +0000
+
+    [basic.fundamental] Strike explanatory sentence; touch up note
+
+commit f4d8ecb2aa29122d63e5f56119a83dd4bb2ad3ca
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 18:23:18 2025 +0000
+
+    [basic.extended.fp] Replace "typedef-name" with "type alias"
+
+commit 2efe693eb09f8c6d364c757a82b640e2ced9f107
+Author: Eisenwave <me@eisenwave.net>
+Date:   Wed Dec 17 14:32:48 2025 +0100
+
+    [intro.refs], [numeric.limits] Remove all references to ISO/IEC 10967-1:2012
+
+commit b54449db95dcdfa8ae4d8221ef55f7fca0f358d9
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 23:06:53 2025 +0000
+
+    [basic.start.static] Improve readability of example
+
+commit cd15f7a88e6390fb31aa766196205e722779d240
+Author: Hubert Tong <hubert.reinterpretcast@gmail.com>
+Date:   Thu Dec 18 19:41:46 2025 -0500
+
+    [stmt.pre] Streamline decl-specifier restrictions on conditions, etc.
+
+    Avoid an abrupt shift from a mathematical introduction to the
+    specification of additional normative requirements.
+
+    Expresses universal quantification more directly.
+
+commit d3f57042d283c06cdb066eab1fc61661df0fc4de
+Author: Eisenwave <me@eisenwave.net>
+Date:   Sun Jul 23 14:23:21 2023 +0200
+
+    [temp.point] Itemize long conditionals in three paragraphs
+
+commit ecc669c503bb875b65cbd4de3d231a8ac9e4bb70
+Author: Hewill Kang <hewillk@gmail.com>
+Date:   Tue Mar 10 15:07:57 2026 +0800
+
+    [meta.syn] Add function parameter names
+
+    These two seem to be the only ones where the function parameter names are omitted in the declaration.
+    Add names to ensure consistency.
+
+commit 98a668efc2ab0bea86dcf9a2d8bf583dddc35e32
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Thu Mar 26 21:57:48 2026 +0100
+
+    [expr.const] Introduce subclauses
+
+commit a2933d5fd4e592bcd8669a51a359c5a850b32de2
+Author: Davis Herring <herring@lanl.gov>
+Date:   Thu Mar 26 21:00:20 2026 +0000
+
+    Refine cross references into [expr.const]
+
+commit 13906dcab8cfb87f880ea444336cbcc37165cd67
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Thu Dec 11 14:14:32 2025 +0000
+
+    [basic.lookup.unqual] Rephrase to avoid incorrect use of term
+
+commit ad94af979e8dfac9ca9af4aa22c66beec7935cfd
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Mar 25 21:05:15 2026 +0800
+
+    [iostream.forward.overview] Add missing mentions of spanbuf and spanstreams
+
+    A follows up to P0448R4.
+
+commit 6a31f94c5ef15fdb592c558cd63b2bd02bd18c8a
+Author: A. Jiang <de34@live.cn>
+Date:   Wed Mar 25 21:05:37 2026 +0800
+
+    [iostream.forward.overview] Say "designate specialization".
+
+    This replaces the imprecise and informal phrase "define instances of
+    class templates".
+
+commit 731cda191b915555c6816912361e431c82e7e2f6
+Author: Matthias Kretz <m.kretz@gsi.de>
+Date:   Tue Nov 4 05:17:01 2025 -1000
+
+    [simd.permute.*] Change M back to V since the wording refers to V
+
+    This was changed editorially by b6e501026e14600fed911183336266c0ebdf5728
+    as part of "2025-06 LWG Motion 13: P3691R1 Reconsider naming of the
+    namespace for std::simd", but turned out not to be a helpful change,
+    because it makes other wording more complex.
+
+    Fixes NB US 180-295 (C++26 CD).
+
+commit 7f3b7c64a18610948bfc5479a90764f4992731bd
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 22:00:24 2025 +0000
+
+    [intro.races] Fix typo
+
+commit e1ee86a3c373c53db7b5d6289457eed620862c76
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Fri Mar 27 13:17:33 2026 +0100
+
+    [simd.syn,simd.permute.mask] Change M::value_type& to V::value_type&
+
+commit 8cef46b15b21d4ab1b96dce04c0d37e511d1ddc2
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Mon Oct 6 00:24:35 2025 +0200
+
+    [exec.snd.expos] Reorder specification immediately after declaration
+
+    Fixes NB US 213-353 (C++26 CD).
+
+commit 6fc165022194a0dd3b78287b087e7872c6c88f48
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Fri Mar 27 11:58:32 2026 +0000
+
+    [exec.get.compl.sched] Rename completion-tag to completion-fn-tag and reorder text.
+
+    The renaming avoids a clash with the concept "completion-tag" defined
+    in [exec.snd.expos]. The reordering makes it so that names are defined
+    before they are referenced.
+
+commit deb2a9b40a46062dd76a1bbc968ff5039cb02aaf
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat Mar 28 08:56:40 2026 +0000
+
+    [exec.snd.expos] Delete unused expos-only concept "completion-tag".
+
+    Also insert a missing \pnum before the now-split codeblock (see 8cef46b15b21d4ab1b96dce04c0d37e511d1ddc2).
+
+commit fda5e3771f85dfea6d7bd8ade0577e82886addc0
+Author: Abhinav Agarwal <abhinavagarwal1996@gmail.com>
+Date:   Fri Mar 20 02:36:07 2026 -0700
+
+    [dcl.struct.bind] Fix tuple-like binding index to use SB_i instead of v_i
+
+    P1061R10 introduced the SB_i notation for post-expansion structured bindings
+    but this sentence was not updated. The rest of the section (p6, p8, and the
+    end of this same paragraph) already uses SB_i.
+
+commit 42f878f50d1356866b5aebe520a3138f707919a0
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Mon Dec 15 00:01:35 2025 +0000
+
+    [basic] Do not hyphenate "potentially evaluated"
+
+commit 70e753882b290ea432e516b75fd924bc687076be
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Mon Dec 15 00:03:46 2025 +0000
+
+    [expr] Do not hyphenate "potentially evaluated"
+
+commit d296b82c70dcf49a7a10a100778ecd6aed4c92c7
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Mon Dec 15 00:04:54 2025 +0000
+
+    [dcl] Do not hyphenate "potentially evaluated"
+
+commit 9ad63b74fae211473235c8fa087d19d392c04728
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Mon Dec 15 00:05:31 2025 +0000
+
+    [temp.over.link] Do not hyphenate "potentially evaluated"
+
+commit 180830c280023ea63165547b937da8265b6bd667
+Author: S. B. Tam <cpplearner@outlook.com>
+Date:   Fri Apr 3 21:10:21 2026 +0800
+
+    [mdspan.mdspan.cons] Fix typo (`is_nothrow_constructible` => `is_nothrow_constructible_v`)
+
+commit c52c49ab2bcb5770ec2190f3381051442e037157
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Mon Apr 20 01:49:17 2026 +0100
+
+    [task.promise] Delete unused definition of expos-only error-variant.
+
+    The changes from LWG 4339 removed the use of this type alias,
+    but not its definition.
+
+commit ec642cdab87f6f83392196a1600d19d893c17b08
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 12 20:52:51 2026 +0100
+
+    [mdspan.syn] Renamed template parameter from "Slices" to "SliceSpecifiers".
+
+    The latter form is used everywhere else, including in the item's itemdecl.
+
+commit bcb6a56a5d2bef008ed02de89b50acdd7e8b8b1d
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Mon Apr 20 18:47:33 2026 +0200
+
+    [exec.get.domain] Remove extraneous period after list (#8956)
+
+commit 6fd25df420db99ce2607b7ce3741f4d1891d0ceb
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sun Feb 22 19:14:40 2026 +0100
+
+    [temp.deduct.conv] Add comma to structure the sentence
+
+commit 25182503a4a94a3fb56c48c80fca56a713095882
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Thu Apr 16 17:25:53 2026 +0200
+
+    [cpp.pre] Remove confused footnote about 'lines'
+
+commit cd6c5bf4871a80b1e865f85a7e1e104036ce2869
+Author: Jay Ghiron <55773281+Halalaluyafail3@users.noreply.github.com>
+Date:   Mon Apr 20 12:52:13 2026 -0400
+
+    [diff.expr] Update incorrect comment about C (#8933)
+
+    arr2 is a constraint violation in C, rather than being valid.
+
+commit 9909e30038ee608225a67f62b355a60d1a679325
+Author: Hewill Kang <hewillk@gmail.com>
+Date:   Thu Apr 16 21:22:13 2026 +0800
+
+    [mdspan.layout.leftpad.obs, mdspan.layout.rightpad.obs] Fix return type of operator()
+
+commit 1651c628caed73f26e120a604eca6798f4da6afc
+Author: Hewill Kang <hewillk@gmail.com>
+Date:   Tue Apr 21 04:40:40 2026 +0800
+
+    [linalg] Add period after \returns statement on same line (#8950)
+
+commit 6211dc859a519b7ff5cca0bfbd953f3b4bd73450
+Author: Hewill Kang <hewillk@gmail.com>
+Date:   Wed Apr 8 12:19:17 2026 +0800
+
+    [linalg.scaled.scaledaccessor,linalg.conj.conjugatedaccessor] Added missing typename
+
+commit 0a236f9185a2e59c7a49b5439135ee995460bcd6
+Author: A. Jiang <de34@live.cn>
+Date:   Tue Apr 21 20:02:56 2026 +0800
+
+    [numarray] Remove incorrect comments for deleted default constructors (#8962)
+
+commit 1e747bf358e4546e9661c6bcee01a1dd71d2186f
+Author: Tymi <tymi@tymi.org>
+Date:   Tue Apr 21 21:58:09 2026 +0200
+
+    [fs.class.path] Use "typedef-name" instead of "typedef" (#8964)
+
+commit 240dc1f4e197dac0004fb5b171ea7c717fba89c9
+Author: timsong-cpp <rs2740@gmail.com>
+Date:   Tue Apr 21 21:51:27 2026 -0500
+
+    [meta.define.static] Move misplaced \end{codeblock}
+
+commit c07075ab7018c7a88d0d254c4c9262d9a6978c94
+Author: timsong-cpp <rs2740@gmail.com>
+Date:   Tue Apr 21 22:14:11 2026 -0500
+
+    [meta.define.static] Rephrase sentence to avoid overfull \hbox
+
+commit 259dcba53500aa26b555f1f952382f484a904cd1
+Author: Hewill Kang <hewillk@gmail.com>
+Date:   Wed Apr 22 21:46:07 2026 +0800
+
+    [mdspan.syn, mdspan.sub.range.slices] Remove redundant std
+
+commit 3532b45c6d9dd37d3f9f949b8307960b7a53eff0
+Author: Hewill Kang <hewillk@gmail.com>
+Date:   Thu Apr 23 00:30:10 2026 +0800
+
+    [mdspan.sub.helpers] Use period for \returns (#8977)
+
+commit e3a17c5b35d7903f85ff136aeaf9000e6b081517
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Thu Apr 23 21:50:58 2026 +0200
+
+    [utility.arg.requirements] Strike redundant text about core language rules (#8987)
+
+commit 3b5d4f6e215c9fad9472ce1d748cf74b90817ad2
+Author: A. Jiang <de34@live.cn>
+Date:   Fri Apr 24 03:58:27 2026 +0800
+
+    [format.arguments, depr.format.arg] Apply `\exposid` consistently (#8971)
+
+    Co-authored-by: Alisdair Meredith <alisdairm@me.com>
+    Co-authored-by: Jonathan Wakely <github@kayari.org>
+    Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
+
+commit 673a0e4fc97da58665e7f69e00b0f70e5924795e
+Author: A. Jiang <de34@live.cn>
+Date:   Fri Apr 24 17:47:21 2026 +0800
+
+    [re.tokiter.general] Fix incorrect `suffix.match` to use `.matched` (#8988)
+
+commit 663b952c59c4b77e233179189f410ce1d952ea59
+Author: timsong-cpp <rs2740@gmail.com>
+Date:   Fri Apr 24 12:02:16 2026 -0500
+
+    [meta.define.static] correct note after CWG3141
+
+commit fecad5839345644f30f8b5d9c1043e2a4e666fc8
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 15:30:37 2026 +0100
+
+    [basic.compound] Add missing \grammarterm.
+
+    Misapplication of CWG Motion 1, Issue CWG 2765.
+
+    Addresses editorial review committee feedback.
+
+commit d3128aacb391726a0c15b8649f9c8e2ca199789e
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 15:34:23 2026 +0100
+
+    [bit.cast] Update cross-reference into [expr.const] following 98a668efc2ab0bea86dcf9a2d8bf583dddc35e32.
+
+    The editorial change was made after the wording of CWG 2765 was written.
+
+    Addresses editorial review committee feedback.
+
+commit 5c2c9dd250af893345b6dbb28c793d8894d4b3c8
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 15:50:02 2026 +0100
+
+    [expr.prim.splice] Add missing maths font for variable "C".
+
+    Misapplication of P3598R0 in CWG Motion 8.
+
+    Addresses editorial review committee feedback.
+
+commit 8425e4a1c4fa7c928b33c6796b45cfd81d15160a
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 16:05:53 2026 +0100
+
+    [lex.phases] Update cross-reference into [expr.const] following 98a668efc2ab0bea86dcf9a2d8bf583dddc35e32.
+
+    The editorial change was made after the wording of P4143R0 was written.
+
+    Addresses editorial review committee feedback.
+
+commit 01296b2d6e73ade37803f9721de7bdad437b4e3b
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 16:09:52 2026 +0100
+
+    [temp.inst] Add missing \grammarterm.
+
+    Misapplication of CWG Motion 11, P4149R1.
+
+    Addresses editorial review committee feedback.
+
+commit d5078b039da4e188f5de51682c2219f26b8367f9
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 16:20:12 2026 +0100
+
+    [exec.spawn.future] Add missing \exposid.
+
+    Misapplication of LWG Motion 2, Issue LWG 4540.
+
+    Addresses editorial review committee feedback.
+
+commit 89cc24e855b5a89f099859685fc21fb37f03a36c
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 16:24:46 2026 +0100
+
+    [algorithm.syn] Remove stray comma.
+
+    This seems to be an error in the wording of LWG 4544 (LWG Motion 2).
+
+    Addresses editorial review committee feedback.
+
+commit 83f5072a59b06575d1108e7f63ef28b00fb4e4b2
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 18:39:03 2026 +0100
+
+    [simd.math] Remove stray '@'s.
+
+    Addresses editorial review committee feedback.
+
+commit ef5f532d2530a733011b0d606dfe69b952c718f6
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 18:46:26 2026 +0100
+
+    [simd.math] Remove stray '\' (unintended escaping).
+
+    Addresses editorial review committee feedback.
+
+commit d706f2d4fa89e7bcaa54338b9619ead9add59c67
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 18:49:24 2026 +0100
+
+    [simd.math] Better linebreaking/whitespacing in remquo description.
+
+    Addresses editorial review committee feedback.
+
+commit 9c5becee9a6ca91aad690074069be058f780006f
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 21:12:54 2026 +0100
+
+    [simd.expos{,defn}] Fixed template parameter "class T" => "size_t Bytes".
+
+    Misapplication of P3932R0 in LWG Motion 5.
+
+    Addresses editorial review committee feedback.
+
+commit 120d987ce6a376f1d56b84041d8e69aefaa436ec
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 21:21:12 2026 +0100
+
+    [exec.let] Fix misspelled "declval" use.
+
+    Misapplication of P3826R5 in LWG Motion 28.
+
+    Addresses editorial review committee feedback.
+
+commit daffae75c71890ca82c5021404c9a005e8038405
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 21:24:42 2026 +0100
+
+    [exec.let] Add missing '\exposid's.
+
+    Misapplication of P3373R4 in LWG Motion 10.
+
+    Addresses editorial review committee feedback.
+
+commit 39a5cd65c6c2af9a251b8d2d5c7d5e73e86c9fa5
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 22:24:30 2026 +0100
+
+    [dcl.attr.annotation] Add missing "codeblock" environment.
+
+    Misapplication of P3795R2 in LWG Motion 15.
+
+    Addresses editorial review committee feedback.
+
+commit 33a4bec49725127d2e1942f2b074d17242bc0458
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 22:30:48 2026 +0100
+
+    [basic. link] Add "ANN" element to the "data member description sextuple.
+
+    This was missed by P3795R2 in LWG Motion 15, presumably by accident.
+
+    Addresses editorial review committee feedback.
+
+commit f8e7a0665d9919af4b680d60b07dbb322ee1d4cb
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 23:10:01 2026 +0100
+
+    [func.ref.wrap.ctor] Add missing ".value"
+
+    Misapplication of P3948R1 in LWG Motion 16.
+
+    Addresses editorial review committee feedback.
+
+commit d7c02a0f5c21cd235a0ed3921a30b19d75771f2e
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 23:36:15 2026 +0100
+
+    [mdspan.sub.overview] Fix missing edits and missing maths font.
+
+    Misapplication of P3982R2 in LWG Motion 23.
+
+    Addresses editorial review committee feedback.
+
+commit 2a8305d4b5bdf40b9e4e602d30a08e5fed6dd87b
+Author: Abhinav Agarwal <abhinavagarwal1996@gmail.com>
+Date:   Sun Apr 26 16:10:39 2026 -0700
+
+    [mdspan.sub.map.sliceable] Fix M::extent_type to M::extents_type
+
+    Layout mapping types expose extents_type, not extent_type; the
+    latter is a member of extent_slice. As written, IT and M_rank
+    in the Let clause name an undefined member.
+
+commit 368af317f557650b4d3dcf98379f02ef3d00140e
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sat May 2 07:41:44 2026 +0000
+
+    [basic.def] Mark definition of "redeclaration" as such (#8596)
+
+commit 75b6c6535f5115750bcaa588ded5dfa99eb5fa24
+Author: Guyutongxue <guyutongxue@163.com>
+Date:   Tue Apr 28 16:40:13 2026 +0800
+
+    [algorithm.syn] Add missing semicolon and right angle bracket
+
+commit 25401da54dcf000fa09105a8dc3cdcf788d753d5
+Author: Guyutongxue <guyutongxue@163.com>
+Date:   Tue Apr 28 16:42:37 2026 +0800
+
+    [map.overview] Add missing right angle bracket
+
+commit eaa1458d9832084f56f22d60dde77ed2a95b9b7e
+Author: Guyutongxue <guyutongxue@163.com>
+Date:   Tue Apr 28 16:43:27 2026 +0800
+
+    [exec.snd.expos] Add missing left brace
+
+commit 9e15aa83cc1fd4efb06afdb861ebaf6e05f261bd
+Author: Guyutongxue <guyutongxue@163.com>
+Date:   Tue Apr 28 16:45:11 2026 +0800
+
+    [rand.eng.philox, simd.syn] Fix misplaced right angle bracket, missing comma in `hypot`, `lerp` and `fma`
+
+commit f0c6e9e9af125c133dba0336797e2193d7d2cc2e
+Author: Guyutongxue <guyutongxue@163.com>
+Date:   Tue Apr 28 16:45:45 2026 +0800
+
+    [range.filter.sentinel] Add missing semicolon
+
+commit 0fcd7084a93a5bfbbfe177cd9c6859eeca63439a
+Author: Guyutongxue <guyutongxue@163.com>
+Date:   Tue Apr 28 16:46:20 2026 +0800
+
+    [atomics.types.float] Fix typo of `floating-point-type`
+
+commit 1a12df96659d230a376a3da4a2bae3cfc4cd57cb
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 2 15:39:57 2026 +0100
+
+    [exec.get.compl.{domain,sched}] Replace "it" and long expression with "the expression".
+
+    In e82e850497facd0b9f1e65f4de75b475ddde42ed I had shortened a long
+    expression from the incoming paper in [exec.get.compl.domain] to just
+    "it". In review it was suggested that "the expression" is clearer, and
+    that similar wording in [exec.get.compl.sched] should use the same style.
+
+    (Overall, I think it is easier to understand that the shorter
+    reference refers to the same expression than to have to compare
+    two long expressions and determine that they are equal.)
+
+    Addresses editorial review committee feedback.
+
+commit 65970a5aad6e50048dce1a0b4398d63b8a09ea44
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 2 15:50:08 2026 +0100
+
+    [exec.get.compl.domain]
+
+    Misapplication of P3826R5 in LWG Motion 28.
+
+    Addresses editorial review committee feedback.
+
+commit fa590b2628d9a21d6a12afa5a1d22168cb40b2a3
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 2 15:53:50 2026 +0100
+
+    [exec.snd.expos] Fix missing escaping for braces in "{}".
+
+    Misapplication of P3826R5 in LWG Motion 28.
+
+    Addresses editorial review committee feedback.
+
+commit 91e3416490d096cd0c783c1b5b4e922b53a48f4e
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 2 15:57:04 2026 +0100
+
+    [exec.domain.default] Delete stray word "sender".
+
+    The deletion was part of the edit instructions of P3826R5 in LWG
+    Motion 28, but was accidentally missed.
+
+    Addresses editorial review committee feedback.
+
+commit 62be1e6b61e0e3701f4062994cb04eb02d27d1be
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 2 16:00:32 2026 +0100
+
+    [exec.snd.transform] Fix "tag2" => "tag".
+
+    Misapplication of P3826R5 in LWG Motion 28.
+
+    Addresses editorial review committee feedback.
+
+commit 9912050ebe526f32ad1cdec47840fae82099b105
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 2 16:04:37 2026 +0100
+
+    [exec.on] Fix missing escaping for braces in "{...}".
+
+    Misapplication of P3826R5 in LWG Motion 28.
+
+    Addresses editorial review committee feedback.
+
+commit e0ca46ae71122c99c0f098212b2990ed41973b05
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 2 16:07:02 2026 +0100
+
+    [exec.on] Fix missing argument "set_value, ".
+
+    Misapplication of P3826R5 in LWG Motion 28, this edit was just missed.
+
+    Addresses editorial review committee feedback.
+
+commit d04267fda5b9a16ce56beb3137c22900019e0e54
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 2 16:14:53 2026 +0100
+
+    [exec.sync.wait.var] Remove vacuous exception.
+
+    The exception that "sndr is evaluated only once" is no longer
+    necessary, since P3826R5 from LWG Motion 28 removed the previous
+    second mention of the subexpression "sndr". Now that there is only one
+    occurrence of "sndr", it does not need saying that it is only
+    evaluated once.
+
+    Addresses editorial review committee feedback.
+
+commit e5f877a4c0542654017c5cd9152d6c1dba7972b4
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 2 16:19:51 2026 +0100
+
+    [exec.affine] Add missing '\placeholder'.
+
+    Misapplication of P3941R4 in LWG Motion 33.
+
+    Addresses editorial review committee feedback.
+
+commit 3647c192d9ed47bd653e3575b9dc84107b7cd1fc
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 2 16:32:59 2026 +0100
+
+    [exec.{rcvr,snd}.concepts] Add "// exposition only" comments to definitions.
+
+    A missed edit from P4159R0 in LWG Motion 37.
+
+    Addresses editorial review committee feedback.
+
+commit aea0fae459ee3a369e0dc251f674337298433121
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sat May 2 17:13:27 2026 +0100
+
+    [except.terminate] Replace system_context_replaceability with parallel_scheduler_replacement.
+
+    This change is needed for consistency with P4154R0 from LWG Motion 39.
+    Even though that paper didn't ask for this change, that was clearly an
+    oversight.
+
+    Addresses editorial review committee feedback.
+
+commit fb2c3e602417fe8cd33618ff5adb31a86cf9072b
+Author: Hubert Tong <hubert.reinterpretcast@gmail.com>
+Date:   Mon May 4 10:37:18 2026 -0400
+
+    [expr.const] Definition domain fixes for "usable in constant expressions" (#8670)
+
+    Also improves the indexing.
+
+commit 32816d5c2f94da9252ea604c8e7ee17a0657e03c
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Sun Apr 26 16:31:18 2026 +0100
+
+    [simd.{syn,math}] Rename parameters of new overloads of various special maths functions:
+
+    * For comp_ellint_3: from "x, y" to "k, nu"
+    * For cyl_bessel_{i,j,k}: from "x, y" to "nu, x"
+    * For cyl_neumann: from "x, y" to "nu, x"
+    * For ellint_{1,2}: from "x, y" to "k, phi"
+    * For ellint_{1,2}: from "x, y, z" to "k, nu, phi"
+
+    The paper P3844R4 (LWG Motion 4) added those overloads with parameters
+    named differently from the names of the existing overloads, but the
+    latter names seem more appropriate.
+
+    Addresses editorial review committee feedback.
+
+commit 85c6337534d0bdd9cbfa2260609a853e0c40d61f
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 21:54:26 2025 +0000
+
+    [intro.execution] Replace "or" with "and"; clarify wording
+
+commit a383c1ad305a61cbef3e14c698b41f6228e780c3
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Wed Apr 8 04:52:48 2026 +0200
+
+    [basic.extended.fp] Reference C23 instead of "future versions"
+
+commit 87a9fbb3cc85436d876e9c7a79ca1cfbb48ac150
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Mon May 11 23:46:40 2026 +0100
+
+    [meta.reflection] Remove uninformative "// OK" comments from examples.
+
+    Fixes NB US 84-151 (C++26 CD).
+
+commit 5670e07a0ec4a4a3c6201512d86013507c0a9389
+Author: Abhinav Agarwal <abhinavagarwal1996@gmail.com>
+Date:   Sun Apr 26 16:10:54 2026 -0700
+
+[mdspan.sub.map.sliceable] Use lm in sliceable-mapping concept body
+
+The concept body introduces lm (an object of type LayoutMapping) but
+then uses m (an object of type M from the surrounding requirements
+section) in the submdspan_mapping well-formedness check.
+
+commit 738e80f3b19fe9ad73d7a48c382f9584e2f200fd
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Tue May 12 09:41:32 2026 +0100
+
+    [istream.formatted.arithmetic] remove unnecessary whitespace in codeblocks
+
+commit d2e19cd940eec863a39edee1499e75230725925f
+Author: Abhinav Agarwal <abhinavagarwal1996@gmail.com>
+Date:   Tue May 12 03:15:09 2026 -0700
+
+    [linalg.algs.blas2.rank1,linalg.algs.blas2.symherrank1] Restore missing arguments (#8995)
+
+    Fixes a misapplication of P3371R5.
+
+    * [linalg.algs.blas2.rank1] Add missing E in matrix_rank_1_update_c effects
+    * [linalg.algs.blas2.symherrank1] Restore parameters in updating overload
+
+commit 7c2e7f83c4a8af1841f81f798dd9c5db46232e6d
+Author: Abhinav Agarwal <abhinavagarwal1996@gmail.com>
+Date:   Sun Apr 26 16:10:17 2026 -0700
+
+    [mdspan.sub.sub] Fix submdspan slice canonicalization
+
+    Two integration errors in the Let clause introduced by P3663R3:
+    - the function parameter pack is named "slices", but the Let clause
+      references an undefined "raw_slices"; rename the parameter to match
+      subextents (mdspan.sub.extents);
+    - src is an mdspan but canonical_slices takes an extents object;
+      pass src.extents() instead of src.
+
+ + diff --git a/papers/n5047.md b/papers/n5047.md new file mode 100644 index 0000000000..51f8a4568f --- /dev/null +++ b/papers/n5047.md @@ -0,0 +1,1639 @@ +# N5047 Editors' Report -- Programming Languages -- C++ + +Date: 2026-05-12 + +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` + +## Acknowledgments + +Thanks to all those who have +[submitted editorial issues](https://github.com/cplusplus/draft/wiki/How-to-submit-an-editorial-issue), +to those who have provided pull requests with fixes, +and to everyone who drafted motion applications. +Special thanks to Jan Schultke for drafting a lot of motion applications, +to Andreas Krug for ongoing careful reviews, +and to Daniel Krügler for an exceptionally thorough review +that spotted many mistakes in the motion applications. + +## New papers + + * [N5046](https://open-std.org/jtc1/sc22/wg21/docs/papers/2026/n5046.pdf) is the + current working draft for C++26. It replaces + [N5032](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/n5032.pdf). + * N5047 is this Editors' Report. + +The Draft International Standard that will be sent for the ISO ballot has not +yet been completed, but will include the changes from N5046. As usual, since +N5046 has not yet been approved in a WG21 meeting, it is instead being reviewed +by an editorial review committee that was selected in Croydon, as per WG21 +Poll 3. N5046 includes some, but not all of the review committee's feedback. + +## Motions incorporated into working draft + +### Notes on motions + +All motions were applied cleanly. + +Some reconciliation was needed among LWG motions (in particular starting at +motion 28), but paper authors and LWG had already included relevant merging +instructions in the papers. + +The wording of P3980R1 from LWG Motion 29 has been reconciled with intervening +changes from issues LWG 4339 and LWG 4347 from LWG Motion 2. + +### Core working group polls + +CWG Poll 1 does not change the working draft. + +CWG Poll 2. Accept as Defect Reports and apply the proposed resolutions of all issues +except issues 3088, 3119, 3122, 3123, 3124, 3131, 3135, 3140, 3141, 3143, 3145, 3149, 3162, and 3172 in +[P4160R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4160r0.html) +(Core Language Working Group "ready" Issues for the March, 2026 meeting) to the C++ Working Paper. + +CWG Poll 3. Apply the proposed resolutions of issues +3088, 3119, 3122, 3123, 3124, 3131, 3135, 3140, 3143, 3145, 3149, 3162, and 3172 in +[P4160R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4160r0.html) +(Core Language Working Group "ready" Issues for the March, 2026 meeting) to the C++ Working Paper. + +CWG Poll 4. Accept as a Defect Report and apply the changes in +[P3924R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3924r1.html) +(Fix inappropriate font choices for "declaration") to the C++ Working Paper. +This addresses ballot comment US 11-400. + +CWG Poll 5. Accept as a Defect Report and apply the changes in +[P4136R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4136r2.pdf) +(`#line` is not in line with existing implementation) to the C++ Working Paper. +This addresses ballot comment FR-009-108. + +CWG Poll 6. Accept as a Defect Report and apply the changes in +[P4004R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4004r1.pdf) +(Reconsider CWG 1395 "Partial ordering of variadic templates reconsidered") to the C++ Working Paper. + +CWG Poll 7. Accept as a Defect Report and apply the changes in +[P3865R3](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3865r3.pdf) +(Class template argument deduction (CTAD) for type template template parameters) to the C++ Working Paper. + +CWG Poll 8. Apply the changes in +[P3598R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3598r0.pdf) +(CWG 3158 – `const`-ification of Splice Expressions) to the C++ Working Paper. + +CWG Poll 9. Apply the changes in +[P3726R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3726r2.html) +(Adjustments to Union Lifetime Rules) to the C++ Working Paper. +This addresses ballot comment DE 087. + +CWG Poll 10. Accept as a Defect Report and apply the changes in +[P4143R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4143r0.html) +(Constant evaluation when?) to the C++ Working Paper. +This partially addresses ballot comment US 33-065. + +CWG Poll 11. Accept as a Defect Report and apply the changes in +[P4149R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4149r1.html) +(Define "immediate context") to the C++ Working Paper. +This addresses ballot comment US 54-100 and core issues 1844 and 2296. + +CWG Poll 12. Accept as a Defect Report and apply the changes in +[P3769R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3769r1.html) +(Clarification of placement new deallocation) to the C++ Working Paper. + +CWG Poll 13. Apply the proposed resolution of issue 3141 in +[P4160R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4160r0.html) +(Core Language Working Group "ready" Issues for the March, 2026 meeting) to the C++ Working Paper. + +### Library working group polls + +LWG Poll 1. Apply the changes in +[P4145R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4145r0.html) +(C++ Standard Library Ready Issues to be moved in Croydon, Mar. 2026) to the C++ working paper. + +LWG Poll 2. Apply the changes in +[P4146R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) +(C++ Standard Library Immediate Issues to be moved in Croydon, Mar. 2026) to the C++ working paper. + +LWG Poll 3. Apply the changes in +[P3690R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3690r1.pdf) +(Consistency fix: Make `simd` reductions SIMD-generic) to the C++ working paper. +This addresses ballot comment AT8-279. + +LWG Poll 4. Apply the changes in +[P3844R4](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3844r4.pdf) +(Reword [simd.math] for consteval conversions) to the C++ working paper. +This addresses ballot comment DE-286. + +LWG Poll 5. Apply the changes in +[P3932R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3932r0.pdf) +(Fix LWG4470: Fix integer-from in [simd]) to the C++ working paper. + +LWG Poll 6. Apply the changes in +[P4012R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4012r1.pdf) +(Value-preserving consteval broadcast to `simd::vec`) to the C++ working paper. +This addresses ballot comment DE-286. + +LWG Poll 7. Apply the changes in +[P3886R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3886r0.pdf) +(Wording for AT1-057) to the C++ working paper. +This addresses ballot comment AT 1-057. + +LWG Poll 8. Apply the changes in +[P3936R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3936r1.pdf) +(Safer `atomic_ref::address` (FR-030-310)) to the C++ working paper +and update the value of the `__cpp_lib_atomic_ref` macro. +This addresses ballot comment FR-030-310. + +LWG Poll 9. Apply the changes in +[P4140R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4140r0.html) +(Proposed resolution for US70-126: allow incomplete types in type_order) to the C++ working paper. +This addresses ballot comment US 70-126. + +LWG Poll 10. Apply the changes in +[P3373R4](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3373r4.pdf) +(Of Operation States and Their Lifetimes) to the C++ working paper. +CA-338. + +LWG Poll 11. Apply the changes in +[P3986R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3986r1.pdf) +(A Wording Strategy for Inlinable Receivers) to the C++ working paper. +This addresses ballot comment CA-318. + +LWG Poll 12. Accept as a Defect Report and apply the changes in +[P3059R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3059r2.html) +(Making user-defined constructors of view iterators/sentinels private) to the C++ working paper. +This addresses ballot comment GB 09-257. + +LWG Poll 13. Accept as a Defect Report and apply the changes in +[P3725R3](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3725r3.pdf) +(Filter View Extensions for Safer Use, Rev 3) to the C++ working paper. +This addresses ballot comments AT9-249, RU-250, DE-251. + +LWG Poll 14. Apply the changes in +[P3828R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3828r1.pdf) +(Rename the to_input view to as_input) to the C++ working paper. +This addresses ballot comment DE-248. + +LWG Poll 15. Apply the changes in +[P3795R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3795r2.html) +(Miscellaneous Reflection Cleanup) to the C++ working paper. +This addresses ballot comments US 42-078 and US 85-150 and US 122-184 and US 128-192 and US 95-202 and US 131-195. + +LWG Poll 16. Apply the changes in +[P3948R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3948r1.pdf) +(`constant_wrapper` is the only tool needed for passing constant expressions +via function arguments) to the C++ working paper. +This addresses ballot comments FR-019-210 and FR-021-218. + +LWG Poll 17. Apply the changes in +[P3978R3](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3978r3.pdf) +(`constant_wrapper` should unwrap on call and subscript) to the C++ working paper. + +LWG Poll 18. Apply the changes in +[P3961R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3961r1.html) +(Less double indirection in `function_ref`) to the C++ working paper. +This addresses ballot comment RU-220. + +LWG Poll 19. Apply the changes in +[P3981R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3981r2.html) +(Better return types in `std::inplace_vector` and `std::exception_ptr_cast`) to the C++ working paper. +This addresses ballot comments PL-006 and US 68-122 and US 150-228 and GB 08-225. + +LWG Poll 20. Apply the changes in +[P4022R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4022r0.html) +(Remove `try_append_range` from `inplace_vector` for now) to the C++ working paper. +This addresses ballot comment PL-006. + +LWG Poll 21. Apply the changes in +[P4037R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4037r1.html) +(Supporting `signed char` and `unsigned char` in random number generation) to the C++ working paper. +This addresses ballot comment RU-272. + +LWG Poll 22. Apply the changes in +[P3450R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3450r1.html) +(Extend `std::is_within_lifetime`) to the C++ working paper. +This addresses ballot comment US 82-145. + +LWG Poll 23. Apply the changes in +[P3982R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3982r2.html) +(Split `strided_slice` into `extent_slice` and `range_slice` for C++26) to the C++ working paper. +This addresses ballot comment PL-007. + +LWG Poll 24. Apply the changes in +[P4144R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4144r1.html) +(Remove `span`’s `initializer_list` constructor for C++26) to the C++ working paper. + +LWG Poll 25. Apply the changes in +[P3804R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3804r2.html) +(Iterating on `parallel_scheduler`) to the C++ working paper. +This addresses ballot comment RO 4-395. + +LWG Poll 26. Apply the changes in +[P3787R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3787r2.html) +(Adjoints to "Enabling list-initialization for algorithms": uninitialized_fill) to the C++ working paper. +This addresses ballot comment FR-027-267. + +LWG Poll 27. Apply the changes in +[P3842R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3842r2.pdf) +(A conservative fix for constexpr uncaught_exceptions() and current_exception()) to the C++ working paper. +This addresses ballot comments PL-012 and GB 03-119 and DE-120 and US 67-118 and FI-121. + +LWG Poll 28. Apply the changes in +[P3826R5](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3826r5.html) +(Fix Sender Algorithm Customization) to the C++ working paper. +This addresses ballot comments US 207-328 and US 202-326 and FR-031-219 and FI-331 and CA-358. + +LWG Poll 29. Apply the changes in +[P3980R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3980r1.html) +(Task’s Allocator Use) to the C++ working paper. +This addresses ballot comments US 254-385 and US 253-386 and US 255-384 and US 261-391. + +LWG Poll 30. Apply the changes in +[P4156R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4156r0.html) +(Rename meta::has_ellipsis_parameter to meta::is_vararg_function) to the C++ working paper. +This addresses ballot comment FR-017-155. + +LWG Poll 31. Apply the changes in +[P3953R3](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3953r3.html) +(Rename `std::runtime_format`) to the C++ working paper. + +LWG Poll 32. Apply the changes in +[P4052R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4052r0.html) +(Renaming saturation arithmetic functions) to the C++ working paper. +This addresses ballot comment FR-026-265. + +LWG Poll 33. Apply the changes in +[P3941R4](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3941r4.html) +(Scheduler Affinity) to the C++ working paper. +This addresses ballot comments US 232-366 and US 233-365 and US 234-364 and US 235-363 and US 236-362. + +LWG Poll 34. Apply the changes in +[P3856R8](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3856r8.pdf) +(New reflection metafunction - is_structural_type) to the C++ working paper. +This addresses ballot comment US 49-090. + +LWG Poll 35. Apply the changes in +[P3927R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3927r2.html) +(`task_scheduler` support for parallel `bulk` execution) to the C++ working paper. +This addresses ballot comment US 238-368. + +LWG Poll 36. Apply the changes in +[P4151R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4151r1.pdf) +(Rename `affine_on`) to the C++ working paper. + +LWG Poll 37. Apply the changes in +[P4159R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4159r0.html) +(Make `sender_in` and `receiver_of` exposition-only) to the C++ working paper. + +LWG Poll 38. Apply the changes in +[P4154R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4154r0.html) +(Renaming various execution things) to the C++ working paper. +This addresses ballot comments US 205-320 and RO 4-395. + +## National body comment resolution + +A large number of national body comments for the C++26 Committee Draft have been +addressed in this working draft. + +### Editorial comments + +Most editorial national body comments were addressed before the Kona 2025 meeting, +see [Editor’s Report N5033](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/n5033.html) +for the full list. + +A few additional national body comments have since been found editorial +and have now been addressed: + + * CA 109 will be addressed for the DIS. + * US 084-151 [87a9fbb3cc85436d876e9c7a79ca1cfbb48ac150](https://github.com/cplusplus/draft/commit/87a9fbb3cc85436d876e9c7a79ca1cfbb48ac150) + * US 180-295 [731cda191b915555c6816912361e431c82e7e2f6](https://github.com/cplusplus/draft/commit/731cda191b915555c6816912361e431c82e7e2f6) + * US 213-353 [8cef46b15b21d4ab1b96dce04c0d37e511d1ddc2](https://github.com/cplusplus/draft/commit/8cef46b15b21d4ab1b96dce04c0d37e511d1ddc2) + +### Non-editorial comments + +The following national body comments were addressed by the motions approved at the Croydon 2026 meeting: + + * AT 001-057 via [LWG Poll 7](http://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3886r0.pdf) + * AT 002-089 via [CWG Poll 3](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4160r0.html) + * AT 008-279 via [LWG Poll 3](http://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3690r1.pdf) + * AT 009-249 via [LWG Poll 13](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3725r3.pdf) + * CA 318 via [LWG Poll 11](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3986r1.pdf) + * CA 338 via [LWG Poll 10](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3373r4.pdf) + * CA 358 via [LWG Poll 28](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3826r5.html) + * DE 087 via [CWG Poll 9](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3726r2.html) + * DE 120 via [LWG Poll 27](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3842r2.pdf) + * DE 248 via [LWG Poll 14](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3828r1.pdf) + * DE 251 via [LWG Poll 13](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3725r3.pdf) + * FI 121 via [LWG Poll 27](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3842r2.pdf) + * FI 331 via [LWG Poll 28](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3826r5.html) + * FR 003-031 via [CWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4160r0.html) + * FR 009-108 via [CWG Poll 5](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4136r2.pdf) + * FR 017-155 via [LWG Poll 30](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4156r0.html) + * FR 019-210 via [LWG Poll 16](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3948r1.pdf) + * FR 021-218 via [LWG Poll 16](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3948r1.pdf) + * FR 025-246 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * FR 026-265 via [LWG Poll 32](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4052r0.html) + * FR 027-267 via [LWG Poll 26](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3787r2.html) + * FR 030-310 via [LWG Poll 8](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3936r1.pdf) + * FR 031-219 via [LWG Poll 28](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3826r5.html) + * GB 003-119 via [LWG Poll 27](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3842r2.pdf) + * GB 005-129 via [LWG Poll 1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4145r0.html) + * GB 007-223 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * GB 008-225 via [LWG Poll 19](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3981r2.html) + * GB 009-257 via [LWG Poll 12](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3059r2.html) + * GB 011-302 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * PL 006 via [LWG Poll 19](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3981r2.html) and [LWG Poll 20](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4022r0.html) + * PL 007 via [LWG Poll 23](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3982r2.html) + * PL 008 via [LWG Poll 1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4145r0.html) + * PL 012 via [LWG Poll 27](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3842r2.pdf) + * RO 004-395 via [LWG Poll 25](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3804r2.html) + * RO 004-395 via [LWG Poll 38](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4154r0.html) + * RU 220 via [LWG Poll 18](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3961r1.html) + * RU 250 via [LWG Poll 13](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3725r3.pdf) + * RU 268 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * RU 272 via [LWG Poll 21](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4037r1.html) + * US 011-400 via [CWG Poll 4](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3924r1.html) + * US 014-029 via [CWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4160r0.html) + * US 017-030 via [CWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4160r0.html) + * US 033-065 via [CWG Poll 10](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4143r0.html) + * US 042-078 via [LWG Poll 15](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3795r2.html) + * US 048-086 via [CWG Poll 9](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3726r2.html) + * US 049-090 via [LWG Poll 34](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3856r8.pdf) + * US 054-100 via [CWG Poll 11](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4149r1.html) + * US 057-105 via [CWG Poll 3](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4160r0.html) + * US 067-118 via [LWG Poll 27](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3842r2.pdf) + * US 068-122 via [LWG Poll 19](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3981r2.html) + * US 070-126 via [LWG Poll 9](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4140r0.html) + * US 075-138 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * US 081-149 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * US 082-145 via [LWG Poll 22](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3450r1.html) + * US 085-150 via [LWG Poll 15](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3795r2.html) + * US 095-202 via [LWG Poll 15](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3795r2.html) + * US 100-207 via [LWG Poll 15](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3795r2.html) + * US 122-184 via [LWG Poll 15](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3795r2.html) + * US 128-192 via [LWG Poll 15](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3795r2.html) + * US 131-195 via [LWG Poll 15](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3795r2.html) + * US 135-216 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * US 136-217 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * US 139-232 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * US 142-236 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * US 150-228 via [LWG Poll 19](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3981r2.html) + * US 151-242 via [LWG Poll 1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4145r0.html) + * US 152-243 via [LWG Poll 1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4145r0.html) + * US 157-255 via [LWG Poll 1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4145r0.html) + * US 176-280 via [LWG Poll 1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4145r0.html) + * US 189-304 via [LWG Poll 1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4145r0.html) + * US 202-326 via [LWG Poll 28](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3826r5.html) + * US 205-320 via [LWG Poll 38](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4154r0.html) + * US 207-328 via [LWG Poll 28](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3826r5.html) + * US 232-366 via [LWG Poll 33](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3941r4.html) + * US 233-365 via [LWG Poll 33](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3941r4.html) + * US 234-364 via [LWG Poll 33](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3941r4.html) + * US 235-363 via [LWG Poll 33](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3941r4.html) + * US 236-362 via [LWG Poll 33](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3941r4.html) + * US 238-368 via [LWG Poll 35](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3927r2.html) + * US 242-372 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * US 249-379 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * US 253-386 via [LWG Poll 29](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3980r1.html) + * US 254-385 via [LWG Poll 29](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3980r1.html) + * US 255-384 via [LWG Poll 29](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3980r1.html) + * US 257-382 via [LWG Poll 2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4146r0.html) + * US 261-391 via [LWG Poll 29](http://open-std.org/jtc1/sc22/wg21/docs/papers/2026/p3980r1.html) + +## Editorial changes + +### Major editorial changes + +The subclause [expr.const], formerly titled “Constant expressions”, +has been renamed to “Constant evaluation” and its contents have been +divided into smaller subclauses; see commit +[98a668efc2ab0bea86dcf9a2d8bf583dddc35e32](https://github.com/cplusplus/draft/commit/98a668efc2ab0bea86dcf9a2d8bf583dddc35e32). + +### Minor editorial changes + +A log of editorial fixes made to the working draft since N5008 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/n5032...n5046). + + commit cc2efebb57ea02ea2eac19220c873c158f855859 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Mon Dec 15 15:43:02 2025 +0000 + + [basic.start.dynamic] Fix typo (#8654) + + commit 3e6cad293e448f7d9f9d859d07b5371b7e054789 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Mon Dec 15 15:47:37 2025 +0000 + + [basic.types.general] Improve presentation of comments in example (#8636) + + - put "sizeof" in code font + - use a comma after "OK" + + commit f6319760f3f6d9a710fdb4be5e54c111abfc1e92 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 16:21:20 2025 +0000 + + [basic.link] Modernize wording about type aliases + + commit f66f4c675c0c60f822bb24543cd607e14be24a93 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 16:31:25 2025 +0000 + + [intro.memory] Update outdated example + + commit 176528f688cec22566f1de8286f1c3fae43887ce + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 16:46:10 2025 +0000 + + [intro.object] Remove redundant "non-bit-field" + + commit 1d9fdb066e95b7be58881f24977a20a51359097c + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 17:40:14 2025 +0000 + + [basic.types.general] Remove unused meta-variable + + commit 2dbe5a3247b100a6e4cdddab46eda5595d9d3de1 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Mon Dec 15 21:58:39 2025 +0000 + + [basic.start.dynamic] Add cross-reference for "interface dependency" (#8653) + + commit 166fd7efa129ce139e2a859758410fd7fd0955b3 + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Mon Dec 15 20:46:26 2025 +0100 + + [exec.scope.concepts] Fix typos + + commit d8a8c5ad3b354087a416c02c2059b9ef62534c72 + Author: A. Jiang + Date: Thu Apr 25 00:30:02 2024 +0800 + + [expos.only.entity] Say typedef-names are declared + + Also use "provided for exposition only" from @W-E-Brown's suggestion. + + commit 7fcd646f6d82721e32f5fb5dc11994b8b0cf1d64 + Author: A. Jiang + Date: Thu Aug 3 00:37:14 2023 +0800 + + [type.descriptions.general] Use "shown" for impl-def types + + commit 34c7cffe9e7d1807df4b986e648392bb3a1dfae0 + Author: A. Jiang + Date: Thu Aug 3 00:38:04 2023 +0800 + + [enumerated.types] Reword enumerated types + + Also mention [re]. + + commit cc2ecb3a2c85b2e196ca5697287270e9f62878c8 + Author: A. Jiang + Date: Thu Aug 3 00:38:45 2023 +0800 + + [bitmask.types] Reword bitmask types + + commit 03545f10f200193e15d3f0227b289ff037146abf + Author: A. Jiang + Date: Thu Apr 25 00:33:17 2024 +0800 + + [extern.types] Use "declared" for C library types + + commit d21a84cc95a9a3e619139a1c53d7937474ea03b8 + Author: A. Jiang + Date: Fri Jul 28 23:51:45 2023 +0800 + + [cstdint.syn] Use "declare" for typedef-names + + commit ad83c0b2bc498eac0fc4d97850143581dbfa703c + Author: A. Jiang + Date: Fri Jul 28 23:52:27 2023 +0800 + + [stdfloat.syn] Use "declare" for typedef-names + + commit 30000d169f5b6db54d7d61ed35aa825fbbdfa70d + Author: A. Jiang + Date: Fri Jul 28 23:58:28 2023 +0800 + + [meta.rqmts] Use "declare" for typedef-names + + commit c5eac2a7d176110d63e153fa1d5abcee9681943e + Author: A. Jiang + Date: Sat Jul 29 00:02:58 2023 +0800 + + [meta.trans.other] Use "declare" for typedef-names + + In the example, it seems a bit verbose to say "declarations and + definitions". + + commit cbd6e735fdea46f312d27ae802e83766d8dc43f8 + Author: A. Jiang + Date: Sat Jul 29 00:03:49 2023 +0800 + + [ratio.si] Use "declare" for typedef-names + + commit 8210a2cc6ff0bb2a90c9b20cf60ee1d369156c4b + Author: A. Jiang + Date: Sat Jul 29 00:12:12 2023 +0800 + + [readable.traits] Use "declare" for typedef-names + + commit c5b55216c7a80fe7187bdbc4f5e62b6ef53e6008 + Author: A. Jiang + Date: Sat Jul 29 00:14:51 2023 +0800 + + [iterator.traits] Use "declare" for typedef-names + + commit b892cf9dd9a5d0e8d9046d0e99b72487f3316b51 + Author: A. Jiang + Date: Sat Jul 29 00:16:03 2023 +0800 + + [std.iterator.tags] Use "declare" for typedef-names + + commit 535f5a348bf4eab6c0d71673209bc853103880c2 + Author: A. Jiang + Date: Wed Apr 24 00:28:25 2024 +0800 + + [const.iterators.types] Avoid "defining" `iterator_category` + + Use "declare" instead. + + commit af81d11662c4b7dfb135176c5282788f6e3f50d4 + Author: A. Jiang + Date: Wed Apr 24 00:28:58 2024 +0800 + + [move.iterator] Avoid "defining" `iterator_category` + + Use "declare" instead. + + commit 45a31c6e70f49792ee3650a106ad03a8a95d7e03 + Author: A. Jiang + Date: Wed Apr 24 00:29:32 2024 +0800 + + [common.iter.types] Avoid "defining" typedef-names + + commit 5253ec6c6229c704303d682c4bd1d0e197506716 + Author: A. Jiang + Date: Wed Apr 24 00:30:51 2024 +0800 + + [range.filter.iterator] Avoid "defining" typedef-names + + Use declared" instead. + + commit 251d0c7ef52327f628086e228a244792a467f27c + Author: A. Jiang + Date: Wed Apr 24 00:31:39 2024 +0800 + + [range.transform.iterator] Avoid "defining" typedef-names + + Use "declare" instead. + + commit 1fa1d4afe6111b03aeec7ced79ed0bf7f6a2569b + Author: A. Jiang + Date: Wed Apr 24 00:32:17 2024 +0800 + + [range.join.iterator] Avoid "defining" typedef-names + + Use "declare" instead. + + commit 55e740c366d1c691c31fda455f6acfcfe7e60979 + Author: A. Jiang + Date: Wed Apr 24 00:33:09 2024 +0800 + + [range.join.with.iterator] Avoid "defining" typedef-names + + Use "declare" instead. + + commit ff0957c1a71f4b668acf9d316efcb31d59495398 + Author: A. Jiang + Date: Wed Apr 24 00:45:09 2024 +0800 + + [range.concat.iterator] Avoid "defining" typedef-names + + Use "declare" instead. + + commit 293648ef77f2533187a1ca89f9649c21da0c06b1 + Author: A. Jiang + Date: Wed Apr 24 00:33:37 2024 +0800 + + [range.elements.iterator] Avoid "defining" typedef-names + + Use "declare" instead. + + commit ae40e054b0ad38993c52f454862682bcdd3bee14 + Author: A. Jiang + Date: Wed Apr 24 00:34:43 2024 +0800 + + [range.zip.transform.iterator] Avoid "defining" `iterator_category` + + Use "declare" instead. + + commit 20564e2186a5f237f1a89fb0b470eb19f662fe2d + Author: A. Jiang + Date: Wed Apr 24 00:35:44 2024 +0800 + + [range.stride.iterator] Avoid "defining" typedef-names + + Use "declare" instead. + + commit da9cc238aa051d127e7ea0d196622a161cab77f1 + Author: A. Jiang + Date: Thu Oct 17 19:19:03 2024 +0800 + + [format.string.std] Use "declare" for typedef-names + + commit b77796b42a5d2854a186858d8a36c558ddc18da4 + Author: A. Jiang + Date: Sat Jul 29 00:47:45 2023 +0800 + + [atomics.alias] Use "declare" for typedef-names + + commit ae8e81dfc21ead75c8d4fcfdb75c4638b14a7fdb + Author: A. Jiang + Date: Sat Jul 29 00:48:28 2023 +0800 + + [stdatomic.h.syn] Use "declare" for typedef-names + + commit 7d4d7f37aa2122fe6e292fcc9520b022fba70d13 + Author: Hubert Tong + Date: Fri Dec 19 03:50:07 2025 -0400 + + [expr.const] Fix typo "with [...]" => "within the evaluation" (#8669) + + commit e9fa860d3af7236fbe43d56ffef4abec93b6a0c9 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 23:54:38 2025 +0000 + + [basic.contract.eval] Replace "operation" with "evaluation" + + commit 4dc76ac3cc9895782b199af745dd42614a7d0327 + Author: Hewill Kang + Date: Tue Dec 23 01:15:15 2025 +0800 + + [flat.multiset.modifiers] Add missing constexpr (#8675) + + commit a4fbfa2a689dbd2f0d7a16b29af92dc74574381d + Author: Andrey Ali Khan Bolshakov + Date: Tue Dec 23 09:57:57 2025 +0300 + + [time.syn] Add missing namespace qualification (#8677) + + commit 7abca25d03460cd35e880f29fc7001c69218594a + Author: Alisdair Meredith + Date: Tue Dec 23 13:21:13 2025 -0500 + + [expr.new] Precise cross-reference for throwing exceptions (#8681) + + commit db380b0d4015eb7d2956e73e59c1c5c26f3651a4 + Author: A. Jiang + Date: Mon Dec 29 09:54:10 2025 +0800 + + [version.syn] Reformat a comment to avoid splitting `` + + Co-authored-by: Alisdair Meredith + + commit c59d8c8e9d6fe8adba2142d1344b0e142c9d6ff4 + Author: A. Jiang + Date: Mon Dec 29 09:54:36 2025 +0800 + + [initializer.list.syn] Drop redundant comments + + commit 3dc04f5cda1c8470c0da7c6f9ffcd6d463429ef2 + Author: Hana Dusíková + Date: Fri Jan 2 16:35:49 2026 +0100 + + [hive.cons] Fix typo "allocator_traits" -> "allocator_traits" (#8689) + + commit 7c8a960f3f06d5c565b0976402ce534848926181 + Author: Hewill Kang + Date: Sat Jan 24 00:52:07 2026 +0800 + + [forward.list.overview] Add missing constexpr (#8717) + + commit f3b76296f598bc5266e649f8fb0a2c5ef19ae0c3 + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Mon Jan 26 15:52:54 2026 +0100 + + [temp.dep.type] Add period to end of sentence (#8723) + + commit 6704d82cd336baaa4f6fe45013c390453991ee86 + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Fri Jan 30 21:57:16 2026 +0100 + + [except.handle] Add commas (#8727) + + commit 16f4265888fd30e59512a21a5391327d6b525de1 + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Sat Jan 31 19:28:43 2026 +0100 + + [value.error.codes] Fix indefinite article (#8730) + + commit 91156093a76177329a990dfdf38f19dad3531688 + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Tue Feb 3 23:19:25 2026 +0100 + + [concept.comparisoncommontype] Add period to end of sentence (#8731) + + commit 15fc5a2f7106963d8e7904eee03bebe2aaf7a81b + Author: Giuseppe D'Angelo + Date: Sun Feb 22 20:45:53 2026 +0100 + + [alg.remove] Use E(i) for predicate on iterator i (#8760) + + The `E` in the code is actually meant to be a function on an + iterator `i`; amend both usages to `E(i)`. This was already done + everywhere else (for instance in copy_if or unique_copy). + + commit 5b07f42565be7972f2b5d729a740da12c5e6b202 + Author: Jonathan Wakely + Date: Tue Feb 24 10:35:57 2026 +0000 + + [thread.mutex.requirements.mutex.general] Fix grammar (#8765) + + commit 4ce955bd576f6a9d68da494e8b560ca8b9375005 + Author: Jonathan Wakely + Date: Tue Feb 24 10:38:03 2026 +0000 + + [exec.snd.expos] Fix order of make_obj_using_allocator arguments (#8766) + + commit 3f6372b97bcdee30b8591077c8479a56bb50fc67 + Author: timsong-cpp + Date: Wed Feb 25 15:35:49 2026 -0600 + + [const.wrap.class] Add missing this to compound assignment operators (#8758) + + This corrects a misapplication of LWG4383 in commit bdcfe2c9a54ca350e9bfc59227bb0285a59c635d. + + commit 8338b7caa5a38ef79e5c2f8316078f6f74d1b8ad + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Thu Mar 5 08:58:29 2026 +0100 + + [text.encoding.id] Add colon after "as follows" (#8776) + + commit eba89bc9b32d230168571737d6aa86c06329502b + Author: Alisdair Meredith + Date: Mon Dec 22 17:59:19 2025 -0500 + + [lex.phases] Make note on the notion of file more prominent + + The notion that when the standard refers to files does not + necessarily imply a file in a traditional filing system is + more fundamental than its late appearance in the middle of + phase 7 of translation. Move that note right to the top of + [lex] where we first talk of storing the program text in + source files, where is will be understood even before the + phases of translation. + + commit 13cad628c5c3883c8fb8dcb4256199b21c13be1d + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Thu Mar 12 08:08:56 2026 +0100 + + [istream.unformatted] Add right parenthesis + + commit 981d32246c951b18dc816cecfdb3ffbb5d72ad54 + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Tue Mar 17 21:04:34 2026 +0100 + + [stoptoken.concepts] Remove superfluous \item (#8790) + + commit 92b3a22228ffb3db219debace0e5fbe82c592354 + Author: Can + Date: Fri Mar 20 10:32:30 2026 +0300 + + [utility.intcmp] Fix name of type parameter (#8770) + + Introduced by commit 93914a36c1945d330a7c7d5c4488e1d10e5bbe75 . + + commit 11106fc54b79e1ee21805ea77596908ca4f3a8f3 + Author: Abhinav Agarwal + Date: Fri Mar 20 10:56:06 2026 -0700 + + [mdspan.sub.map.common,mdspan.sub.map.left] Fix S(p)liceSpecifiers typos (#8799) + + commit 36ce9cbe82d472997ca9b978e69e64d6ddd99dcd + Author: Abhinav Agarwal + Date: Fri Mar 20 10:56:49 2026 -0700 + + [linalg.algs.blas3.rank2k] Add missing \pnum and \effects (#8801) + + commit cda7c18d2b83b354bae6001cdf7cb7d3f9203f32 + Author: A. Jiang + Date: Sat Mar 21 17:36:47 2026 +0800 + + [lib] Replace bad uses of "instantiation" with "specialization" (#8379) + + Affected sections: + - [allocator.requirements.general] + - [namespace.std] + - [pointer.traits.types] + - [allocator.traits.types] + - [tuple.general] + - [format.context] + - [numeric.requirements] + - [rand.util.canonical] + - [thread.req.lockable.timed] + - [thread.sharedtimedmutex.requirements.general] + + - In [tuple.general], change "is similar to" to "behaves similarly to" + to avoid confusing with "similar types" in the core specification. + + commit dc5928bdac7e3301d78c8fae5f4cae655a9a06fb + Author: A. Jiang + Date: Sun Mar 22 14:14:40 2026 +0800 + + [vector.bool.fmt][container.adaptors.format] Add missing `constexpr` and other missed edits (#8768) + + Fixes edits from P3391R2 missed by commit cc63c64cba30089a366b024ffc8cc0532b4fb508 . + + commit c6fecf491063eef95384e54813812f6c6aaeab6a + Author: Thomas Köppe + Date: Mon Mar 23 11:40:36 2026 +0000 + + [expected.object.eq] Add missing negation (misapplied wording). + + The negation was accidentally omitted in the application of P3905R0, + approved in Kona 2025 (265b4774c754b36e50bec7a528cbbc87676b0c85). + + commit 6913287752040f7adecdac5af60c90e2701a04e0 + Author: A. Jiang + Date: Wed Feb 25 15:04:34 2026 +0800 + + [format] Consistently add `constexpr` to function descriptions + + P3391R2 only added `constexpr` to synopses but not descriptions for some + formatting functions. This PR consistently adds `constexpr` to the + descriptions. + + commit 45c820b6a9d87b18f3ad5c445c5e61e2ee806a6d + Author: Hubert Tong + Date: Tue Dec 16 23:52:12 2025 -0500 + + [diff.basic] Use enum example instead of example outdated since C99 + + C99 subclause 6.2.7, "Compatible type and composite type", had this + sentence: + > If one is declared with a tag, the other shall be declared with the + > same tag. + + commit 3e53098c0ef22b62ab2dd393411141fceeda03bd + Author: Hubert Tong + Date: Tue Dec 16 23:57:14 2025 -0500 + + [diff.basic] Stop claiming, as harmless, type-based aliasing violations + + commit c40c5f03a02c7e0f2564de46aea4ceebb1c799e4 + Author: Jan Schultke + Date: Fri Feb 13 12:21:45 2026 +0100 + + [intro.compliance.general] Mark documentation encouragement as recommended practice + + commit d8ff3c08615932a207f956a61ebd6e5805f9a9bd + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 17:15:48 2025 +0000 + + [basic.stc.dynamic] Spell out compound type names + + commit e70a19ba60ccf3eeed62bf82e4b33584272a1c86 + Author: Jens Maurer + Date: Thu Feb 26 08:30:31 2026 +0100 + + [lex.key] Emphasize that keywords are created in phase 6 + + This was overlooked in CWG3094, applied with commit 94055b39a90285d8ae15f8f864a39a328f42a359. + + commit 0807a339b8bcae60a9d2285f0a08aab61aeece0d + Author: Barry Revzin + Date: Thu Jan 29 07:59:28 2026 -0600 + + Clarify pack-index-specifier rules + + commit f55d63dcef1640f292451a3efe98f56d4afa2383 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 17:56:03 2025 +0000 + + [basic.fundamental] Strike explanatory sentence; touch up note + + commit f4d8ecb2aa29122d63e5f56119a83dd4bb2ad3ca + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 18:23:18 2025 +0000 + + [basic.extended.fp] Replace "typedef-name" with "type alias" + + commit 2efe693eb09f8c6d364c757a82b640e2ced9f107 + Author: Eisenwave + Date: Wed Dec 17 14:32:48 2025 +0100 + + [intro.refs], [numeric.limits] Remove all references to ISO/IEC 10967-1:2012 + + commit b54449db95dcdfa8ae4d8221ef55f7fca0f358d9 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 23:06:53 2025 +0000 + + [basic.start.static] Improve readability of example + + commit cd15f7a88e6390fb31aa766196205e722779d240 + Author: Hubert Tong + Date: Thu Dec 18 19:41:46 2025 -0500 + + [stmt.pre] Streamline decl-specifier restrictions on conditions, etc. + + Avoid an abrupt shift from a mathematical introduction to the + specification of additional normative requirements. + + Expresses universal quantification more directly. + + commit d3f57042d283c06cdb066eab1fc61661df0fc4de + Author: Eisenwave + Date: Sun Jul 23 14:23:21 2023 +0200 + + [temp.point] Itemize long conditionals in three paragraphs + + commit ecc669c503bb875b65cbd4de3d231a8ac9e4bb70 + Author: Hewill Kang + Date: Tue Mar 10 15:07:57 2026 +0800 + + [meta.syn] Add function parameter names + + These two seem to be the only ones where the function parameter names are omitted in the declaration. + Add names to ensure consistency. + + commit 98a668efc2ab0bea86dcf9a2d8bf583dddc35e32 + Author: Jens Maurer + Date: Thu Mar 26 21:57:48 2026 +0100 + + [expr.const] Introduce subclauses + + commit a2933d5fd4e592bcd8669a51a359c5a850b32de2 + Author: Davis Herring + Date: Thu Mar 26 21:00:20 2026 +0000 + + Refine cross references into [expr.const] + + commit 13906dcab8cfb87f880ea444336cbcc37165cd67 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Thu Dec 11 14:14:32 2025 +0000 + + [basic.lookup.unqual] Rephrase to avoid incorrect use of term + + commit ad94af979e8dfac9ca9af4aa22c66beec7935cfd + Author: A. Jiang + Date: Wed Mar 25 21:05:15 2026 +0800 + + [iostream.forward.overview] Add missing mentions of spanbuf and spanstreams + + A follows up to P0448R4. + + commit 6a31f94c5ef15fdb592c558cd63b2bd02bd18c8a + Author: A. Jiang + Date: Wed Mar 25 21:05:37 2026 +0800 + + [iostream.forward.overview] Say "designate specialization". + + This replaces the imprecise and informal phrase "define instances of + class templates". + + commit 731cda191b915555c6816912361e431c82e7e2f6 + Author: Matthias Kretz + Date: Tue Nov 4 05:17:01 2025 -1000 + + [simd.permute.*] Change M back to V since the wording refers to V + + This was changed editorially by b6e501026e14600fed911183336266c0ebdf5728 + as part of "2025-06 LWG Motion 13: P3691R1 Reconsider naming of the + namespace for std::simd", but turned out not to be a helpful change, + because it makes other wording more complex. + + Fixes NB US 180-295 (C++26 CD). + + commit 7f3b7c64a18610948bfc5479a90764f4992731bd + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 22:00:24 2025 +0000 + + [intro.races] Fix typo + + commit e1ee86a3c373c53db7b5d6289457eed620862c76 + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Fri Mar 27 13:17:33 2026 +0100 + + [simd.syn,simd.permute.mask] Change M::value_type& to V::value_type& + + commit 8cef46b15b21d4ab1b96dce04c0d37e511d1ddc2 + Author: Jens Maurer + Date: Mon Oct 6 00:24:35 2025 +0200 + + [exec.snd.expos] Reorder specification immediately after declaration + + Fixes NB US 213-353 (C++26 CD). + + commit 6fc165022194a0dd3b78287b087e7872c6c88f48 + Author: Thomas Köppe + Date: Fri Mar 27 11:58:32 2026 +0000 + + [exec.get.compl.sched] Rename completion-tag to completion-fn-tag and reorder text. + + The renaming avoids a clash with the concept "completion-tag" defined + in [exec.snd.expos]. The reordering makes it so that names are defined + before they are referenced. + + commit deb2a9b40a46062dd76a1bbc968ff5039cb02aaf + Author: Thomas Köppe + Date: Sat Mar 28 08:56:40 2026 +0000 + + [exec.snd.expos] Delete unused expos-only concept "completion-tag". + + Also insert a missing \pnum before the now-split codeblock (see 8cef46b15b21d4ab1b96dce04c0d37e511d1ddc2). + + commit fda5e3771f85dfea6d7bd8ade0577e82886addc0 + Author: Abhinav Agarwal + Date: Fri Mar 20 02:36:07 2026 -0700 + + [dcl.struct.bind] Fix tuple-like binding index to use SB_i instead of v_i + + P1061R10 introduced the SB_i notation for post-expansion structured bindings + but this sentence was not updated. The rest of the section (p6, p8, and the + end of this same paragraph) already uses SB_i. + + commit 42f878f50d1356866b5aebe520a3138f707919a0 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Mon Dec 15 00:01:35 2025 +0000 + + [basic] Do not hyphenate "potentially evaluated" + + commit 70e753882b290ea432e516b75fd924bc687076be + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Mon Dec 15 00:03:46 2025 +0000 + + [expr] Do not hyphenate "potentially evaluated" + + commit d296b82c70dcf49a7a10a100778ecd6aed4c92c7 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Mon Dec 15 00:04:54 2025 +0000 + + [dcl] Do not hyphenate "potentially evaluated" + + commit 9ad63b74fae211473235c8fa087d19d392c04728 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Mon Dec 15 00:05:31 2025 +0000 + + [temp.over.link] Do not hyphenate "potentially evaluated" + + commit 180830c280023ea63165547b937da8265b6bd667 + Author: S. B. Tam + Date: Fri Apr 3 21:10:21 2026 +0800 + + [mdspan.mdspan.cons] Fix typo (`is_nothrow_constructible` => `is_nothrow_constructible_v`) + + commit c52c49ab2bcb5770ec2190f3381051442e037157 + Author: Thomas Köppe + Date: Mon Apr 20 01:49:17 2026 +0100 + + [task.promise] Delete unused definition of expos-only error-variant. + + The changes from LWG 4339 removed the use of this type alias, + but not its definition. + + commit ec642cdab87f6f83392196a1600d19d893c17b08 + Author: Thomas Köppe + Date: Sun Apr 12 20:52:51 2026 +0100 + + [mdspan.syn] Renamed template parameter from "Slices" to "SliceSpecifiers". + + The latter form is used everywhere else, including in the item's itemdecl. + + commit bcb6a56a5d2bef008ed02de89b50acdd7e8b8b1d + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Mon Apr 20 18:47:33 2026 +0200 + + [exec.get.domain] Remove extraneous period after list (#8956) + + commit 6fd25df420db99ce2607b7ce3741f4d1891d0ceb + Author: Jens Maurer + Date: Sun Feb 22 19:14:40 2026 +0100 + + [temp.deduct.conv] Add comma to structure the sentence + + commit 25182503a4a94a3fb56c48c80fca56a713095882 + Author: Jens Maurer + Date: Thu Apr 16 17:25:53 2026 +0200 + + [cpp.pre] Remove confused footnote about 'lines' + + commit cd6c5bf4871a80b1e865f85a7e1e104036ce2869 + Author: Jay Ghiron <55773281+Halalaluyafail3@users.noreply.github.com> + Date: Mon Apr 20 12:52:13 2026 -0400 + + [diff.expr] Update incorrect comment about C (#8933) + + arr2 is a constraint violation in C, rather than being valid. + + commit 9909e30038ee608225a67f62b355a60d1a679325 + Author: Hewill Kang + Date: Thu Apr 16 21:22:13 2026 +0800 + + [mdspan.layout.leftpad.obs, mdspan.layout.rightpad.obs] Fix return type of operator() + + commit 1651c628caed73f26e120a604eca6798f4da6afc + Author: Hewill Kang + Date: Tue Apr 21 04:40:40 2026 +0800 + + [linalg] Add period after \returns statement on same line (#8950) + + commit 6211dc859a519b7ff5cca0bfbd953f3b4bd73450 + Author: Hewill Kang + Date: Wed Apr 8 12:19:17 2026 +0800 + + [linalg.scaled.scaledaccessor,linalg.conj.conjugatedaccessor] Added missing typename + + commit 0a236f9185a2e59c7a49b5439135ee995460bcd6 + Author: A. Jiang + Date: Tue Apr 21 20:02:56 2026 +0800 + + [numarray] Remove incorrect comments for deleted default constructors (#8962) + + commit 1e747bf358e4546e9661c6bcee01a1dd71d2186f + Author: Tymi + Date: Tue Apr 21 21:58:09 2026 +0200 + + [fs.class.path] Use "typedef-name" instead of "typedef" (#8964) + + commit 240dc1f4e197dac0004fb5b171ea7c717fba89c9 + Author: timsong-cpp + Date: Tue Apr 21 21:51:27 2026 -0500 + + [meta.define.static] Move misplaced \end{codeblock} + + commit c07075ab7018c7a88d0d254c4c9262d9a6978c94 + Author: timsong-cpp + Date: Tue Apr 21 22:14:11 2026 -0500 + + [meta.define.static] Rephrase sentence to avoid overfull \hbox + + commit 259dcba53500aa26b555f1f952382f484a904cd1 + Author: Hewill Kang + Date: Wed Apr 22 21:46:07 2026 +0800 + + [mdspan.syn, mdspan.sub.range.slices] Remove redundant std + + commit 3532b45c6d9dd37d3f9f949b8307960b7a53eff0 + Author: Hewill Kang + Date: Thu Apr 23 00:30:10 2026 +0800 + + [mdspan.sub.helpers] Use period for \returns (#8977) + + commit e3a17c5b35d7903f85ff136aeaf9000e6b081517 + Author: Jens Maurer + Date: Thu Apr 23 21:50:58 2026 +0200 + + [utility.arg.requirements] Strike redundant text about core language rules (#8987) + + commit 3b5d4f6e215c9fad9472ce1d748cf74b90817ad2 + Author: A. Jiang + Date: Fri Apr 24 03:58:27 2026 +0800 + + [format.arguments, depr.format.arg] Apply `\exposid` consistently (#8971) + + Co-authored-by: Alisdair Meredith + Co-authored-by: Jonathan Wakely + Co-authored-by: Johel Ernesto Guerrero Peña + + commit 673a0e4fc97da58665e7f69e00b0f70e5924795e + Author: A. Jiang + Date: Fri Apr 24 17:47:21 2026 +0800 + + [re.tokiter.general] Fix incorrect `suffix.match` to use `.matched` (#8988) + + commit 663b952c59c4b77e233179189f410ce1d952ea59 + Author: timsong-cpp + Date: Fri Apr 24 12:02:16 2026 -0500 + + [meta.define.static] correct note after CWG3141 + + commit fecad5839345644f30f8b5d9c1043e2a4e666fc8 + Author: Thomas Köppe + Date: Sun Apr 26 15:30:37 2026 +0100 + + [basic.compound] Add missing \grammarterm. + + Misapplication of CWG Motion 1, Issue CWG 2765. + + Addresses editorial review committee feedback. + + commit d3128aacb391726a0c15b8649f9c8e2ca199789e + Author: Thomas Köppe + Date: Sun Apr 26 15:34:23 2026 +0100 + + [bit.cast] Update cross-reference into [expr.const] following 98a668efc2ab0bea86dcf9a2d8bf583dddc35e32. + + The editorial change was made after the wording of CWG 2765 was written. + + Addresses editorial review committee feedback. + + commit 5c2c9dd250af893345b6dbb28c793d8894d4b3c8 + Author: Thomas Köppe + Date: Sun Apr 26 15:50:02 2026 +0100 + + [expr.prim.splice] Add missing maths font for variable "C". + + Misapplication of P3598R0 in CWG Motion 8. + + Addresses editorial review committee feedback. + + commit 8425e4a1c4fa7c928b33c6796b45cfd81d15160a + Author: Thomas Köppe + Date: Sun Apr 26 16:05:53 2026 +0100 + + [lex.phases] Update cross-reference into [expr.const] following 98a668efc2ab0bea86dcf9a2d8bf583dddc35e32. + + The editorial change was made after the wording of P4143R0 was written. + + Addresses editorial review committee feedback. + + commit 01296b2d6e73ade37803f9721de7bdad437b4e3b + Author: Thomas Köppe + Date: Sun Apr 26 16:09:52 2026 +0100 + + [temp.inst] Add missing \grammarterm. + + Misapplication of CWG Motion 11, P4149R1. + + Addresses editorial review committee feedback. + + commit d5078b039da4e188f5de51682c2219f26b8367f9 + Author: Thomas Köppe + Date: Sun Apr 26 16:20:12 2026 +0100 + + [exec.spawn.future] Add missing \exposid. + + Misapplication of LWG Motion 2, Issue LWG 4540. + + Addresses editorial review committee feedback. + + commit 89cc24e855b5a89f099859685fc21fb37f03a36c + Author: Thomas Köppe + Date: Sun Apr 26 16:24:46 2026 +0100 + + [algorithm.syn] Remove stray comma. + + This seems to be an error in the wording of LWG 4544 (LWG Motion 2). + + Addresses editorial review committee feedback. + + commit 83f5072a59b06575d1108e7f63ef28b00fb4e4b2 + Author: Thomas Köppe + Date: Sun Apr 26 18:39:03 2026 +0100 + + [simd.math] Remove stray '@'s. + + Addresses editorial review committee feedback. + + commit ef5f532d2530a733011b0d606dfe69b952c718f6 + Author: Thomas Köppe + Date: Sun Apr 26 18:46:26 2026 +0100 + + [simd.math] Remove stray '\' (unintended escaping). + + Addresses editorial review committee feedback. + + commit d706f2d4fa89e7bcaa54338b9619ead9add59c67 + Author: Thomas Köppe + Date: Sun Apr 26 18:49:24 2026 +0100 + + [simd.math] Better linebreaking/whitespacing in remquo description. + + Addresses editorial review committee feedback. + + commit 9c5becee9a6ca91aad690074069be058f780006f + Author: Thomas Köppe + Date: Sun Apr 26 21:12:54 2026 +0100 + + [simd.expos{,defn}] Fixed template parameter "class T" => "size_t Bytes". + + Misapplication of P3932R0 in LWG Motion 5. + + Addresses editorial review committee feedback. + + commit 120d987ce6a376f1d56b84041d8e69aefaa436ec + Author: Thomas Köppe + Date: Sun Apr 26 21:21:12 2026 +0100 + + [exec.let] Fix misspelled "declval" use. + + Misapplication of P3826R5 in LWG Motion 28. + + Addresses editorial review committee feedback. + + commit daffae75c71890ca82c5021404c9a005e8038405 + Author: Thomas Köppe + Date: Sun Apr 26 21:24:42 2026 +0100 + + [exec.let] Add missing '\exposid's. + + Misapplication of P3373R4 in LWG Motion 10. + + Addresses editorial review committee feedback. + + commit 39a5cd65c6c2af9a251b8d2d5c7d5e73e86c9fa5 + Author: Thomas Köppe + Date: Sun Apr 26 22:24:30 2026 +0100 + + [dcl.attr.annotation] Add missing "codeblock" environment. + + Misapplication of P3795R2 in LWG Motion 15. + + Addresses editorial review committee feedback. + + commit 33a4bec49725127d2e1942f2b074d17242bc0458 + Author: Thomas Köppe + Date: Sun Apr 26 22:30:48 2026 +0100 + + [basic. link] Add "ANN" element to the "data member description sextuple. + + This was missed by P3795R2 in LWG Motion 15, presumably by accident. + + Addresses editorial review committee feedback. + + commit f8e7a0665d9919af4b680d60b07dbb322ee1d4cb + Author: Thomas Köppe + Date: Sun Apr 26 23:10:01 2026 +0100 + + [func.ref.wrap.ctor] Add missing ".value" + + Misapplication of P3948R1 in LWG Motion 16. + + Addresses editorial review committee feedback. + + commit d7c02a0f5c21cd235a0ed3921a30b19d75771f2e + Author: Thomas Köppe + Date: Sun Apr 26 23:36:15 2026 +0100 + + [mdspan.sub.overview] Fix missing edits and missing maths font. + + Misapplication of P3982R2 in LWG Motion 23. + + Addresses editorial review committee feedback. + + commit 2a8305d4b5bdf40b9e4e602d30a08e5fed6dd87b + Author: Abhinav Agarwal + Date: Sun Apr 26 16:10:39 2026 -0700 + + [mdspan.sub.map.sliceable] Fix M::extent_type to M::extents_type + + Layout mapping types expose extents_type, not extent_type; the + latter is a member of extent_slice. As written, IT and M_rank + in the Let clause name an undefined member. + + commit 368af317f557650b4d3dcf98379f02ef3d00140e + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sat May 2 07:41:44 2026 +0000 + + [basic.def] Mark definition of "redeclaration" as such (#8596) + + commit 75b6c6535f5115750bcaa588ded5dfa99eb5fa24 + Author: Guyutongxue + Date: Tue Apr 28 16:40:13 2026 +0800 + + [algorithm.syn] Add missing semicolon and right angle bracket + + commit 25401da54dcf000fa09105a8dc3cdcf788d753d5 + Author: Guyutongxue + Date: Tue Apr 28 16:42:37 2026 +0800 + + [map.overview] Add missing right angle bracket + + commit eaa1458d9832084f56f22d60dde77ed2a95b9b7e + Author: Guyutongxue + Date: Tue Apr 28 16:43:27 2026 +0800 + + [exec.snd.expos] Add missing left brace + + commit 9e15aa83cc1fd4efb06afdb861ebaf6e05f261bd + Author: Guyutongxue + Date: Tue Apr 28 16:45:11 2026 +0800 + + [rand.eng.philox, simd.syn] Fix misplaced right angle bracket, missing comma in `hypot`, `lerp` and `fma` + + commit f0c6e9e9af125c133dba0336797e2193d7d2cc2e + Author: Guyutongxue + Date: Tue Apr 28 16:45:45 2026 +0800 + + [range.filter.sentinel] Add missing semicolon + + commit 0fcd7084a93a5bfbbfe177cd9c6859eeca63439a + Author: Guyutongxue + Date: Tue Apr 28 16:46:20 2026 +0800 + + [atomics.types.float] Fix typo of `floating-point-type` + + commit 1a12df96659d230a376a3da4a2bae3cfc4cd57cb + Author: Thomas Köppe + Date: Sat May 2 15:39:57 2026 +0100 + + [exec.get.compl.{domain,sched}] Replace "it" and long expression with "the expression". + + In e82e850497facd0b9f1e65f4de75b475ddde42ed I had shortened a long + expression from the incoming paper in [exec.get.compl.domain] to just + "it". In review it was suggested that "the expression" is clearer, and + that similar wording in [exec.get.compl.sched] should use the same style. + + (Overall, I think it is easier to understand that the shorter + reference refers to the same expression than to have to compare + two long expressions and determine that they are equal.) + + Addresses editorial review committee feedback. + + commit 65970a5aad6e50048dce1a0b4398d63b8a09ea44 + Author: Thomas Köppe + Date: Sat May 2 15:50:08 2026 +0100 + + [exec.get.compl.domain] + + Misapplication of P3826R5 in LWG Motion 28. + + Addresses editorial review committee feedback. + + commit fa590b2628d9a21d6a12afa5a1d22168cb40b2a3 + Author: Thomas Köppe + Date: Sat May 2 15:53:50 2026 +0100 + + [exec.snd.expos] Fix missing escaping for braces in "{}". + + Misapplication of P3826R5 in LWG Motion 28. + + Addresses editorial review committee feedback. + + commit 91e3416490d096cd0c783c1b5b4e922b53a48f4e + Author: Thomas Köppe + Date: Sat May 2 15:57:04 2026 +0100 + + [exec.domain.default] Delete stray word "sender". + + The deletion was part of the edit instructions of P3826R5 in LWG + Motion 28, but was accidentally missed. + + Addresses editorial review committee feedback. + + commit 62be1e6b61e0e3701f4062994cb04eb02d27d1be + Author: Thomas Köppe + Date: Sat May 2 16:00:32 2026 +0100 + + [exec.snd.transform] Fix "tag2" => "tag". + + Misapplication of P3826R5 in LWG Motion 28. + + Addresses editorial review committee feedback. + + commit 9912050ebe526f32ad1cdec47840fae82099b105 + Author: Thomas Köppe + Date: Sat May 2 16:04:37 2026 +0100 + + [exec.on] Fix missing escaping for braces in "{...}". + + Misapplication of P3826R5 in LWG Motion 28. + + Addresses editorial review committee feedback. + + commit e0ca46ae71122c99c0f098212b2990ed41973b05 + Author: Thomas Köppe + Date: Sat May 2 16:07:02 2026 +0100 + + [exec.on] Fix missing argument "set_value, ". + + Misapplication of P3826R5 in LWG Motion 28, this edit was just missed. + + Addresses editorial review committee feedback. + + commit d04267fda5b9a16ce56beb3137c22900019e0e54 + Author: Thomas Köppe + Date: Sat May 2 16:14:53 2026 +0100 + + [exec.sync.wait.var] Remove vacuous exception. + + The exception that "sndr is evaluated only once" is no longer + necessary, since P3826R5 from LWG Motion 28 removed the previous + second mention of the subexpression "sndr". Now that there is only one + occurrence of "sndr", it does not need saying that it is only + evaluated once. + + Addresses editorial review committee feedback. + + commit e5f877a4c0542654017c5cd9152d6c1dba7972b4 + Author: Thomas Köppe + Date: Sat May 2 16:19:51 2026 +0100 + + [exec.affine] Add missing '\placeholder'. + + Misapplication of P3941R4 in LWG Motion 33. + + Addresses editorial review committee feedback. + + commit 3647c192d9ed47bd653e3575b9dc84107b7cd1fc + Author: Thomas Köppe + Date: Sat May 2 16:32:59 2026 +0100 + + [exec.{rcvr,snd}.concepts] Add "// exposition only" comments to definitions. + + A missed edit from P4159R0 in LWG Motion 37. + + Addresses editorial review committee feedback. + + commit aea0fae459ee3a369e0dc251f674337298433121 + Author: Thomas Köppe + Date: Sat May 2 17:13:27 2026 +0100 + + [except.terminate] Replace system_context_replaceability with parallel_scheduler_replacement. + + This change is needed for consistency with P4154R0 from LWG Motion 39. + Even though that paper didn't ask for this change, that was clearly an + oversight. + + Addresses editorial review committee feedback. + + commit fb2c3e602417fe8cd33618ff5adb31a86cf9072b + Author: Hubert Tong + Date: Mon May 4 10:37:18 2026 -0400 + + [expr.const] Definition domain fixes for "usable in constant expressions" (#8670) + + Also improves the indexing. + + commit 32816d5c2f94da9252ea604c8e7ee17a0657e03c + Author: Thomas Köppe + Date: Sun Apr 26 16:31:18 2026 +0100 + + [simd.{syn,math}] Rename parameters of new overloads of various special maths functions: + + * For comp_ellint_3: from "x, y" to "k, nu" + * For cyl_bessel_{i,j,k}: from "x, y" to "nu, x" + * For cyl_neumann: from "x, y" to "nu, x" + * For ellint_{1,2}: from "x, y" to "k, phi" + * For ellint_{1,2}: from "x, y, z" to "k, nu, phi" + + The paper P3844R4 (LWG Motion 4) added those overloads with parameters + named differently from the names of the existing overloads, but the + latter names seem more appropriate. + + Addresses editorial review committee feedback. + + commit 85c6337534d0bdd9cbfa2260609a853e0c40d61f + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 21:54:26 2025 +0000 + + [intro.execution] Replace "or" with "and"; clarify wording + + commit a383c1ad305a61cbef3e14c698b41f6228e780c3 + Author: Jan Schultke + Date: Wed Apr 8 04:52:48 2026 +0200 + + [basic.extended.fp] Reference C23 instead of "future versions" + + commit 87a9fbb3cc85436d876e9c7a79ca1cfbb48ac150 + Author: Thomas Köppe + Date: Mon May 11 23:46:40 2026 +0100 + + [meta.reflection] Remove uninformative "// OK" comments from examples. + + Fixes NB US 84-151 (C++26 CD). + + commit 5670e07a0ec4a4a3c6201512d86013507c0a9389 + Author: Abhinav Agarwal + Date: Sun Apr 26 16:10:54 2026 -0700 + + [mdspan.sub.map.sliceable] Use lm in sliceable-mapping concept body + + The concept body introduces lm (an object of type LayoutMapping) but + then uses m (an object of type M from the surrounding requirements + section) in the submdspan_mapping well-formedness check. + + commit 738e80f3b19fe9ad73d7a48c382f9584e2f200fd + Author: Jonathan Wakely + Date: Tue May 12 09:41:32 2026 +0100 + + [istream.formatted.arithmetic] remove unnecessary whitespace in codeblocks + + commit d2e19cd940eec863a39edee1499e75230725925f + Author: Abhinav Agarwal + Date: Tue May 12 03:15:09 2026 -0700 + + [linalg.algs.blas2.rank1,linalg.algs.blas2.symherrank1] Restore missing arguments (#8995) + + Fixes a misapplication of P3371R5. + + * [linalg.algs.blas2.rank1] Add missing E in matrix_rank_1_update_c effects + * [linalg.algs.blas2.symherrank1] Restore parameters in updating overload + + commit 7c2e7f83c4a8af1841f81f798dd9c5db46232e6d + Author: Abhinav Agarwal + Date: Sun Apr 26 16:10:17 2026 -0700 + + [mdspan.sub.sub] Fix submdspan slice canonicalization + + Two integration errors in the Let clause introduced by P3663R3: + - the function parameter pack is named "slices", but the Let clause + references an undefined "raw_slices"; rename the parameter to match + subextents (mdspan.sub.extents); + - src is an mdspan but canonical_slices takes an extents object; + pass src.extents() instead of src. diff --git a/papers/n5051.html b/papers/n5051.html new file mode 100644 index 0000000000..cc95fa0df4 --- /dev/null +++ b/papers/n5051.html @@ -0,0 +1,278 @@ + + + + + +N5051 + + +

N5051 Editors’ Report:
Programming Languages — C++

+ +

Date: 2026-06-01

+ +

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

+ +

Acknowledgments

+ +

Thanks to all those who have +submitted editorial issues, +to those who have provided pull requests with fixes, +and to everyone who drafted motion applications.

+ +

New papers

+ +
    +
  • N5050 is +the current working draft, the final draft for C++26 and the initial draft +for C++29. It replaces +N5046, +and it forms the basis of the Draft International Standard for C++26.
  • +
  • N5051 is this Editors' Report.
  • +
+ + +

Editorial changes

+ +

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

+ +

The value of the macro __cplusplus has been updated to 202603L.

+ +

Minor editorial changes

+ +

A log of editorial fixes made to the working draft since N5046 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 6cfb658c1a4063a7ad10c51c9dc66c41b48f37f5
+Author: lprv <100177227+lprv@users.noreply.github.com>
+Date:   Sun Dec 14 17:49:10 2025 +0000
+
+    [basic.fundamental] Replace "denotes" with "is"
+
+commit 16464ed251f392be9104c676b1f785277256563d
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Wed May 13 12:37:50 2026 +0200
+
+    [optional.optional.ref.general] Remove redundant access-specifier (#9019)
+
+commit 960fa626322150501f559405e85fa571f93be3c0
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Thu May 14 12:52:21 2026 +0200
+
+    [meta.reflection.queries] Add comma in comment in example (#9020)
+
+commit 116068174ea9b50ee2a520667b7ac9daa49aca23
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Thu May 14 23:57:20 2026 +0200
+
+    [tab:text.summary] Sort "Text encodings identification" (28.4) before "Formatting" (28.5) (#9021)
+
+commit 06c1c7c7e6c2a1e9c7be87c253da0f54f116de56
+Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com>
+Date:   Thu May 21 08:09:21 2026 +0200
+
+    [tab:headers.cpp.fs] Sort "Contract-violation handling" (17.10) before "Initializer lists" (17.11) (#9030)
+
+commit 98098f41575381688e78cd86dba9f02d9146ac5b
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Mon May 25 07:33:53 2026 +0200
+
+    [cstdlib.syn] Align comment after declaration of abs (#9034)
+
+commit d2dc5b32da8ce80eeed9689a6ec7461e26ecc66a
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue May 26 21:03:21 2026 +0100
+
+    [obj.lifetime] Reinstate phrasing "aggregate type".
+
+    This wording is in the approved paper P3726R2 from CWG Motion 9,
+    but was changed editorially to just "aggregate" under the assumption
+    that "aggregate type" is not a defined term. However, this seems
+    misguided; we use both the terms "aggregate type" and "class type",
+    even though the defined terms are just "aggregate" and "class".
+    It seems generally to improve clarity to refer to a "type", and here
+    in particular as we are talking about an "implicit-lifetime type".
+
+    Addresses editorial review committee feedback.
+
+commit cd878f8c120cecf302fa4d075a421d0a6b83a78c
+Author: Jan Schultke <me@eisenwave.net>
+Date:   Wed May 27 13:55:52 2026 +0200
+
+    [container.requirements] Reword Result specifications (#6824)
+
+commit 79710b5b927398a2cb976a64e07f02e7131eddee
+Author: Eisenwave <me@eisenwave.net>
+Date:   Thu Nov 6 15:53:12 2025 +0100
+
+    [meta.define.static] Use "character type" in Mandates
+
+commit aa60c8f958534f1af7a9c0ac3e5dea9f96373aa0
+Author: S. B. Tam <cpplearner@outlook.com>
+Date:   Sun May 31 13:05:31 2026 +0800
+
+    [meta.reflection.access.queries] Index `has_inaccessible_bases` (#9044)
+
+commit b94e738abfb7382b7e1238158e58f7975ee0c1d2
+Author: A. Jiang <de34@live.cn>
+Date:   Mon Apr 27 11:48:10 2026 +0800
+
+    [time] Cleanup exposition-only names
+
+    Editorial notes:
+      * Apply `\exposid` to all exposition-only members in [time].
+      * For _`local-time-format-t`_ and _`STATICALLY-WIDEN`_, change uses of
+        `\placeholder` to `\exposid`.
+      * Rename some members of `hh_mm_ss`, `zoned_time`, and
+        _`local-time-format-t`_ in the style of either _`name_`_ or
+        _`kebab-case`_.
+
+commit c9ea2121cd6eb28d2161c9d4956d7886c93e967e
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Mon Jun 1 16:11:39 2026 +0100
+
+    [mem.res.pool.ctor] Reword awkward "calls will be fewer" in note
+
+    It seems much simpler to just say "there will be fewer calls".
+
+ + diff --git a/papers/n5051.md b/papers/n5051.md new file mode 100644 index 0000000000..3a17043807 --- /dev/null +++ b/papers/n5051.md @@ -0,0 +1,137 @@ +# N5051 Editors' Report -- Programming Languages -- C++ + +Date: 2026-06-01 + +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` + +## Acknowledgments + +Thanks to all those who have +[submitted editorial issues](https://github.com/cplusplus/draft/wiki/How-to-submit-an-editorial-issue), +to those who have provided pull requests with fixes, +and to everyone who drafted motion applications. + + +## New papers + + * [N5050](https://open-std.org/jtc1/sc22/wg21/docs/papers/2026/n5050.pdf) is + the current working draft, the final draft for C++26 and the initial draft + for C++29. It replaces + [N5046](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/n5046.pdf), + and it forms the basis of the Draft International Standard for C++26. + * N5051 is this Editors' Report. + +### Editorial changes + +There have not been any motions from WG21 since the last working draft. This +revision incorporates the final changes requested by the editorial review +committee in preparation of the Draft International Standard (DIS) ballot, +as well as other editorial changes. (Most of the feedback from the editorial +review committee had already been incorporated into N5046.) + +The value of the macro `__cplusplus` has been updated to `202603L`. + +### Minor editorial changes + +A log of editorial fixes made to the working draft since N5046 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/n5046...n5050). + + commit 6cfb658c1a4063a7ad10c51c9dc66c41b48f37f5 + Author: lprv <100177227+lprv@users.noreply.github.com> + Date: Sun Dec 14 17:49:10 2025 +0000 + + [basic.fundamental] Replace "denotes" with "is" + + commit 16464ed251f392be9104c676b1f785277256563d + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Wed May 13 12:37:50 2026 +0200 + + [optional.optional.ref.general] Remove redundant access-specifier (#9019) + + commit 960fa626322150501f559405e85fa571f93be3c0 + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Thu May 14 12:52:21 2026 +0200 + + [meta.reflection.queries] Add comma in comment in example (#9020) + + commit 116068174ea9b50ee2a520667b7ac9daa49aca23 + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Thu May 14 23:57:20 2026 +0200 + + [tab:text.summary] Sort "Text encodings identification" (28.4) before "Formatting" (28.5) (#9021) + + commit 06c1c7c7e6c2a1e9c7be87c253da0f54f116de56 + Author: Andreas Krug <153394595+Andreas-Krug@users.noreply.github.com> + Date: Thu May 21 08:09:21 2026 +0200 + + [tab:headers.cpp.fs] Sort "Contract-violation handling" (17.10) before "Initializer lists" (17.11) (#9030) + + commit 98098f41575381688e78cd86dba9f02d9146ac5b + Author: Jan Schultke + Date: Mon May 25 07:33:53 2026 +0200 + + [cstdlib.syn] Align comment after declaration of abs (#9034) + + commit d2dc5b32da8ce80eeed9689a6ec7461e26ecc66a + Author: Thomas Köppe + Date: Tue May 26 21:03:21 2026 +0100 + + [obj.lifetime] Reinstate phrasing "aggregate type". + + This wording is in the approved paper P3726R2 from CWG Motion 9, + but was changed editorially to just "aggregate" under the assumption + that "aggregate type" is not a defined term. However, this seems + misguided; we use both the terms "aggregate type" and "class type", + even though the defined terms are just "aggregate" and "class". + It seems generally to improve clarity to refer to a "type", and here + in particular as we are talking about an "implicit-lifetime type". + + Addresses editorial review committee feedback. + + commit cd878f8c120cecf302fa4d075a421d0a6b83a78c + Author: Jan Schultke + Date: Wed May 27 13:55:52 2026 +0200 + + [container.requirements] Reword Result specifications (#6824) + + commit 79710b5b927398a2cb976a64e07f02e7131eddee + Author: Eisenwave + Date: Thu Nov 6 15:53:12 2025 +0100 + + [meta.define.static] Use "character type" in Mandates + + commit aa60c8f958534f1af7a9c0ac3e5dea9f96373aa0 + Author: S. B. Tam + Date: Sun May 31 13:05:31 2026 +0800 + + [meta.reflection.access.queries] Index `has_inaccessible_bases` (#9044) + + commit b94e738abfb7382b7e1238158e58f7975ee0c1d2 + Author: A. Jiang + Date: Mon Apr 27 11:48:10 2026 +0800 + + [time] Cleanup exposition-only names + + Editorial notes: + * Apply `\exposid` to all exposition-only members in [time]. + * For _`local-time-format-t`_ and _`STATICALLY-WIDEN`_, change uses of + `\placeholder` to `\exposid`. + * Rename some members of `hh_mm_ss`, `zoned_time`, and + _`local-time-format-t`_ in the style of either _`name_`_ or + _`kebab-case`_. + + commit c9ea2121cd6eb28d2161c9d4956d7886c93e967e + Author: Thomas Köppe + Date: Mon Jun 1 16:11:39 2026 +0100 + + [mem.res.pool.ctor] Reword awkward "calls will be fewer" in note + + It seems much simpler to just say "there will be fewer calls". diff --git a/papers/wd-index.md b/papers/wd-index.md index 481a527e79..67a7005378 100644 --- a/papers/wd-index.md +++ b/papers/wd-index.md @@ -56,3 +56,5 @@ * [N5008](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/n5008.pdf) 2025-03 C++ Working Draft * [N5014](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/n5014.pdf) 2025-08 C++ Working Draft * [N5032](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/n5032.pdf) 2025-12 C++ Working Draft + * [N5046](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/n5046.pdf) 2026-05 C++ Working Draft + * [N5050](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/n5050.pdf) 2026-06 C++ Working Draft diff --git a/source/basic.tex b/source/basic.tex index 3285447e14..d986160fcd 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -674,7 +674,7 @@ \pnum Every program shall contain at least one definition of every function or variable that is odr-used in that program -outside of a discarded statement\iref{stmt.if}; no diagnostic required. +outside of a discarded statement\iref{stmt.if}; no diagnostic required\ifndrdef{basic.def.odr.minimum.one.def}. The definition can appear explicitly in the program, it can be found in the standard or a user-defined library, or (when appropriate) it is implicitly defined (see~\ref{class.default.ctor}, \ref{class.copy.ctor}, @@ -762,21 +762,23 @@ that definition shall be an injected declaration having the same characteristic sequence as $X$; a diagnostic is required only if \tcode{D} is attached to a named module and -a prior definition is reachable at the point where a later definition occurs. +a prior definition is reachable +at the point where a later definition occurs\ifndrdef{basic.def.odr.injected.match}. \pnum For any other definable item \tcode{D} with definitions in multiple translation units, \begin{itemize} \item -if \tcode{D} is a non-inline non-templated function or variable, or +if \tcode{D} is a non-inline non-templated function or variable\ifndrdef{basic.def.odr.maximum.one.def}, or \item if the definitions in different translation units -do not satisfy the following requirements, +do not satisfy the following requirements\ifndrdef{basic.def.odr.definition.matches}, \end{itemize} the program is ill-formed; a diagnostic is required only if the definable item is attached to a named module and -a prior definition is reachable at the point where a later definition occurs. +a prior definition is reachable +at the point where a later definition occurs. Given such an item, for all definitions of \tcode{D}, or, if \tcode{D} is an unnamed enumeration, @@ -957,7 +959,7 @@ reachable unnamed enumeration definition in the same scope that have the same first enumerator name and do not have typedef names for linkage purposes\iref{dcl.enum}, -those unnamed enumeration types shall be the same; no diagnostic required. +those unnamed enumeration types shall be the same; no diagnostic required\ifndrdef{basic.def.odr.unnamed.enum.same.type}. \indextext{one-definition rule|)} \rSec1[basic.scope]{Scope}% @@ -1838,7 +1840,7 @@ If it is an invalid set, the program is ill-formed. If it differs from the result of a search in $T$ for $M$ in a complete-class context\iref{class.mem} of $T$, -the program is ill-formed, no diagnostic required. +the program is ill-formed, no diagnostic required\ifndrdef{class.member.lookup.name.refers.diff.decl}. \begin{example} \begin{codeblock} struct A { int x; }; // S(x,A) = \{ \{ \tcode{A::x} \}, \{ \tcode{A} \} \} @@ -3166,7 +3168,8 @@ declarations for an array object can specify array types that differ by the presence or absence of a major array bound\iref{dcl.array}. -No diagnostic is required if neither declaration is reachable from the other. +No diagnostic is required +if neither declaration is reachable from the other\ifndrdef{basic.link.consistent.types}. \begin{example} \begin{codeblock} int f(int x, int x); // error: different entities for \tcode{x} @@ -3768,7 +3771,7 @@ zero or more objects of implicit-lifetime types\iref{term.implicit.lifetime.type} in its specified region of storage if doing so would result in the program having defined behavior. -If no such set of objects would give the program defined behavior, +If no such set of objects would give the program defined behavior\ubdef{intro.object.implicit.create}, the behavior of the program is undefined. If multiple such sets of objects would give the program defined behavior, it is unspecified which such set of objects is created. @@ -3786,7 +3789,7 @@ and produce a pointer value that points to that object, if that value would result in the program having defined behavior. If no such pointer value would give the program defined behavior, -the behavior of the program is undefined. +the behavior of the program is undefined\ubdef{intro.object.implicit.pointer}. If multiple such pointer values would give the program defined behavior, it is unspecified which such pointer value is produced. @@ -3840,7 +3843,7 @@ using the \grammarterm{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. +is undefined behavior\ubdef{basic.align.object.alignment}. \pnum A \defnadj{fundamental}{alignment} is represented by an alignment @@ -4029,19 +4032,20 @@ if the pointer were of type \tcode{\keyword{void}*} is well-defined. Indirection through such a pointer is permitted but the resulting lvalue may only be used in limited ways, as described below. The -program has undefined behavior if +program has undefined behavior if: \begin{itemize} \item - the pointer is used as the operand of a \grammarterm{delete-expression}, + the pointer is used as the operand of a \grammarterm{delete-expression}\ubdef{lifetime.outside.pointer.delete}, \item the pointer is used to access a non-static data member or call a - non-static member function of the object, or + non-static member function of the object\ubdef{lifetime.outside.pointer.member}, or \item the pointer is converted\iref{conv.ptr,expr.static.cast} to a pointer - to a virtual base class or to a base class thereof, or + to a virtual base class\ubdef{lifetime.outside.pointer.virtual} or + to a base class thereof, or \item the pointer is used as the operand of a - \keyword{dynamic_cast}\iref{expr.dynamic.cast}. + \keyword{dynamic_cast}\iref{expr.dynamic.cast}\ubdef{lifetime.outside.pointer.dynamic.cast}. \end{itemize} \begin{example} \begin{codeblock} @@ -4084,14 +4088,14 @@ a glvalue refers to allocated storage\iref{basic.stc.dynamic.allocation}, and using the properties of the glvalue that do not depend on its value is -well-defined. The program has undefined behavior if +well-defined. The program has undefined behavior if: \begin{itemize} -\item the glvalue is used to access the object, or -\item the glvalue is used to call a non-static member function of the object, or -\item the glvalue is bound to a reference to a virtual base class\iref{dcl.init.ref}, or +\item the glvalue is used to access the object\ubdef{lifetime.outside.glvalue.access}, or +\item the glvalue is used to call a non-static member function of the object\ubdef{lifetime.outside.glvalue.member}, or +\item the glvalue is bound to a reference to a virtual base class\iref{dcl.init.ref}\ubdef{lifetime.outside.glvalue.virtual}, or \item the glvalue is used as the operand of a \keyword{dynamic_cast}\iref{expr.dynamic.cast} or as the operand of -\keyword{typeid}. +\keyword{typeid}\ubdef{lifetime.outside.glvalue.dynamic.cast}. \end{itemize} \begin{note} @@ -4176,7 +4180,7 @@ \end{footnote} and another object of the original type does not occupy that same storage location when the implicit destructor call takes -place, the behavior of the program is undefined. This is true +place, the behavior of the program is undefined\ubdef{original.type.implicit.destructor}. This is true even if the block is exited with an exception. \begin{example} \begin{codeblock} @@ -4196,7 +4200,7 @@ Creating a new object within the storage that a const, complete object with static, thread, or automatic storage duration occupies, or within the storage that such a const object used to occupy before -its lifetime ended, results in undefined behavior. +its lifetime ended, results in undefined behavior\ubdef{creating.within.const.complete.obj}. \begin{example} \begin{codeblock} struct B { @@ -4257,7 +4261,7 @@ then the value produced by that operator is erroneous. Except in the following cases, if an indeterminate value is produced by an evaluation, -the behavior is undefined, and +the behavior is undefined\ubdef{basic.indet.value}, and if an erroneous value is produced by an evaluation, the behavior is erroneous and the result of the evaluation is that erroneous value: @@ -4544,7 +4548,7 @@ does not satisfy the semantic constraints specified in~\ref{basic.stc.dynamic.allocation} and~\ref{basic.stc.dynamic.deallocation}, -the behavior is undefined. +the behavior is undefined\ubdef{basic.stc.alloc.dealloc.constraint}. \indextext{storage duration!dynamic|)} @@ -4584,7 +4588,7 @@ \tcode{p0} represents the address of a block of storage disjoint from the storage for any other object accessible to the caller. The effect of indirecting through a pointer -returned from a request for zero size is undefined. +returned from a request for zero size is undefined\ubdef{basic.stc.alloc.zero.dereference}. \begin{footnote} The intent is to have \tcode{\keyword{operator} \keyword{new}()} implementable by @@ -4707,7 +4711,7 @@ signature. \pnum -If a deallocation function terminates by throwing an exception, the behavior is undefined. +If a deallocation function terminates by throwing an exception, the behavior is undefined\ubdef{basic.stc.alloc.dealloc.throw}. The value of the first argument supplied to a deallocation function may be a null pointer value; if so, and if the deallocation function is one supplied in the standard library, the call has no effect. @@ -5592,7 +5596,7 @@ \indextext{\idxcode{char8_t}|see{type, \tcode{char8_t}}}% \indextext{type!\idxcode{char8_t}}% \indextext{type!underlying!\idxcode{char8_t}}% -Type \keyword{char8_t} denotes a distinct type +Type \keyword{char8_t} is a distinct type whose underlying type is \tcode{\keyword{unsigned} \keyword{char}}. \indextext{\idxcode{char16_t}|see{type, \tcode{char16_t}}}% \indextext{\idxcode{char32_t}|see{type, \tcode{char32_t}}}% @@ -5600,7 +5604,7 @@ \indextext{type!\idxcode{char32_t}}% \indextext{type!underlying!\idxcode{char16_t}}% \indextext{type!underlying!\idxcode{char32_t}}% -Types \keyword{char16_t} and \keyword{char32_t} denote distinct types +Types \keyword{char16_t} and \keyword{char32_t} are distinct types whose underlying types are \tcode{std::uint_least16_t} and \tcode{std::uint_least32_t}, respectively, in \libheaderref{cstdint}. @@ -5920,9 +5924,9 @@ the extended floating-point types described in this subsection that are in addition to the names declared in the \libheader{stdfloat} header should be chosen to increase compatibility and interoperability -with the interchange types +with the interchange floating types \tcode{_Float16}, \tcode{_Float32}, \tcode{_Float64}, and \tcode{_Float128} -defined in ISO/IEC TS 18661-3 and with future versions of \IsoCUndated{}. +defined in \IsoC{} H.2.2. \rSec2[basic.compound]{Compound types} @@ -6087,7 +6091,7 @@ $P$ is not valid in the context of $E$, then the behavior is undefined if $E$ is an indirection\iref{expr.unary.op} or -an invocation of a deallocation function\iref{basic.stc.dynamic.deallocation}, +an invocation of a deallocation function\iref{basic.stc.dynamic.deallocation}\ubdef{basic.compound.invalid.pointer}, and \impldef{invalid pointer value in the context of an evaluation} otherwise. \begin{footnote} Some implementations might define that @@ -6434,9 +6438,9 @@ \item if $E$ is a function call\iref{expr.call} or implicitly invokes a function, the constituent expressions of each default argument\iref{dcl.fct.default} -used in the call, or +used in the call, and \item -if $E$ creates an aggregate object\iref{dcl.init.aggr}, +if $E$ performs aggregate initialization\iref{dcl.init.aggr}, the constituent expressions of each default member initializer\iref{class.mem} used in the initialization. \end{itemize} @@ -6607,7 +6611,7 @@ The value computations of the operands of an operator are sequenced before the value computation of the result of the operator. -The behavior is undefined if +The behavior is undefined\iref{intro.multithread}\ubdef{intro.execution.unsequenced.modification} if \begin{itemize} \item \indextext{side effects}% @@ -7015,7 +7019,7 @@ and neither happens before the other, except for the special case for signal handlers described below. Any such data race results in undefined -behavior. +behavior\ubdef{intro.races.data}. \begin{note} It can be shown that programs that correctly use mutexes and \tcode{memory_order::seq_cst} operations to prevent all data races and use no @@ -7074,8 +7078,8 @@ \rSec3[intro.progress]{Forward progress} \pnum -The implementation may assume that any thread will eventually do one of the -following: +The implementation may assume\ubdef{intro.progress.stops} that any thread +will eventually do one of the following: \begin{itemize} \item terminate, \item invoke the function \tcode{std::this_thread::yield}\iref{thread.thread.this}, @@ -7379,7 +7383,7 @@ objects with automatic storage duration\iref{class.dtor}. If \tcode{std::exit} is invoked during the destruction of an object with static or thread storage duration, the program has undefined -behavior. +behavior\ubdef{basic.start.main.exit.during.destruction}. \pnum \indextext{termination!program}% @@ -7716,7 +7720,7 @@ \pnum If a function contains a block variable of static or thread storage duration that has been destroyed and the function is called during the destruction of an object with static or -thread storage duration, the program has undefined behavior if the flow of control +thread storage duration, the program has undefined behavior\ubdef{basic.start.term.use.after.destruction} if the flow of control passes through the definition of the previously destroyed block variable. \begin{note} Likewise, the behavior is undefined @@ -7744,7 +7748,7 @@ handlers\iref{support.runtime} that does not happen before\iref{intro.multithread} completion of destruction of objects with static storage duration and execution of \tcode{std::atexit} registered functions\iref{support.start.term}, the program has -undefined behavior. +undefined behavior \begin{note} If there is a use of an object with static storage duration that does not happen before the object's destruction, the program has undefined @@ -7793,7 +7797,7 @@ An invocation of the macro \tcode{va_start}\iref{cstdarg.syn} shall not be a subexpression of the predicate of a contract assertion, -no diagnostic required. +no diagnostic required\ifndrdef{basic.contract.vastart.contract.predicate}. \pnum \begin{note} @@ -8199,6 +8203,6 @@ If the contract-violation handler is not replaceable, a declaration of a replacement function for the contract-violation handler -is ill-formed, no diagnostic required. +is ill-formed, no diagnostic required.\ifndrdef{basic.contract.handler.replacing.nonreplaceable} \indextext{contract assertion|)} diff --git a/source/classes.tex b/source/classes.tex index 78a504f0a5..f6849fadd5 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -2335,7 +2335,7 @@ \pnum Once a destructor is invoked for an object, the object's lifetime ends; -the behavior is undefined if the destructor is invoked +the behavior is undefined\ubdef{class.dtor.no.longer.exists} if the destructor is invoked for an object whose lifetime has ended\iref{basic.life}. \begin{example} If the destructor for an object with automatic storage duration is explicitly invoked, @@ -4006,7 +4006,7 @@ \indextext{definition!virtual function}% A virtual function declared in a class shall be defined, or declared pure\iref{class.abstract} in that class, or both; no diagnostic is -required\iref{basic.def.odr}. +required\iref{basic.def.odr}\ifndrdef{class.virtual.pure.or.defined}. \indextext{friend!\tcode{virtual} and}% \pnum @@ -4240,7 +4240,7 @@ \indextext{virtual function call!undefined pure}% the effect of making a virtual call\iref{class.virtual} to a pure virtual function directly or indirectly for the object being created (or -destroyed) from such a constructor (or destructor) is undefined.% +destroyed) from such a constructor (or destructor) is undefined\ubdef{class.abstract.pure.virtual}.% \indextext{derived class|)} \rSec1[class.access]{Member access control}% @@ -4940,7 +4940,7 @@ class X2 { friend Ct; // OK, \tcode{class C} is a friend friend D; // error: \tcode{D} not found - friend class D; // OK, elaborated-type-specifier declares new class + friend class D; // OK, \grammarterm{elaborated-type-specifier} declares new class }; template class R { @@ -5525,7 +5525,7 @@ The target constructor is selected by overload resolution. Once the target constructor returns, the body of the delegating constructor is executed. If a constructor delegates to itself directly or indirectly, -the program is ill-formed, no diagnostic required. +the program is ill-formed, no diagnostic required\ifndrdef{class.base.init.delegate.itself}. \begin{example} \begin{codeblock} struct C { @@ -5840,7 +5840,7 @@ \item a postcondition assertion of a destructor\iref{dcl.contract.func}, \end{itemize} -the program has undefined behavior. +the program has undefined behavior\ubdef{class.base.init.mem.fun}. \begin{example} \begin{codeblock} class A { @@ -6037,9 +6037,10 @@ \indextext{destruction!member access}% For an object with a non-trivial constructor, referring to any non-static member or base class of the object before the constructor begins execution results in -undefined behavior. For an object with a non-trivial destructor, referring to +undefined behavior\ubdef{class.cdtor.before.ctor}. +For an object with a non-trivial destructor, referring to any non-static member or base class of the object after the destructor finishes -execution results in undefined behavior. +execution results in undefined behavior\ubdef{class.cdtor.after.dtor}. \begin{example} \begin{codeblock} struct X { int i; }; @@ -6124,7 +6125,7 @@ indirectly derive from \tcode{B} shall have started and the destruction of these classes shall not have -completed, otherwise the conversion results in undefined behavior. +completed, otherwise the conversion results in undefined behavior\ubdef{class.cdtor.convert.pointer}. To form a pointer to (or access the value of) a direct non-static member of an object \tcode{obj}, @@ -6132,7 +6133,7 @@ \tcode{obj} shall have started and its destruction shall not have completed, otherwise the computation of the pointer value (or accessing the member -value) results in undefined behavior. +value) results in undefined behavior\ubdef{class.cdtor.form.pointer}. \begin{example} \begin{codeblock} struct A { }; @@ -6176,7 +6177,7 @@ and the object expression refers to the complete object of \tcode{x} or one of that object's base class subobjects but not \tcode{x} or one of its base class subobjects, the behavior -is undefined. +is undefined\ubdef{class.cdtor.virtual.not.x}. \begin{example} \begin{codeblock} struct V { @@ -6233,7 +6234,7 @@ \tcode{typeid} refers to the object under construction or destruction and the static type of the operand is neither the constructor or destructor's class nor one of its -bases, the behavior is undefined. +bases, the behavior is undefined\ubdef{class.cdtor.typeid}. \pnum \indextext{construction!dynamic cast and}% @@ -6258,7 +6259,7 @@ the operand is not a pointer to or object of the constructor or destructor's own class or one of its bases, the \keyword{dynamic_cast} -results in undefined behavior. +results in undefined behavior\ubdef{class.cdtor.dynamic.cast}. \begin{example} \begin{codeblock} struct V { diff --git a/source/compatibility.tex b/source/compatibility.tex index e3512400d3..7f97796edc 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -2284,7 +2284,7 @@ \diffref{dcl.link} \change -Names declared in an anonymous namespace +Names declared in an unnamed namespace changed from external linkage to internal linkage; language linkage applies to names with external linkage only. \rationale diff --git a/source/config.tex b/source/config.tex index eab8b49521..c46c710e5a 100644 --- a/source/config.tex +++ b/source/config.tex @@ -2,8 +2,8 @@ %%-------------------------------------------------- %% Version numbers \newcommand{\docno}{Dxxxx} -\newcommand{\prevdocno}{N5032} -\newcommand{\cppver}{202302L} +\newcommand{\prevdocno}{N5050} +\newcommand{\cppver}{202603L} %% Release date \newcommand{\reldate}{\today} diff --git a/source/containers.tex b/source/containers.tex index 2aee316dde..2a1ae6fa53 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -340,8 +340,8 @@ \begin{itemdescr} \pnum \result -\tcode{iterator}; -\tcode{const_iterator} for constant \tcode{b}. +\tcode{const_iterator} if \tcode{b} is of type \tcode{const X}; +\tcode{iterator} otherwise. \pnum \returns @@ -360,8 +360,8 @@ \begin{itemdescr} \pnum \result -\tcode{iterator}; -\tcode{const_iterator} for constant \tcode{b}. +\tcode{const_iterator} if \tcode{b} is of type \tcode{const X}; +\tcode{iterator} otherwise. \pnum \returns @@ -826,8 +826,8 @@ \begin{itemdescr} \pnum \result -\tcode{reverse_iterator}; -\tcode{const_reverse_iterator} for constant \tcode{a}. +\tcode{const_reverse_iterator} if \tcode{a} is of type \tcode{const X}; +\tcode{reverse_iterator} otherwise. \pnum \returns @@ -846,8 +846,8 @@ \begin{itemdescr} \pnum \result -\tcode{reverse_iterator}; -\tcode{const_reverse_iterator} for constant \tcode{a}. +\tcode{const_reverse_iterator} if \tcode{a} is of type \tcode{const X}; +\tcode{reverse_iterator} otherwise. \pnum \returns @@ -1927,7 +1927,8 @@ \begin{itemdescr} \pnum \result -\tcode{reference; const_reference} for constant \tcode{a}. +\tcode{const_reference} if \tcode{a} is of type \tcode{const X}; +\tcode{reference} otherwise. \pnum \hardexpects @@ -1956,7 +1957,8 @@ \begin{itemdescr} \pnum \result -\tcode{reference; const_reference} for constant \tcode{a}. +\tcode{const_reference} if \tcode{a} is of type \tcode{const X}; +\tcode{reference} otherwise. \pnum \hardexpects @@ -2275,7 +2277,8 @@ \begin{itemdescr} \pnum \result -\tcode{reference; const_reference} for constant \tcode{a}. +\tcode{const_reference} if \tcode{a} is of type \tcode{const X}; +\tcode{reference} otherwise. \pnum \hardexpects @@ -2302,7 +2305,8 @@ \begin{itemdescr} \pnum \result -\tcode{reference; const_reference} for constant \tcode{a}. +\tcode{const_reference} if \tcode{a} is of type \tcode{const X}; +\tcode{reference} otherwise. \pnum \returns @@ -3792,7 +3796,8 @@ \begin{itemdescr} \pnum \result -\tcode{iterator}; \tcode{const_iterator} for constant \tcode{b}. +\tcode{const_iterator} if \tcode{b} is of type \tcode{const X}; +\tcode{iterator} otherwise. \pnum \returns @@ -3812,7 +3817,8 @@ \begin{itemdescr} \pnum \result -\tcode{iterator}; \tcode{const_iterator} for constant \tcode{a_tran}. +\tcode{const_iterator} if \tcode{a_tran} is of type \tcode{const X}; +\tcode{iterator} otherwise. \pnum \returns @@ -3902,7 +3908,8 @@ \begin{itemdescr} \pnum \result -\tcode{iterator}; \tcode{const_iterator} for constant \tcode{b}. +\tcode{const_iterator} if \tcode{b} is of type \tcode{const X}; +\tcode{iterator} otherwise. \pnum \returns @@ -3922,7 +3929,8 @@ \begin{itemdescr} \pnum \result -\tcode{iterator}; \tcode{const_iterator} for constant \tcode{a_tran}. +\tcode{const_iterator} if \tcode{a_tran} is of type \tcode{const X}; +\tcode{iterator} otherwise. \pnum \returns @@ -3943,7 +3951,8 @@ \begin{itemdescr} \pnum \result -\tcode{iterator}; \tcode{const_iterator} for constant \tcode{b}. +\tcode{const_iterator} if \tcode{b} is of type \tcode{const X}; +\tcode{iterator} otherwise. \pnum \returns @@ -3963,7 +3972,8 @@ \begin{itemdescr} \pnum \result -\tcode{iterator}; \tcode{const_iterator} for constant \tcode{a_tran}. +\tcode{const_iterator} if \tcode{a_tran} is of type \tcode{const X}; +\tcode{iterator} otherwise. \pnum \returns @@ -3984,8 +3994,9 @@ \begin{itemdescr} \pnum \result -\tcode{pair}; -\tcode{pair} for constant \tcode{b}. +\tcode{pair} +if \tcode{b} is of type \tcode{const X}; +\tcode{pair} otherwise. \pnum \effects @@ -4004,8 +4015,9 @@ \begin{itemdescr} \pnum \result -\tcode{pair}; -\tcode{pair} for constant \tcode{a_tran}. +\tcode{pair} +if \tcode{a_tran} is of type \tcode{const X}; +\tcode{pair} otherwise. \pnum \effects @@ -5479,7 +5491,8 @@ \begin{itemdescr} \pnum \result -\tcode{iterator}; \tcode{const_iterator} for constant \tcode{b}. +\tcode{const_iterator} if \tcode{b} is of type \tcode{const X}; +\tcode{iterator} otherwise. \pnum \returns @@ -5499,7 +5512,8 @@ \begin{itemdescr} \pnum \result -\tcode{iterator}; \tcode{const_iterator} for constant \tcode{a_tran}. +\tcode{const_iterator} if \tcode{a_tran} is of type \tcode{const X}; +\tcode{iterator} otherwise. \pnum \returns @@ -5580,8 +5594,9 @@ \begin{itemdescr} \pnum \result -\tcode{pair}; -\tcode{pair} for constant \tcode{b}. +\tcode{pair} +if \tcode{b} is of type \tcode{const X}; +\tcode{pair} otherwise. \pnum \returns @@ -5601,8 +5616,9 @@ \begin{itemdescr} \pnum \result -\tcode{pair}; -\tcode{pair} for constant \tcode{a_tran}. +\tcode{pair} +if \tcode{a_tran} is of type \tcode{const X}; +\tcode{pair} otherwise. \pnum \returns @@ -5739,7 +5755,8 @@ \begin{itemdescr} \pnum \result -\tcode{local_iterator}; \tcode{const_local_iterator} for constant \tcode{b}. +\tcode{const_local_iterator} if \tcode{b} is of type \tcode{const X}; +\tcode{local_iterator} otherwise. \pnum \expects @@ -5763,7 +5780,8 @@ \begin{itemdescr} \pnum \result -\tcode{local_iterator}; \tcode{const_local_iterator} for constant \tcode{b}. +\tcode{const_local_iterator} if \tcode{b} is of type \tcode{const X}; +\tcode{local_iterator} otherwise. \pnum \expects @@ -14895,7 +14913,7 @@ template constexpr unordered_set(InputIterator f, InputIterator l, size_type n, const hasher& hf, const allocator_type& a) - : unordered_set(f, l, n, hf, key_equal(), a) { } + : unordered_set(f, l, n, hf, key_equal(), a) { } constexpr unordered_set(initializer_list il, size_type n, const allocator_type& a) : unordered_set(il, n, hasher(), key_equal(), a) { } @@ -15315,7 +15333,7 @@ template constexpr unordered_multiset(InputIterator f, InputIterator l, size_type n, const hasher& hf, const allocator_type& a) - : unordered_multiset(f, l, n, hf, key_equal(), a) { } + : unordered_multiset(f, l, n, hf, key_equal(), a) { } template<@\exposconcept{container-compatible-range}@ R> constexpr unordered_multiset(from_range_t, R&& rg, size_type n, const allocator_type& a) : unordered_multiset(from_range, std::forward(rg), @@ -17258,11 +17276,11 @@ : flat_map(comp) { insert_range(std::forward(rg)); } constexpr flat_map(initializer_list il, const key_compare& comp = key_compare()) - : flat_map(il.begin(), il.end(), comp) { } + : flat_map(il.begin(), il.end(), comp) { } constexpr flat_map(sorted_unique_t, initializer_list il, const key_compare& comp = key_compare()) - : flat_map(sorted_unique, il.begin(), il.end(), comp) { } + : flat_map(sorted_unique, il.begin(), il.end(), comp) { } // \ref{flat.map.cons.alloc}, constructors with allocators @@ -17528,10 +17546,10 @@ template> flat_map(sorted_unique_t, initializer_list>, Compare = Compare()) - -> flat_map; + -> flat_map; template + class Allocator> struct uses_allocator, Allocator> : bool_constant && uses_allocator_v> { }; @@ -18440,7 +18458,7 @@ constexpr flat_multimap(sorted_equivalent_t, key_container_type key_cont, mapped_container_type mapped_cont, - const key_compare& comp = key_compare()); + const key_compare& comp = key_compare()); template constexpr flat_multimap(InputIterator first, InputIterator last, @@ -18462,11 +18480,11 @@ constexpr flat_multimap(initializer_list il, const key_compare& comp = key_compare()) - : flat_multimap(il.begin(), il.end(), comp) { } + : flat_multimap(il.begin(), il.end(), comp) { } constexpr flat_multimap(sorted_equivalent_t, initializer_list il, const key_compare& comp = key_compare()) - : flat_multimap(sorted_equivalent, il.begin(), il.end(), comp) { } + : flat_multimap(sorted_equivalent, il.begin(), il.end(), comp) { } // \ref{flat.multimap.cons.alloc}, constructors with allocators @@ -18699,10 +18717,10 @@ template> flat_multimap(sorted_equivalent_t, initializer_list>, Compare = Compare()) - -> flat_multimap; + -> flat_multimap; template + class Allocator> struct uses_allocator, Allocator> : bool_constant && @@ -21297,7 +21315,7 @@ class AccessorPolicy, class... SliceSpecifiers> constexpr auto submdspan( const mdspan& src, - SliceSpecifiers... slices) -> @\seebelow@; + SliceSpecifiers... raw_slices) -> @\seebelow@; template concept @\defexposconcept{index-pair-like}@ = // \expos @@ -23435,7 +23453,7 @@ \indexlibraryctor{layout_left_padded::mapping}% \begin{itemdecl} template -constexpr mapping(const extents_type& ext, OtherIndexType padding); + constexpr mapping(const extents_type& ext, OtherIndexType padding); \end{itemdecl} \begin{itemdescr} @@ -23730,7 +23748,7 @@ \indexlibrarymember{operator()}{layout_left_padded::mapping}% \begin{itemdecl} template -constexpr index_type operator()(Indices... idxs) const noexcept; + constexpr index_type operator()(Indices... idxs) const noexcept; \end{itemdecl} \begin{itemdescr} @@ -26186,7 +26204,7 @@ A type \tcode{LayoutMapping} satisfies \exposconcept{sliceable-mapping} if \begin{itemize} \item - the expression \tcode{submdspan_mapping(m, fe...)} is well-formed + the expression \tcode{submdspan_mapping(lm, fe...)} is well-formed when treated as an unevaluated operand, and \item the type of that expression is a specialization of @@ -26592,7 +26610,7 @@ class AccessorPolicy, class... SliceSpecifiers> constexpr auto submdspan( const mdspan& src, - SliceSpecifiers... slices) -> @\seebelow@; + SliceSpecifiers... raw_slices) -> @\seebelow@; \end{itemdecl} \begin{itemdescr} @@ -26602,7 +26620,7 @@ \pnum Let \tcode{slices} be the pack introduced by the following declaration: \begin{codeblock} -auto [...slices] = canonical_slices(src, raw_slices...); +auto [...slices] = canonical_slices(src.extents(), raw_slices...); \end{codeblock} \pnum diff --git a/source/declarations.tex b/source/declarations.tex index 627360a226..88830bfea2 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -1065,7 +1065,7 @@ 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 -is reachable at the point of the initializing declaration. +is reachable at the point of the initializing declaration\ifndrdef{dcl.constinit.specifier.not.reachable}. \pnum If a variable declared with the \keyword{constinit} specifier has @@ -1140,7 +1140,7 @@ is declared inline in one definition domain, an inline declaration of it shall be reachable from the end of every definition domain in which it is declared; -no diagnostic is required. +no diagnostic is required\ifndrdef{dcl.inline.missing.on.definition}. \begin{note} A call to an inline function or a use of an inline variable can be encountered before its definition becomes reachable in a translation unit. @@ -1297,7 +1297,7 @@ \indextext{const object!undefined change to}% Any attempt to modify\iref{expr.assign,expr.post.incr,expr.pre.incr} a const object\iref{basic.type.qualifier} during its -lifetime\iref{basic.life} results in undefined behavior. +lifetime\iref{basic.life} results in undefined behavior\ubdef{dcl.type.cv.modify.const.obj}. \begin{example} \begin{codeblock} const int ci = 3; // cv-qualified (initialized as required) @@ -1341,7 +1341,7 @@ \impldef{semantics of an access through a volatile glvalue}. If an attempt is made to access an object defined with a volatile-qualified type through the use of a non-volatile glvalue, -the behavior is undefined. +the behavior is undefined\ubdef{dcl.type.cv.access.volatile}. \pnum \indextext{type specifier!\idxcode{volatile}}% @@ -3286,11 +3286,11 @@ the converted initializer is a glvalue whose type is not call-compatible\iref{expr.call} with the type of the function's definition -results in undefined behavior. +results in undefined behavior\ubdef{dcl.ref.incompatible.function}. Attempting to bind a reference to an object where the converted initializer is a glvalue through which the object is not type-accessible\iref{basic.lval} -results in undefined behavior. +results in undefined behavior\ubdef{dcl.ref.incompatible.type}. \begin{note} \indextext{reference!null}% The object designated by such a glvalue can be @@ -3304,7 +3304,7 @@ \end{note} The behavior of an evaluation of a reference\iref{expr.prim.id, expr.ref} that does not happen after\iref{intro.races} the initialization of the reference -is undefined. +is undefined\ubdef{dcl.ref.uninitialized.reference}. \begin{example} \begin{codeblock} int &f(int&); @@ -4376,7 +4376,8 @@ \end{example} For a given inline function defined in different translation units, the accumulated sets of default arguments at the end of the -translation units shall be the same; no diagnostic is required. +translation units shall be the same; +no diagnostic is required\ifndrdef{dcl.fct.default.inline.same.defaults}. If a friend declaration $D$ specifies a default argument expression, that declaration shall be a definition and there shall be no other declaration of the function or function template @@ -4681,7 +4682,8 @@ a declaration $F_2$ is a first declaration of \tcode{f} in another translation unit, $F_1$ and $F_2$ shall specify the same -\grammarterm{function-contract-specifier-seq}, no diagnostic required. +\grammarterm{function-contract-specifier-seq}, +no diagnostic required\ifndrdef{dcl.contract.func.mismatched.contract.specifiers}. \pnum A \grammarterm{function-contract-specifier-seq} $S_1$ @@ -7399,7 +7401,7 @@ The evaluation that invoked a resumption member function is called the \defnx{resumer}{coroutine!resumer}. Invoking a resumption member function for a coroutine -that is not suspended results in undefined behavior. +that is not suspended results in undefined behavior\ubdef{dcl.fct.def.coroutine.resume.not.suspended}. \pnum An implementation may need to allocate additional storage for a coroutine. @@ -7493,7 +7495,7 @@ The storage for the coroutine state is released by calling a non-array deallocation function\iref{basic.stc.dynamic.deallocation}. If \tcode{destroy} is called for a coroutine that is not suspended, the -program has undefined behavior. +program has undefined behavior\ubdef{dcl.fct.def.coroutine.destroy.not.suspended}. \pnum The deallocation function's name is looked up by searching for it in the scope of the promise type. @@ -7590,7 +7592,7 @@ shall be such that it would be valid as a redeclaration of the declaration in that header; \end{itemize} -no diagnostic is required. +no diagnostic is required\ifndrdef{dcl.fct.def.replace.bad.replacement}. \begin{note} The one-definition rule\iref{basic.def.odr} applies to the definitions of a replaceable function @@ -9311,7 +9313,7 @@ \pnum If two declarations of an entity give it different language linkages, the program is ill-formed; no diagnostic is required if neither declaration -is reachable from the other. +is reachable from the other\ifndrdef{dcl.link.mismatched.language.linkage}. \indextext{consistency!linkage specification}% A redeclaration of an entity without a linkage specification inherits the language linkage of the entity and (if applicable) its type. @@ -9669,7 +9671,7 @@ \grammarterm{alignment-specifier}{}, every defining declaration of that entity shall specify an equivalent alignment. -No diagnostic is required if declarations of an entity have +No diagnostic is required\ifndrdef{dcl.align.diff.translation.units} if declarations of an entity have different \grammarterm{alignment-specifier}{s} in different translation units. \begin{example} @@ -9723,7 +9725,7 @@ at the point where the assumption appears, the assumption has no effect. Otherwise, -evaluation of the assumption has runtime-undefined behavior. +evaluation of the assumption has runtime-undefined behavior\ubdef{dcl.attr.assume.false}. \pnum \begin{note} @@ -9899,7 +9901,7 @@ in one translation unit and the same function is declared without the \tcode{indeterminate} attribute on the same parameter in its first declaration in another translation unit, -the program is ill-formed, no diagnostic required. +the program is ill-formed, no diagnostic required\ifndrdef{dcl.attr.indet.mismatched.declarations}. \pnum \begin{note} @@ -10155,12 +10157,12 @@ specify the \tcode{noreturn} attribute if any declaration of that function specifies the \tcode{noreturn} attribute. If a function is declared with the \tcode{noreturn} attribute in one translation unit and the same function is declared without the \tcode{noreturn} attribute in another -translation unit, the program is ill-formed, no diagnostic required. +translation unit, the program is ill-formed, no diagnostic required\ifndrdef{dcl.attr.noreturn.trans.unit.mismatch}. \pnum 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. +the behavior is runtime-undefined\ubdef{dcl.attr.noreturn.eventually.returns}. \begin{note} The function can terminate by throwing an exception. diff --git a/source/exceptions.tex b/source/exceptions.tex index df3b639dc0..34e3d5ee26 100644 --- a/source/exceptions.tex +++ b/source/exceptions.tex @@ -690,7 +690,7 @@ Referring to any non-static member or base class of an object in the handler for a \grammarterm{function-try-block} -of a constructor or destructor for that object results in undefined behavior. +of a constructor or destructor for that object results in undefined behavior\ubdef{except.handle.handler.ctor.dtor}. \pnum Exceptions thrown in destructors of objects with static storage duration or in diff --git a/source/exec.tex b/source/exec.tex index 4f7f72b01c..42c1a57a0d 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -1861,7 +1861,7 @@ \pnum \remarks -The expression in the noexcept clause is \tcode{noexcept(e)}. +The expression in the \tcode{noexcept} clause is \tcode{noexcept(e)}. \end{itemdescr} \pnum @@ -4259,8 +4259,7 @@ OpsVariant @\exposidnc{ops}@; // \expos template - constexpr void @\exposid{impl}@(Rcvr& rcvr, Tag tag, Ts&&... ts) noexcept // \expos - { + constexpr void @\exposid{impl}@(Rcvr& rcvr, Tag tag, Ts&&... ts) noexcept { // \expos using args_t = @\exposid{decayed-tuple}@; using receiver_type = @\exposid{receiver2}@; using sender_type = apply_result_t; diff --git a/source/expressions.tex b/source/expressions.tex index eec3be900e..a33badd5f2 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -64,7 +64,7 @@ \indextext{zero!remainder undefined}% If during the evaluation of an expression, the result is not mathematically defined or not in the range of representable values for -its type, the behavior is undefined. +its type, the behavior is undefined\ubdef{expr.expr.eval}. \begin{note} \indextext{overflow}% Treatment of division by zero, forming a remainder using a zero divisor, @@ -317,7 +317,7 @@ If a program attempts to access\iref{defns.access} the stored value of an object through a glvalue through which it is not type-accessible, -the behavior is undefined. +the behavior is undefined\ubdef{expr.basic.lvalue.strict.aliasing.violation}. \begin{footnote} The intent of this list is to specify those circumstances in which an object can or cannot be aliased. @@ -326,7 +326,7 @@ a defaulted copy/move constructor or copy/move assignment operator for a union of type \tcode{U} with a glvalue argument that does not denote an object of type \cv{}~\tcode{U} within its lifetime, -the behavior is undefined. +the behavior is undefined\ubdef{expr.basic.lvalue.union.initialization}. \begin{note} In C, an entire object of structure type can be accessed, e.g., using assignment. By contrast, \Cpp{} has no notion of accessing an object of class type @@ -345,7 +345,7 @@ If a pointer to $X$ would be valid in the context of the evaluation of the expression\iref{basic.fundamental}, the result designates $X$; -otherwise, the behavior is undefined. +otherwise, the behavior is undefined\ubdef{expr.type.reference.lifetime}. \begin{note} Before the lifetime of the reference has started or after it has ended, the behavior is undefined (see~\ref{basic.life}). @@ -686,7 +686,7 @@ \item Otherwise, if the bits in the value representation of the object to which the glvalue refers -are not valid for the object's type, the behavior is undefined. +are not valid for the object's type, the behavior is undefined\ubdef{conv.lval.valid.representation}. \begin{example} \begin{codeblock} bool f() { @@ -989,7 +989,7 @@ that exact representation. If the source value is between two adjacent destination values, the result of the conversion is an \impldef{result of inexact floating-point conversion} choice of either of those values. -Otherwise, the behavior is undefined. +Otherwise, the behavior is undefined\ubdef{conv.double.out.of.range}. \pnum The conversions allowed as floating-point promotions are excluded from @@ -1003,7 +1003,7 @@ integer type. The conversion truncates; that is, the fractional part is discarded. \indextext{value!undefined unrepresentable integral}% -The behavior is undefined if the truncated value cannot be represented +The behavior is undefined\ubdef{conv.fpint.float.not.represented} if the truncated value cannot be represented in the destination type. \begin{note} If the destination type is \keyword{bool}, see~\ref{conv.bool}. @@ -1024,7 +1024,9 @@ exactly as a value of the floating-point type. \end{note} If the value being converted is -outside the range of values that can be represented, the behavior is undefined. If the +outside the range of values that can be represented, +the behavior is undefined\ubdef{conv.fpint.int.not.represented}. +If the source type is \keyword{bool}, the value \keyword{false} is converted to zero and the value \keyword{true} is converted to one. @@ -1077,7 +1079,7 @@ that is within its lifetime or within its period of construction or destruction\iref{class.cdtor}, -the behavior is undefined. +the behavior is undefined\ubdef{conv.ptr.virtual.base}. Otherwise, the result is a pointer to the base class subobject of the derived class object. @@ -1111,7 +1113,8 @@ \tcode{D}, a program that necessitates this conversion is ill-formed. If class \tcode{D} does not contain the original member and is not a base class of the class containing the original member, -the behavior is undefined. Otherwise, +the behavior is undefined\ubdef{conv.member.missing.member}. +Otherwise, the result of the conversion refers to the same member as the pointer to member before the conversion took place, but it refers to the base class member as if it were a member of the derived class. The result refers to @@ -3320,7 +3323,7 @@ \end{note} If the substitution of template arguments into a \grammarterm{requirement} would always result in a substitution failure, the program is ill-formed; -no diagnostic required. +no diagnostic required\ifndrdef{expr.prim.req.always.sub.fail}. \begin{example} \begin{codeblock} template concept C = @@ -3859,7 +3862,7 @@ expression whose function type is not call-compatible with the type of the called function's -definition results in undefined behavior. +definition results in undefined behavior\ubdef{expr.call.different.type}. \begin{note} This requirement allows the case when the expression has the type of a @@ -4391,7 +4394,7 @@ or direct base class relationship and the result of \tcode{E1} is an object whose type is not similar\iref{conv.qual} to the type of \tcode{E1}, -the behavior is undefined. +the behavior is undefined\ubdef{expr.ref.member.not.similar}. \begin{example} \begin{codeblock} struct A { int i; }; @@ -4520,14 +4523,14 @@ that is within its lifetime or within its period of construction or destruction\iref{class.cdtor}, -the behavior is undefined. +the behavior is undefined\ubdef{expr.dynamic.cast.pointer.lifetime}. If \tcode{v} is a glvalue of type \tcode{U} and \tcode{v} does not refer to an object whose type is similar to \tcode{U} and that is within its lifetime or within its period of construction or destruction, -the behavior is undefined. +the behavior is undefined\ubdef{expr.dynamic.cast.glvalue.lifetime}. \pnum If \tcode{T} is ``pointer to \cv{} \keyword{void}'', then the result @@ -4732,7 +4735,7 @@ type ``\cvqual{cv1} \tcode{B}''. If the object of type ``\cvqual{cv1} \tcode{B}'' is actually a base class subobject of an object of type \tcode{D}, the result refers to the enclosing object of type -\tcode{D}. Otherwise, the behavior is undefined. +\tcode{D}. Otherwise, the behavior is undefined\ubdef{expr.static.cast.base.class}. \begin{example} \begin{codeblock} struct B { }; @@ -4832,7 +4835,7 @@ the value is unchanged if the original value is within the range of the enumeration values\iref{dcl.enum}, and -otherwise, the behavior is undefined. +otherwise, the behavior is undefined\ubdef{expr.static.cast.enum.outside.range}. A value of floating-point type can also be explicitly converted to an enumeration type. The resulting value is the same as converting the original value to the underlying type of the enumeration\iref{conv.fpint}, and subsequently to @@ -4847,7 +4850,7 @@ the result of the conversion is an \impldef{result of inexact floating-point conversion} choice of either of those values. -Otherwise, the behavior is undefined. +Otherwise, the behavior is undefined\ubdef{expr.static.cast.fp.outside.range}. \pnum \indextext{cast!base class}% @@ -4868,7 +4871,7 @@ ``pointer to \cvqual{cv1} \tcode{B}'' points to a \tcode{B} that is actually a base class subobject of an object of type \tcode{D}, the resulting pointer points to the enclosing object of type \tcode{D}. Otherwise, the -behavior is undefined. +behavior is undefined\ubdef{expr.static.cast.downcast.wrong.derived.type}. \pnum \indextext{cast!pointer-to-member}% @@ -4891,7 +4894,7 @@ member pointer value of the destination type. If class \tcode{B} contains the original member, or is a base class of the class containing the original member, the resulting pointer to member points -to the original member. Otherwise, the behavior is undefined. +to the original member. Otherwise, the behavior is undefined\ubdef{expr.static.cast.does.not.contain.original.member}. \begin{note} Although class \tcode{B} need not contain the original member, the dynamic type of the object with which indirection through the pointer @@ -5269,7 +5272,8 @@ The operator yields an lvalue of type \tcode{T}. If the operand points to an object or function, the result denotes that object or function; -otherwise, the behavior is undefined except as specified in \ref{expr.typeid}. +otherwise, the behavior is undefined except as specified in \ref{expr.typeid} +\ubdef{expr.unary.dereference}. \begin{note} Indirection through a pointer to an out-of-lifetime object is valid\iref{basic.life}. \end{note} @@ -6285,7 +6289,7 @@ \end{note} If the allocation function is a non-allocating form\iref{new.delete.placement} that returns null, -the behavior is undefined. +the behavior is undefined\ubdef{expr.new.non.allocating.null}. Otherwise, if the allocation function returns null, initialization shall not be done, the deallocation function shall not be called, and the value of @@ -6527,7 +6531,7 @@ that resulted from a previous non-array \grammarterm{new-expression}, or a pointer to a base class subobject of an object created by such a \grammarterm{new-expression}. -If not, the behavior is undefined. +If not, the behavior is undefined\ubdef{expr.delete.mismatch}. \indextext{array!\idxcode{delete}}% In an array delete expression, the value of the operand of \keyword{delete} may be a null pointer value or a pointer value that resulted from @@ -6539,7 +6543,7 @@ element of the array created by that \grammarterm{new-expression}. Zero-length arrays do not have a first element. \end{footnote} -If not, the behavior is undefined. +If not, the behavior is undefined\ubdef{expr.delete.array.mismatch}. \begin{note} This means that the syntax of the \grammarterm{delete-expression} must match the type of the object allocated by \keyword{new}, not the syntax of the @@ -6560,9 +6564,9 @@ is not a destroying operator delete, the static type shall be a base class of the dynamic type of the object to be deleted and the static type shall -have a virtual destructor or the behavior is undefined. In an array delete +have a virtual destructor or the behavior is undefined\ubdef{expr.delete.dynamic.type.differ}. In an array delete expression, if the dynamic type of the object to be deleted is not similar to -its static type, the behavior is undefined. +its static type, the behavior is undefined\ubdef{expr.delete.dynamic.array.dynamic.type.differ}. \pnum \indextext{type!incomplete}% @@ -7127,7 +7131,7 @@ whose type is not similar to the type of \tcode{E1}, or whose most derived object does not contain the member to which -\tcode{E2} refers, the behavior is undefined. +\tcode{E2} refers, the behavior is undefined\ubdef{expr.mptr.oper.not.contain.member}. The expression \tcode{E1} is sequenced before the expression \tcode{E2}. \pnum @@ -7179,7 +7183,7 @@ operand is an lvalue and an xvalue otherwise. The result of a \tcode{.*} expression whose second operand is a pointer to a member function is a prvalue. If the second operand is the null -member pointer value\iref{conv.mem}, the behavior is undefined. +member pointer value\iref{conv.mem}, the behavior is undefined\ubdef{expr.mptr.oper.member.func.null}. \rSec2[expr.mul]{Multiplicative operators}% \indextext{expression!multiplicative operators}% @@ -7220,7 +7224,7 @@ expression by the second. \indextext{zero!undefined division by}% If the second operand of \tcode{/} or \tcode{\%} is zero, the behavior is -undefined. +undefined\ubdef{expr.mul.div.by.zero}. For integral operands, the \tcode{/} operator yields the algebraic quotient with any fractional part discarded; \begin{footnote} @@ -7228,7 +7232,7 @@ \end{footnote} if the quotient \tcode{a/b} is representable in the type of the result, \tcode{(a/b)*b + a\%b} is equal to \tcode{a}; otherwise, the behavior -of both \tcode{a/b} and \tcode{a\%b} is undefined. +of both \tcode{a/b} and \tcode{a\%b} is undefined\ubdef{expr.mul.representable.type.result}. \rSec2[expr.add]{Additive operators}% \indextext{expression!additive operators}% @@ -7307,7 +7311,7 @@ and the expression \tcode{P - J} points to the (possibly-hypothetical) array element $i - j$ of \tcode{x} if $0 \le i - j \le n$. -\item Otherwise, the behavior is undefined. +\item Otherwise, the behavior is undefined\ubdef{expr.add.out.of.bounds}. \end{itemize} \begin{note} Adding a value other than $0$ or $1$ @@ -7333,13 +7337,13 @@ of type \tcode{std::ptrdiff_t}, the behavior is undefined\iref{expr.pre}. \end{note} -\item Otherwise, the behavior is undefined. +\item Otherwise, the behavior is undefined\ubdef{expr.add.sub.diff.pointers}. \end{itemize} \pnum For addition or subtraction, if the expressions \tcode{P} or \tcode{Q} have type ``pointer to \cv{}~\tcode{T}'', where \tcode{T} and the array element type -are not similar\iref{conv.qual}, the behavior is undefined. +are not similar\iref{conv.qual}, the behavior is undefined\ubdef{expr.add.not.similar}. \begin{example} \begin{codeblock} int arr[5] = {1, 2, 3, 4, 5}; @@ -7376,7 +7380,7 @@ promotions are performed. The type of the result is that of the promoted left operand. \indextext{left shift!undefined}% -The behavior is undefined if the right operand is negative, or greater +The behavior is undefined\ubdef{expr.shift.neg.and.width} if the right operand is negative, or greater than or equal to the width of the promoted left operand. \pnum @@ -8287,7 +8291,7 @@ If the value being stored in an object is read via another object that overlaps in any way the storage of the first object, then the overlap shall be exact and the two objects shall have the same type, otherwise the behavior is -undefined. +undefined\ubdef{expr.assign.overlap}. \begin{note} This restriction applies to the relationship between the left and right sides of the assignment operation; it is not a @@ -9143,7 +9147,7 @@ has the value \keyword{true}. \end{note} \begin{note} -Furthermore, if the initialization is manifestly constant-evaluated, +Furthermore, if the initialization is manifestly constant-evaluated\iref{expr.const.defns}, its evaluation during translation can still evaluate contract assertions with other evaluation semantics, @@ -9254,7 +9258,7 @@ a function parameter scope of an immediate function, \item it is a subexpression of a manifestly constant-evaluated expression -or conversion, or +or conversion\iref{expr.const.defns}, or \item its enclosing statement is enclosed\iref{stmt.pre} by the \grammarterm{compound-statement} of a consteval if statement\iref{stmt.if}. diff --git a/source/ifndr.tex b/source/ifndr.tex new file mode 100644 index 0000000000..740a85ef7f --- /dev/null +++ b/source/ifndr.tex @@ -0,0 +1,1061 @@ +%!TEX root = std.tex +\infannex{ifndr}{Ill-formed, no diagnostic required} + +\rSec1[ifndr.general]{General} + +This Annex documents +rules for which no diagnostic is required, +called out in +\ref{intro} through \ref{\lastcorechapter} +using the following phrases: +\begin{itemize} +\item no diagnostic is required +\item no diagnostic required +\item a diagnostic is required only if +\end{itemize} +Each entry contains +a title, +a cross-reference, +a summary of the circumstances, +and code examples. +The code examples are not intended +to exhaustively cover all possible ways of invoking that case. + +\rSec1[ifndr.lex]{\ref{lex}: Lexical conventions} + +\ifndrdescription{lex.name.reserved} + +\pnum +Using an identifier reserved for use by \Cpp{} +is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +int _z; // IFNDR, \tcode{\_z} is reserved because it starts with \tcode{\_} at global scope + +int main() { + int __x; // IFNDR, \tcode{\_\_x} is reserved because it starts with \tcode{\_\_} + int _Y; // IFNDR, \tcode{\_Y} is reserved because it starts with \tcode{\_} followed by a capital letter + int x__y; // IFNDR, \tcode{x\_\_y} is reserved because it contains \tcode{\_\_} +} +\end{codeblock} +\end{example} + +\rSec1[ifndr.basic]{\ref{basic}: Basics} + +\ifndrdescription{basic.link.consistent.types} + +\pnum +Having multiple declarations of the same entity +with different kinds +when those declarations are not reachable from one another +is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Module interface of \tcode{M}} +void g(); // \#1 +void h(); // \#2 +template int j; // \#3 +\end{codeblocktu} +\begin{codeblocktu}{Module interface of \tcode{N}} +int g(); // same entity as \#1, different type +namespace h {} // same entity as \#2, not both namespaces +template int j; // same entity as \#3, non-equivalent template heads +\end{codeblocktu} +\begin{codeblocktu}{Other translation unit} +import M; +import N; + // IFNDR due to the mismatched pairs above +\end{codeblocktu} +\end{example} + +\ifndrdescription{basic.def.odr.minimum.one.def} + +\pnum +Not having a definition +for a function or variable +that is odr-used from a non-discarded statement\iref{stmt.if} +is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +auto f() { + struct A {}; + return A{}; +} +decltype(f()) g(); +auto x = g(); // IFNDR, function \tcode{g} is used but not defined in this translation unit, and cannot + // be defined in any other translation unit because its type does not have linkage +\end{codeblock} +\end{example} + +\ifndrdescription{basic.def.odr.injected.match} + +\pnum +Defining a definable item \tcode{D} +with an injected declaration\iref{expr.const.reflect} +in one translation unit and +a definition in a different translation unit +when \tcode{D} is not attached to a named module +or neither definition is reachable from the other +is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +struct S; +consteval { std::meta::define_aggregate(^^S, {}); } // \#1 +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +struct S {}; // IFNDR, definition here, injected declaration at \#1 +\end{codeblocktu} +\end{example} + +\ifndrdescription{basic.def.odr.maximum.one.def} + +\pnum +If there are definitions +in different translation units +of a non-inline non-templated function or variable +that are not attached to a named module +or are not reachable from one another, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +export module M:A; // module partition +void f() {} // \#1 +void g() {} // \#2 +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +export module M:B; // module partition +void f() {} // IFNDR, \#1 not reachable +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#3} +export module M; // primary module interface unit +export import :A; +void g(); // error: \#2 is reachable +\end{codeblocktu} +\end{example} + +\ifndrdescription{basic.def.odr.definition.matches} + +\pnum +If there are definitions +in different translation units +of a definable item \tcode{D} +where +\begin{itemize} +\item $D$ is not defined by an injected declaration\iref{expr.const.reflect}, +\item $D$ is not an inline or templated function or variable, and +\item $D$ is not attached to a named module or the declarations are not reachable from one another, +\end{itemize} +that do not satisfy the matching rules described in \ref{basic.def.odr}, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +inline void f() {} // \#1 +inline void g() {} // \#2 +inline void h() {[]{}();} // \#3 +namespace { int i = 0; } +inline void j() {++i;} // \#4 +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +inline void f() {} // OK, same as \#1 +inline void g() {;} // IFNDR, different sequence of tokens than \#2 +inline void h() {[]{}();} // IFNDR, closure has different type than \#3 +namespace { int i = 0; } +inline void j() {++i; } // IFNDR, \tcode{i} refers to different entity than in \#4 +\end{codeblocktu} +\end{example} + +\ifndrdescription{basic.def.odr.unnamed.enum.same.type} + +\pnum +Having multiple unnamed enumeration definitions +in the same scope +that have the same first enumerator name +and do not have typedef names for linkage purposes\iref{dcl.enum} +that are not the same enumeration +is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Source file \tcode{"a.h"}} +enum { a }; +\end{codeblocktu} +\begin{codeblocktu}{Source file \tcode{"b.h"}} +enum { a, b }; +\end{codeblocktu} +\begin{codeblocktu}{Source file \tcode{"main.cpp"}} +import "a.h"; +import "b.h"; +auto n = decltype(a)::b; // IFNDR, more than one unnamed enum definition reachable at + // this point but their types are not the same +\end{codeblocktu} +\end{example} + +\ifndrdescription{basic.contract.vastart.contract.predicate} + +\pnum +The use of \tcode{va_start}\iref{cstdarg.syn} +within the predicate of a contract assertion +is ill-formed, no diagnostic required; + +\pnum +\begin{example} +\begin{codeblock} +void f(...) +{ + va_list args; + contract_assert((va_start(const_cast(args)), true)) // IFNDR +} +\end{codeblock} +\end{example} + +\ifndrdescription{basic.contract.handler.replacing.nonreplaceable} + +\pnum +On platforms where +the contract-violation handler +is not replaceable\iref{dcl.fct.def.replace} +a function declaration which could be such a replacement function +is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +#include +void handle_contract_violation(const std::contracts::contract_violation& violation); + // IFNDR, if contract-violation handler is not replaceable +\end{codeblock} +\end{example} + +\ifndrdescription{class.member.lookup.name.refers.diff.decl} + +\pnum +A name $N$ used in a class $S$ +referring to a different declaration +when resolved in its context +than when re-evaluated in the completed scope of $S$ +is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +struct foo {}; + +struct bar { + foo *m_foo; + + foo *foo() { + return m_foo; + } // IFNDR, \tcode{foo} now refers to member function \tcode{foo()} while previously referred to \tcode{struct} \tcode{foo} +}; +\end{codeblock} +\end{example} +\begin{example} +\begin{codeblock} +struct B { + static int f(); +}; + +struct D : public B { + using B::f; + int g(decltype(f()) x) { + return 0; + } // IFNDR, \tcode{decltype(f())} will refer to \tcode{B::f()} here but if + // moved to the end of \tcode{D} it would refer to \tcode{D::f()} + static float f(); +}; + +int main() { + D d; + + return d.g(0); +} +\end{codeblock} +\end{example} + +\rSec1[ifndr.expr]{\ref{expr}: Expressions} + +\ifndrdescription{expr.prim.req.always.sub.fail} + +\pnum +If the substitution of template arguments into a \grammarterm{requirement} +would always result in a substitution failure, the program is ill-formed; no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +template concept C = requires { + new int[-(int)sizeof(T)]; // IFNDR, the size of the allocation is required to be greater + // than zero but can never be +}; +\end{codeblock} +\end{example} + +\rSec1[ifndr.stmt]{\ref{stmt}: Statements} + +\ifndrdescription{stmt.ambig.bound.diff.parse} + +\pnum +If, during +parsing, a name in a template parameter is bound differently than it would be bound during a trial parse, +the program is ill-formed. No diagnostic is required. + +\pnum +\begin{example} +\begin{codeblock} +template struct A { const static int a = 20; }; + +template <> struct A<100> { using a = char; }; + +const int x = 10; + +int main() { + using T = const int; + T(x) + (100), (y)(A::a); // IFNDR, during trial parse the template parameter \tcode{x} is bound to + // the global \tcode{x} later during parsing the template parameter \tcode{x} + // is bound to the local \tcode{x} declared on the same line +} +\end{codeblock} +\end{example} + +\rSec1[ifndr.dcl]{\ref{dcl}: Declarations} + +\ifndrdescription{dcl.constinit.specifier.not.reachable} + +\pnum +If the initializing declaration +of a variable without the \tcode{constinit} specifier +has the \tcode{constinit} specifier +applied to declarations that are not reachable from +that initializing declaration, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +int x = 5; // initializing declaration of \tcode{x} +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +extern constinit int x; // IFNDR, not reachable from initializing declaration of \tcode{x} +\end{codeblocktu} +\end{example} + +\ifndrdescription{dcl.inline.missing.on.definition} + +\pnum +If a function or variable +with external or module linkage +is declared inline +but there is no inline declaration +reachable from the end of some definition domain +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +inline int f(); +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +int f() { return 17; } + // IFNDR, end of definition domain but no inline declaration of \tcode{f} is reachable. +\end{codeblocktu} +\end{example} + +\ifndrdescription{dcl.fct.default.inline.same.defaults} + +\pnum +If the accumulated set of default arguments +for a given inline function +with definitions in multiple translation units +is different at the end +of different translation units, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +inline int f(int x, int y = 2); +inline int f(int x = 1, int y); + // IFNDR, default arguments of \tcode{f} are \tcode{1} and \tcode{2} +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +inline int f(int x = 3, int y = 4); + // IFNDR, default arguments of \tcode{f} are \tcode{3} and \tcode{4} +\end{codeblocktu} +\end{example} + +\ifndrdescription{dcl.contract.func.mismatched.contract.specifiers} + +\pnum +If two different first declarations of a function +(which must therefore not be reachable from one another) +do not have equivalent function contract specifiers +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +int f(int x) pre(x >= 0); // IFNDR, \tcode{pre} present, not present in + // the other first declaration of \tcode{f} +int g(int x) pre(x == 0); // IFNDR, \tcode{pre} differs from the other first declaration of \tcode{g} +int h(int x) pre(x <= 0); // OK, \tcode{pre} equivalent to \tcode{pre} on the other first declaration of \tcode{h} +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +int f(int x); // IFNDR, \tcode{pre} not present, present in + // the other first declaration of \tcode{f} +int g(int x) pre(x != 0); // IFNDR, \tcode{pre} differs from the other first declaration of \tcode{g} +int h(int y) pre(y <= 0); // OK, \tcode{pre} equivalent to \tcode{pre} on the other first declaration of \tcode{h} +\end{codeblocktu} +\end{example} + +\ifndrdescription{dcl.fct.def.replace.bad.replacement} + +\pnum +A declaration of a replaceable function +that is inline, +not attached to the global module, +does not have \Cpp{} language linkage, +does not have the required return type, +or is not a valid redeclaration of the +corresponding declaration in a standard library header (if there is one) +then the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +extern "C" // IFNDR, wrong language linkage +inline // IFNDR, inline +int // IFNDR, wrong return type +handle_contract_violation(const std::contracts::contract_violation&) {} + +void* operator new(decltype(sizeof(0))) noexcept; // IFNDR, mismatched exception specification to + // declaration in \tcode{} +\end{codeblock} +\end{example} + +\ifndrdescription{dcl.link.mismatched.language.linkage} + +\pnum +If two declarations of an entity +do not have the same language linkage +and neither is reachable from the other +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +extern "C" { void f(); } +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +extern "C++" { void f(); } // IFNDR, different language linkage +\end{codeblocktu} +\end{example} + +\ifndrdescription{dcl.align.diff.translation.units} + +\pnum +No diagnostic is required if declarations of an entity have different \grammarterm{alignment-specifier}s in different +translation units. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +struct S { int x; } s, *p = &s; +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +struct alignas(16) S; // IFNDR, definition of \tcode{S} lacks alignment +extern S* p; +\end{codeblocktu} +\end{example} + +\ifndrdescription{dcl.attr.indet.mismatched.declarations} + +\pnum +If two first declarations of a function +declare a function parameter with +mismatched uses of the \tcode{indeterminate} attribute, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +int h(int x [[indeterminate]]); // IFNDR, mismatched \tcode{[[indeterminate]]} to other first declaration of \tcode{h} +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +int h(int x); // IFNDR, mismatched \tcode{[[indeterminate]]} to other first declaration of \tcode{h} +\end{codeblocktu} +\end{example} + +\ifndrdescription{dcl.attr.noreturn.trans.unit.mismatch} + +\pnum +No diagnostic is required if a function is declared +in one translation unit with the \tcode{noreturn} attribute +but has declarations in other translation units +without the attribute. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +[[noreturn]] void f() {} +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +void f(); // IFNDR, declared without \tcode{noreturn} +\end{codeblocktu} +\end{example} + +\rSec1[ifndr.module]{\ref{module}: Modules} + +\ifndrdescription{module.unit.reserved.identifiers} + +\pnum +Specifying a \grammarterm{module-name} +beginning with an identifier +consisting of \tcode{std} followed by zero or more digits, +or containing a reserved identifier\iref{lex.token} +in a \grammarterm{module-declaration} +is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +module std; // IFNDR, \tcode{std} is not allowed at the beginning +module module; // IFNDR, \tcode{module} is a reserved identifier +module std0; // IFNDR, \tcode{std} followed by digits is not allowed at the beginning +export module _Test; // IFNDR, \tcode{_Test} is a reserved identifier +export module te__st; // IFNDR, \tcode{te__st} is a reserved identifier +\end{codeblock} +\end{example} + +\ifndrdescription{module.unit.named.module.no.partition} + +\pnum +Having multiple primary module interface units +for a named module +is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +module A; +export import :Internals; // IFNDR, module partition not allowed +\end{codeblock} +\end{example} + +\ifndrdescription{module.unit.unexported.module.partition} + +\pnum +If a module partition of a module +that is a module interface unit +but is not directly or indirectly exported +by the primary module interface unit\iref{module.import}, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +export module M; // primary module interface unit +export import :A; +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +export module M:A; // OK, directly exported by \tcode{M} +export import :B; +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#3} +export module M:B; // OK, indirectly exported by \tcode{M} +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#4} +export module M:C; // IFNDR, not directly or indirectly exported by \tcode{M} +\end{codeblocktu} +\end{example} + +\ifndrdescription{module.private.frag.other.module.units} + +\pnum +If a module has a private module fragment +and there is another module unit of that module, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +export module M; +module :private; // private module fragment +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +module M:A; // IFNDR, partition of \tcode{M} with private module fragment +\end{codeblocktu} +\end{example} + +\rSec1[ifndr.class]{\ref{class}: Classes} + +\ifndrdescription{class.base.init.delegate.itself} + +\pnum +If a constructor delegates to itself directly or indirectly, +the program is ill-formed, no diagnostic required + +\pnum +\begin{example} +\begin{codeblock} +struct C { + C( int ) { } // \#1: non-delegating constructor + C(): C(42) { } // \#2: delegates to \#1 + C( char c ) : C(42.0) { } // \#3: IFNDR due to recursion with \#4 + C( double d ) : C('a') { } // \#4: IFNDR due to recursion with \#3 +}; +\end{codeblock} +\end{example} + +\ifndrdescription{class.virtual.pure.or.defined} + +\pnum +If a virtual function that is not pure +has no definition, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +class A { + virtual void f(); +}; + +int main() { + A a; // IFNDR, virtual function that is not pure but has no definition +} +\end{codeblock} +\end{example} + +\rSec1[ifndr.over]{\ref{over}: Overloading} + +\ifndrdescription{over.literal.reserved} + +\pnum +Some literal suffix identifiers are +reserved for future standardization. A declaration whose literal-operator-id uses such a literal +suffix identifier is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +float operator ""E(const char*); // IFNDR, reserved literal suffix +double operator"" _Bq(long double); // IFNDR, uses the reserved identifier \tcode{_Bq} +\end{codeblock} +\end{example} + +\rSec1[ifndr.temp]{\ref{temp}: Templates} + +\ifndrdescription{temp.pre.reach.def} + +\pnum +A definition of a function template, +member function of a class template, +variable template, +or static data member of a class template +that is not reachable from +the end of every definition domain\iref{basic.def.odr} +in which it is implicitly instantiated\iref{temp.inst} +and whose corresponding specialization +is not explicitly instantiated\iref{temp.explicit} in some translation unit +is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Source file \tcode{"a.h"}} +template +void f(); +\end{codeblocktu} +\begin{codeblocktu}{Source file \tcode{"a.cpp"}} +#include "a.h" +int main() { + f(); // IFNDR, function template implicitly instantiated but not reachable definition +} +\end{codeblocktu} +\end{example} + +\ifndrdescription{temp.arg.template.sat.constraints} + +\pnum +Any partial specializations\iref{temp.spec.partial} +associated with the primary template are considered when a specialization +based on the template template-parameter is instantiated. +If a specialization is not reachable +from the point of instantiation, +and it would have been selected had it been reachable, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +template struct A { + int x; +}; + +template class V> struct C { + V y; + V z; +}; + +C c; + +// IFNDR, specialization is not reachable from point of instantiation above and it would have +// been selected if it had +template struct A { + long x; +}; +\end{codeblock} +\end{example} + +\ifndrdescription{temp.constr.atomic.equiv.but.not.equiv} + +\pnum +If the validity or meaning of the program +depends on whether two atomic constraints are equivalent, +and they are functionally equivalent but not equivalent, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +template concept Add1 = true; +template void f2() +requires Add1<2 * N>; +template int f2() +requires Add1 && true; +void h2() { +f2<0>(); // IFNDR, requires determination of subsumption between atomic constraints + // that are functionally equivalent but not equivalent +} +\end{codeblock} +\end{example} + +\ifndrdescription{temp.constr.atomic.sat.result.diff} + +\pnum +If, at different points in the program, +the satisfaction result is different +for identical atomic constraints and template arguments, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +template +concept Complete = sizeof(T) == sizeof(T); + +struct A; +static_assert(!Complete); // \#1 +struct A {}; +static_assert(Complete); // IFNDR, satisfaction result differs from point \#1 +\end{codeblock} +\end{example} + +\ifndrdescription{temp.constr.normal.invalid} + +\pnum +If during constraint normalization +any such substitution results in an invalid type or expression, +the program is ill-formed; no diagnostic is required + +\pnum +\begin{example} +\begin{codeblock} +template concept A = T::value || true; +template concept B = A; +template concept C = B; // IFNDR, it would form the invalid type \tcode{V\&*} in the + // parameter mapping +\end{codeblock} +\end{example} + +\ifndrdescription{temp.spec.partial.general.partial.reachable} + +\pnum +If a partial specialization +is not reachable from a use of a template specialization +that would make use of that partial specialization +as the result of an implicit or explicit instantiation, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +template class X{ +public: + void foo(){}; +}; + +template class X; // IFNDR, explicit instantiation and partial specialization is not reachable + +template class X{ +public: + void baz(); +}; +\end{codeblock} +\end{example} + +\ifndrdescription{temp.over.link.equiv.not.equiv} + +\pnum +If the validity or meaning of the program +depends on whether two constructs are equivalent, +and they are functionally equivalent but not equivalent, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +template +struct A{}; + +// IFNDR, the following declarations are functionally equivalent but not equivalent +template void f(A, A); +template void f(A, A); +\end{codeblock} +\end{example} + +\ifndrdescription{temp.res.general.default.but.not.found} + +\pnum +If the validity or meaning of the program +would be changed by considering +a default argument or default template argument +introduced in a declaration that is reachable +from the point of instantiation of a specialization\iref{temp.point} +but is not found by lookup for the specialization, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +void f(long); // \#1 +void f(int, int); // \#2 +template void g(T t) { f(t); } +void f(int, int = 0); // \#3 +void h() { g(0); } // IFNDR, selects \#3 here but selects \#1 using lookup for \tcode{g} +\end{codeblock} +\end{example} + +\ifndrdescription{temp.point.diff.pt.diff.meaning} + +\pnum +A specialization for a class template has +at most one point of instantiation within a translation unit. +A specialization for any template +may have points of instantiation in multiple translation units. +If two different points of instantiation +give a template specialization +different meanings according to the one-definition rule\iref{basic.def.odr}, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Source file \tcode{"a.h"}} +#include + +template +struct is_complete : std::false_type {}; + +template +struct is_complete> : std::true_type {}; +\end{codeblocktu} +\begin{codeblocktu}{Source file \tcode{"a.cpp"}} +#include "a.h" +struct X; +static_assert(!is_complete::value); +\end{codeblocktu} +\begin{codeblocktu}{Source file \tcode{"b.cpp"}} +#include "a.h" +struct X { }; +static_assert(is_complete::value); +\end{codeblocktu} +\end{example} + +\ifndrdescription{temp.dep.candidate.different.lookup.different} + +\pnum +If considering all function declarations +with external linkage +in the associated namespaces in all translations +would make a dependent call\iref{temp.dep} ill-formed +or find a better match, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Translation unit \#1} +namespace A { + struct S {}; + void f(S&, long x, int y); // \#3 + void g(S&, int x); // \#4 +} +\end{codeblocktu} + +\begin{codeblocktu}{Translation unit \#2} +namespace A { + struct S {}; + void f(S&, int x, long y); // \#5 + void g(S&, long x); // \#6 +} +template +void h(T& t) +{ + f(t, 1, 1); // Selects \#5 in \tcode{h}, would be ambiguous call if all declarations were considered. + g(t, 1); // Selects \#6 in \tcode{h}, would select \#4 if all declarations were considered. +} +\end{codeblocktu} +\end{example} + +\ifndrdescription{temp.explicit.decl.implicit.inst} + +\pnum +If an entity that is the subject of +an explicit instantiation declaration +and that is also used +in a way that would otherwise cause an implicit +instantiation\iref{temp.inst} +in the translation unit +is not the subject of +an explicit instantiation definition somewhere in the program +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +// Explicit instantiation declaration +extern template class std::vector; + +int main() { + std::cout << std::vector().size(); // IFNDR, implicit instantiation but no explicit + // instantiation definition +} +\end{codeblock} +\end{example} + +\ifndrdescription{temp.expl.spec.unreachable.declaration} + +\pnum +If an implicit instantiation of a template would occur +and there is an unreachable explicit specialization +that would have matched, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblocktu}{Source file \tcode{"a.h"}} +template struct S {}; +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#2} +#include "a.h" +template <> struct S { int oops; }; // \#1 +\end{codeblocktu} +\begin{codeblocktu}{Translation unit \#3} +#include "a.h" +S s; // IFNDR, \#1 is not reachable but would have matched +\end{codeblocktu} +\end{example} + +\ifndrdescription{temp.expl.spec.missing.definition} + +\pnum +If an explicit specialization of a template is +declared but there is no definition provided +for that specialization, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +template int f(T&&) { return 0; } +template <> int f(int&&); +int j = f(1); // IFNDR, odr-use of \tcode{f} with no definition +\end{codeblock} +\end{example} + +\ifndrdescription{temp.deduct.general.diff.order} + +\pnum +If substitution +into different declarations +of the same function template +would cause template instantiations to occur +in a different order or not at all, +the program is ill-formed; no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +template struct A { using X = typename T::X; }; +template typename T::X h(typename A::X); // \#1 +template auto h(typename A::X) -> typename T::X; // redeclaration \#2 +template void h(...) { } + +void x() { + h(0); // Substituting into \#1 forms an invalid type from \tcode{T::X} and does + // not attempt to instantiate \tcode{A}. + // Substituting into \#2 instantiates \tcode{A}, which is ill-formed. +} +\end{codeblock} +\end{example} + +\rSec1[ifndr.cpp]{\ref{cpp}: Preprocessing directives} + +\ifndrdescription{cpp.cond.defined.after.macro} + +\pnum +If the expansion of a macro produces the preprocessing token \tcode{defined} +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +#define A defined +#if A // IFNDR, \tcode{defined} is generated by macro replacement in controlling expression +#endif +\end{codeblock} +\end{example} + +\ifndrdescription{cpp.cond.defined.malformed} + +\pnum +If the \tcode{defined} unary operator is used when it +does not match +one of the specified grammatical forms, +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +#define A +#define B A) +#if defined ( B // IFNDR, unary operator \tcode{defined} did not match valid form before replacement +#endif +\end{codeblock} +\end{example} + +\ifndrdescription{cpp.include.malformed.headername} + +\pnum +If the \grammarterm{header-name-tokens} after +an \tcode{include} directive +cannot be formed into a \grammarterm{header-name} +(with imp\-lementation-defined treatment of whitespace), +the program is ill-formed, no diagnostic required. + +\pnum +\begin{example} +\begin{codeblock} +#include `` // IFNDR, does not match one of the two allowable forms +\end{codeblock} +\end{example} diff --git a/source/iostreams.tex b/source/iostreams.tex index 3320a770af..615ea941ed 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -4766,7 +4766,7 @@ } else if (numeric_limits::max() < lval) { state |= ios_base::failbit; val = numeric_limits::max(); -} else +} else val = static_cast(lval); \end{codeblock} \end{itemdescr} @@ -4790,7 +4790,7 @@ } else if (numeric_limits::max() < lval) { state |= ios_base::failbit; val = numeric_limits::max(); -} else +} else val = static_cast(lval); \end{codeblock} \end{itemdescr} diff --git a/source/lex.tex b/source/lex.tex index bfd55be51d..399c5df5b9 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -999,7 +999,7 @@ appearing as a \grammarterm{token} or \grammarterm{preprocessing-token} are reserved for use by \Cpp{} implementations and shall -not be used otherwise; no diagnostic is required. +not be used otherwise; no diagnostic is required \ifndrdef{lex.name.reserved}. \begin{itemize} \item Each identifier that contains a double underscore diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 24029adb67..99420d7c6d 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1624,9 +1624,9 @@ \ref{support.rtti} & Type identification & \tcode{} \\ \rowsep \ref{support.srcloc} & Source location & \tcode{} \\ \rowsep \ref{support.exception} & Exception handling & \tcode{} \\ \rowsep +\ref{support.contract} & Contract-violation handling & \tcode{} \\ \rowsep \ref{support.initlist} & Initializer lists & \tcode{} \\ \rowsep \ref{cmp} & Comparisons & \tcode{} \\ \rowsep -\ref{support.contract} & Contract-violation handling & \tcode{} \\ \rowsep \ref{support.coroutine} & Coroutines support & \tcode{} \\ \rowsep \ref{support.runtime} & Other runtime support & \tcode{} \\ \rowsep \ref{concepts} & Concepts library & \tcode{} \\ \rowsep @@ -3705,15 +3705,9 @@ the swappable with requirements\iref{swappable.requirements}. The exception for overloaded operators allows argument-dependent lookup in cases like that of -\tcode{ostream_iterator::operator=}\iref{ostream.iterator.ops}: - -\effects -\begin{codeblock} -*@\textit{out_stream}@ << value; -if (@\textit{delim}@ != 0) - *@\textit{out_stream}@ << @\textit{delim}@; -return *this; -\end{codeblock} +\tcode{ostream_iterator::operator=}\iref{ostream.iterator.ops} +where lookup for the expression \tcode{*out_stream << value} +includes the associated namespaces of \tcode{value}'s type. \end{note} \rSec3[member.functions]{Member functions} diff --git a/source/macros.tex b/source/macros.tex index 397ea0f2d1..4a7c866ba7 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -517,8 +517,8 @@ \newcommand{\libconceptx}[2]{\cname{#1}\indexconcept{\idxconcept{#2}}} \newcommand{\libconcept}[1]{\libconceptx{#1}{#1}} \newcommand{\deflibconcept}[1]{\cname{#1}\indexlibrary{\idxconcept{#1}}\indexconcept{\idxconcept{#1}|idxbfpage}} -\newcommand{\exposconcept}[1]{\ecname{#1}\indexconcept{\idxexposconcept{#1}}} \newcommand{\exposconceptx}[2]{\ecname{#1}\indexconcept{\idxexposconcept{#2}}} +\newcommand{\exposconcept}[1]{\exposconceptx{#1}{#1}} \newcommand{\exposconceptnc}[1]{\indexconcept{\idxexposconcept{#1}}\ecname{#1}\itcorr[-1]} % macro length: 15 \newcommand{\defexposconcept}[1]{\ecname{#1}\indexconcept{\idxexposconcept{#1}|idxbfpage}} % macro length: 16 \newcommand{\defexposconceptnc}[1]{\ecname{#1}\indexconcept{\idxexposconcept{#1}|idxbfpage}\itcorr[-1]} % macro length: 18 @@ -801,3 +801,45 @@ } \newcommand{\defncontext}[1]{\textlangle#1\textrangle} \newnoteenvironment{defnote}{Note \arabic{defnote} to entry}{end note} + +%%---------------------------------- +%% UB and IFNDR sections for annexes +%%---------------------------------- +%% Undefined behavior and ill-formed, no diagnostic required +% Use in main body of text to mark undefined behavior +\newcommand{\ubdef}[1]{\nolinebreak[3] (\label{ubx:#1}\ref{ub:#1})} + +% Use in Annex for sections describing each individual IFNDR +\newcommand{\ubdescription}[1]{% +\let\oldcontentsline\addcontentsline% +\let\addcontentsline\nocontentsline% +\ifcase\value{SectionDepth} + \let\s=\section + \or\let\s=\subsection + \or\let\s=\subsubsection + \or\let\s=\paragraph + \or\let\s=\subparagraph + \fi% +\s[#1]{\hfill[ub:#1]}\vspace{-.3\onelineskip}\label{ub:#1} % +\textbf{Specified in:}\space\ref{ubx:#1}% +\let\addcontentsline\oldcontentsline% +\vspace{-\parskip}% +} + +% Use in main body of text to mark IFNDR +\newcommand{\ifndrdef}[1]{\nolinebreak[3] (\label{ifndrx:#1}\ref{ifndr:#1})} +\newcommand{\ifndrdescription}[1]{% +\let\oldcontentsline\addcontentsline% +\let\addcontentsline\nocontentsline% +\ifcase\value{SectionDepth} + \let\s=\section + \or\let\s=\subsection + \or\let\s=\subsubsection + \or\let\s=\paragraph + \or\let\s=\subparagraph + \fi% +\s[#1]{\hfill[ifndr:#1]}\vspace{-.3\onelineskip}\label{ifndr:#1} % +\textbf{Specified in:}\space\ref{ifndrx:#1}% +\let\addcontentsline\oldcontentsline% +\vspace{-\parskip}% +} diff --git a/source/memory.tex b/source/memory.tex index be9812fa2d..eb593459ad 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -1057,7 +1057,7 @@ \pnum \mandates \tcode{T} is a complete type and -an implicit-lifetime\iref{basic.types} aggregate\iref{dcl.init.aggr}. +an implicit-lifetime\iref{basic.types} aggregate\iref{dcl.init.aggr} type. \pnum \effects @@ -8176,9 +8176,8 @@ The resulting object will hold a copy of \tcode{upstream}, but will not own the resource to which \tcode{upstream} points. \begin{note} -The intention is that calls to \tcode{upstream->allocate()} -will be substantially fewer than calls to \tcode{this->allocate()} -in most cases. +The intention is that in most cases there will be substantially fewer +calls to \tcode{upstream->allocate()} than to \tcode{this->allocate()}. \end{note} The behavior of the pooling mechanism is tuned according to the value of the \tcode{opts} argument. diff --git a/source/meta.tex b/source/meta.tex index 743d89ace5..09b71fa44e 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -3156,12 +3156,7 @@ \pnum \mandates -\tcode{CharT} is one of -\tcode{char}, -\tcode{wchar_t}, -\tcode{char8_t}, -\tcode{char16_t}, -\tcode{char32_t}. +\tcode{CharT} is a character type\iref{basic.fundamental}. \pnum Let $V$ be the pack of values of type \tcode{CharT} @@ -3913,7 +3908,7 @@ int x; int& y = x; -static_assert(^^x != ^^y); // OK, \tcode{r} and \tcode{y} are different variables so their +static_assert(^^x != ^^y); // OK, \tcode{r} and \tcode{y} are different variables, so their // reflections compare different static_assert(object_of(^^x) == object_of(^^y)); // OK, because \tcode{y} is a reference // to \tcode{x}, their underlying objects are the same @@ -3963,20 +3958,25 @@ static_assert(^^x != ^^y); // OK, \tcode{x} and \tcode{y} are different variables, // so their reflections compare different -static_assert(constant_of(^^x) == - constant_of(^^y)); // OK, both \tcode{constant_of(\reflexpr{x})} and - // \tcode{constant_of(\reflexpr{y})} represent the value \tcode{0} -static_assert(constant_of(^^x) == - reflect_constant(0)); // OK, likewise + +static_assert(constant_of(^^x) == // OK, both \tcode{constant_of(\reflexpr{x})} and + constant_of(^^y)); // \tcode{constant_of(\reflexpr{y})} represent the value \tcode{0} + +static_assert(constant_of(^^x) == // OK, likewise + reflect_constant(0)); struct S { int m; }; constexpr S s {42}; + static_assert(is_object(constant_of(^^s)) && is_object(reflect_object(s))); -static_assert(constant_of(^^s) != // OK, template parameter object that is template-argument- - reflect_object(s)); // equivalent to \tcode{s} is a different object than \tcode{s} + +static_assert(constant_of(^^s) != // OK, template parameter object that is + reflect_object(s)); // template-argument-equivalent to \tcode{s} + // is a different object than \tcode{s} + static_assert(constant_of(^^s) == - constant_of(reflect_object(s))); // OK + constant_of(reflect_object(s))); consteval info fn() { constexpr int x = 42; @@ -5210,14 +5210,14 @@ }; namespace NS { - static_assert(Agg{}.s == access_context::current().scope()); // OK - static_assert(Agg{}.eq()); // OK - static_assert(B(1).s == ^^B); // OK - static_assert(is_constructor(B{1, 2}.s) && parent_of(B{1, 2}.s) == ^^B); // OK - static_assert(is_constructor(C{1, 2}.s) && parent_of(C{1, 2}.s) == ^^B); // OK + static_assert(Agg{}.s == access_context::current().scope()); + static_assert(Agg{}.eq()); + static_assert(B(1).s == ^^B); + static_assert(is_constructor(B{1, 2}.s) && parent_of(B{1, 2}.s) == ^^B); + static_assert(is_constructor(C{1, 2}.s) && parent_of(C{1, 2}.s) == ^^B); auto fn() -> [:is_namespace(access_context::current().scope()) ? ^^int : ^^bool:]; - static_assert(type_of(^^fn) == ^^auto()->int); // OK + static_assert(type_of(^^fn) == ^^auto()->int); template struct TCls { @@ -5226,7 +5226,7 @@ return true; // OK, scope is \tcode{TCls}. } }; - static_assert(TCls<0>{}.fn()); // OK + static_assert(TCls<0>{}.fn()); } \end{codeblock} \end{example} @@ -5370,9 +5370,9 @@ static constexpr auto r = ^^mem; }; -static_assert(is_accessible(Cls::r, fn())); // OK -static_assert(!is_accessible(Cls::r, access_context::current())); // OK -static_assert(is_accessible(Cls::r, access_context::unchecked())); // OK +static_assert(is_accessible(Cls::r, fn())); +static_assert(!is_accessible(Cls::r, access_context::current())); +static_assert(is_accessible(Cls::r, access_context::unchecked())); \end{codeblock} \end{example} \end{itemdescr} @@ -5402,6 +5402,7 @@ \end{itemize} \end{itemdescr} +\indexlibraryglobal{has_inaccessible_bases}% \begin{itemdecl} consteval bool has_inaccessible_bases(info r, access_context ctx); \end{itemdecl} @@ -6241,13 +6242,14 @@ template auto fn1(); -static_assert(!can_substitute(^^fn1, {^^int})); // OK +static_assert(!can_substitute(^^fn1, {^^int})); constexpr info r1 = substitute(^^fn1, {^^int}); // error: \tcode{fn1} contains an undeduced // placeholder type for its return type template auto fn2() { - static_assert(^^T != ^^int); // static assertion failed during instantiation of \tcode{fn2} + static_assert(^^T != ^^int); // static assertion failed during + // instantiation of \tcode{fn2} return 0; } @@ -6262,8 +6264,8 @@ consteval info to_integral_constant(unsigned i) { return substitute(^^integral_constant, {^^unsigned, reflect_constant(i)}); } -constexpr info r = to_integral_constant(2); // OK, \tcode{r} represents the type - // \tcode{integral_constant} +constexpr info r = to_integral_constant(2); // OK, \tcode{r} represents the type + // \tcode{integral_constant} \end{codeblock} \end{example} \end{itemdescr} @@ -6329,9 +6331,9 @@ static_assert(is_object(r2)); static_assert(r2 == template_arguments_of(^^A)[0]); -constexpr info r3 = reflect_constant(K{nullptr}); // OK -constexpr info r4 = reflect_constant(K{"ebab"}); // error: constituent pointer - // points to string literal +constexpr info r3 = reflect_constant(K{nullptr}); +constexpr info r4 = reflect_constant(K{"ebab"}); // error: constituent pointer + // points to string literal \end{codeblock} \end{example} \end{itemdescr} diff --git a/source/modules.tex b/source/modules.tex index 4db5625672..9ecef29d77 100644 --- a/source/modules.tex +++ b/source/modules.tex @@ -39,7 +39,7 @@ consisting of \tcode{std} followed by zero or more \grammarterm{digit}{s} or containing a reserved identifier\iref{lex.name} are reserved and shall not be specified in a \grammarterm{module-declaration}; -no diagnostic is required. +no diagnostic is required\ifndrdef{module.unit.reserved.identifiers}. If any \grammarterm{identifier} in a reserved \grammarterm{module-name} is a reserved identifier, the module name is reserved for use by \Cpp{} implementations; @@ -54,7 +54,7 @@ A named module shall contain exactly one module interface unit with no \grammarterm{module-partition}, known as the \defn{primary module interface unit} of the module; -no diagnostic is required. +no diagnostic is required\ifndrdef{module.unit.named.module.no.partition}. \pnum A \defn{module partition} is @@ -66,7 +66,8 @@ that are module interface units shall be directly or indirectly exported by the primary module interface unit\iref{module.import}. -No diagnostic is required for a violation of these rules. +No diagnostic is required +for a violation of these rules\ifndrdef{module.unit.unexported.module.partition}. \begin{note} Module partitions can be imported only by other module units in the same module. @@ -810,7 +811,7 @@ in a primary module interface unit\iref{module.unit}. A module unit with a \grammarterm{private-module-fragment} shall be the only module unit of its module; -no diagnostic is required. +no diagnostic is required\ifndrdef{module.private.frag.other.module.units}. \pnum \begin{note} diff --git a/source/numerics.tex b/source/numerics.tex index f5f24c88e8..ae6be4760a 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -12630,7 +12630,7 @@ return out_vec.extent(0) == in_mat.extent(0) && in_mat.extent(1) == in_vec.extent(0); } -constexpr bool @\exposid{multipliable}@( // \expos +constexpr bool @\exposid{multipliable}@( // \expos const @\exposconcept{in-vector}@ auto& in_vec, const @\exposconcept{in-matrix}@ auto& in_mat, const @\exposconcept{in-vector}@ auto& out_vec) { return out_vec.extent(0) == in_mat.extent(1) && in_mat.extent(0) == in_vec.extent(0); } @@ -14994,7 +14994,7 @@ For the overloads without an \tcode{ExecutionPolicy} argument, equivalent to: \begin{codeblock} -matrix_rank_1_update(x, conjugated(y), A); +matrix_rank_1_update(x, conjugated(y), E, A); \end{codeblock} \item otherwise, equivalent to: @@ -15150,11 +15150,14 @@ \indexlibraryglobal{hermitian_matrix_rank_1_update}% \begin{itemdecl} -template<@\exposconcept{scalar}@ Scalar, @\exposconcept{possibly-packed-out-matrix}@ OutMat, class Triangle> - void hermitian_matrix_rank_1_update(InVec x, OutMat A, Triangle t); +template<@\exposconcept{scalar}@ Scalar, @\exposconcept{in-vector}@ InVec, @\exposconcept{in-matrix}@ InMat, @\exposconcept{possibly-packed-out-matrix}@ OutMat, + class Triangle> + void hermitian_matrix_rank_1_update(Scalar alpha, InVec x, InMat E, OutMat A, Triangle t); template - void hermitian_matrix_rank_1_update(ExecutionPolicy&& exec, InVec x, OutMat A, Triangle t); + @\exposconcept{scalar}@ Scalar, @\exposconcept{in-vector}@ InVec, @\exposconcept{in-matrix}@ InMat, @\exposconcept{possibly-packed-out-matrix}@ OutMat, + class Triangle> + void hermitian_matrix_rank_1_update(ExecutionPolicy&& exec, + Scalar alpha, InVec x, InMat E, OutMat A, Triangle t); \end{itemdecl} \begin{itemdescr} @@ -17305,59 +17308,62 @@ template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ comp_ellint_3(const V& k, const V& nu); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ comp_ellint_3(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ comp_ellint_3(const @\exposid{deduced-vec-t}@& k, const V& nu); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ comp_ellint_3(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ comp_ellint_3(const V& k, const @\exposid{deduced-vec-t}@& nu); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ cyl_bessel_i(const V& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_i(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ cyl_bessel_i(const @\exposid{deduced-vec-t}@& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_i(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ cyl_bessel_i(const V& nu, const @\exposid{deduced-vec-t}@& x); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ cyl_bessel_j(const V& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_j(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ cyl_bessel_j(const @\exposid{deduced-vec-t}@& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_j(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ cyl_bessel_j(const V& nu, const @\exposid{deduced-vec-t}@& x); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ cyl_bessel_k(const V& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_k(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ cyl_bessel_k(const @\exposid{deduced-vec-t}@& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_k(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ cyl_bessel_k(const V& nu, const @\exposid{deduced-vec-t}@& x); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ cyl_neumann(const V& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_neumann(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ cyl_neumann(const @\exposid{deduced-vec-t}@& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_neumann(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ cyl_neumann(const V& nu, const @\exposid{deduced-vec-t}@& x); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ ellint_1(const V& k, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_1(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ ellint_1(const @\exposid{deduced-vec-t}@& k, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_1(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ ellint_1(const V& k, const @\exposid{deduced-vec-t}@& phi); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ ellint_2(const V& k, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_2(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ ellint_2(const @\exposid{deduced-vec-t}@& k, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_2(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ ellint_2(const V& k, const @\exposid{deduced-vec-t}@& phi); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ ellint_3(const V& k, const V& nu, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& x, const V& y, const V& z); + @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& k, const V& nu, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const V& x, const @\exposid{deduced-vec-t}@& y, const V& z); + @\exposid{deduced-vec-t}@ ellint_3(const V& k, const @\exposid{deduced-vec-t}@& nu, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const V& x, const V& y, const @\exposid{deduced-vec-t}@& z); + @\exposid{deduced-vec-t}@ ellint_3(const V& k, const V& nu, const @\exposid{deduced-vec-t}@& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& x, const @\exposid{deduced-vec-t}@& y, const V& z); + @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& k, const @\exposid{deduced-vec-t}@& nu, + @\itcorr@ const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& x, const V& y, const @\exposid{deduced-vec-t}@& z); + @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& k, const V& nu, + @\itcorr@ const @\exposid{deduced-vec-t}@& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const V& x, const @\exposid{deduced-vec-t}@& y, const @\exposid{deduced-vec-t}@& z); + @\exposid{deduced-vec-t}@ ellint_3(const V& k, const @\exposid{deduced-vec-t}@& nu, + @\itcorr@ const @\exposid{deduced-vec-t}@& phi); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ expint(const V& x); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ hermite(const rebind_t>& n, const V& x); @@ -20289,59 +20295,59 @@ template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ comp_ellint_3(const V& k, const V& nu); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ comp_ellint_3(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ comp_ellint_3(const @\exposid{deduced-vec-t}@& k, const V& nu); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ comp_ellint_3(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ comp_ellint_3(const V& k, const @\exposid{deduced-vec-t}@& nu); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ cyl_bessel_i(const V& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_i(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ cyl_bessel_i(const @\exposid{deduced-vec-t}@& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_i(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ cyl_bessel_i(const V& nu, const @\exposid{deduced-vec-t}@& x); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ cyl_bessel_j(const V& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_j(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ cyl_bessel_j(const @\exposid{deduced-vec-t}@& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_j(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ cyl_bessel_j(const V& nu, const @\exposid{deduced-vec-t}@& x); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ cyl_bessel_k(const V& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_k(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ cyl_bessel_k(const @\exposid{deduced-vec-t}@& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_bessel_k(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ cyl_bessel_k(const V& nu, const @\exposid{deduced-vec-t}@& x); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ cyl_neumann(const V& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_neumann(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ cyl_neumann(const @\exposid{deduced-vec-t}@& nu, const V& x); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ cyl_neumann(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ cyl_neumann(const V& nu, const @\exposid{deduced-vec-t}@& x); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ ellint_1(const V& k, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_1(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ ellint_1(const @\exposid{deduced-vec-t}@& k, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_1(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ ellint_1(const V& k, const @\exposid{deduced-vec-t}@& phi); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ ellint_2(const V& k, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_2(const @\exposid{deduced-vec-t}@& x, const V& y); + @\exposid{deduced-vec-t}@ ellint_2(const @\exposid{deduced-vec-t}@& k, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_2(const V& x, const @\exposid{deduced-vec-t}@& y); + @\exposid{deduced-vec-t}@ ellint_2(const V& k, const @\exposid{deduced-vec-t}@& phi); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ ellint_3(const V& k, const V& nu, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& x, const V& y, const V& z); + @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& k, const V& nu, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const V& x, const @\exposid{deduced-vec-t}@& y, const V& z); + @\exposid{deduced-vec-t}@ ellint_3(const V& k, const @\exposid{deduced-vec-t}@& nu, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const V& x, const V& y, const @\exposid{deduced-vec-t}@& z); + @\exposid{deduced-vec-t}@ ellint_3(const V& k, const V& nu, const @\exposid{deduced-vec-t}@& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& x, const @\exposid{deduced-vec-t}@& y, const V& z); + @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& k, const @\exposid{deduced-vec-t}@& nu, const V& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& x, const V& y, const @\exposid{deduced-vec-t}@& z); + @\exposid{deduced-vec-t}@ ellint_3(const @\exposid{deduced-vec-t}@& k, const V& nu, const @\exposid{deduced-vec-t}@& phi); template<@\exposconcept{math-floating-point}@ V> - @\exposid{deduced-vec-t}@ ellint_3(const V& x, const @\exposid{deduced-vec-t}@& y, const @\exposid{deduced-vec-t}@& z); + @\exposid{deduced-vec-t}@ ellint_3(const V& k, const @\exposid{deduced-vec-t}@& nu, const @\exposid{deduced-vec-t}@& phi); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ expint(const V& x); template<@\exposconcept{math-floating-point}@ V> @\exposid{deduced-vec-t}@ riemann_zeta(const V& x); \end{itemdecl} diff --git a/source/overloading.tex b/source/overloading.tex index 52883f84dd..0a0bfbd5fb 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -4168,7 +4168,7 @@ The first form of \grammarterm{literal-operator-id} is deprecated\iref{depr.lit}. Some literal suffix identifiers are reserved for future standardization; see~\ref{usrlit.suffix}. A declaration whose \grammarterm{literal-operator-id} uses -such a literal suffix identifier is ill-formed, no diagnostic required. +such a literal suffix identifier is ill-formed, no diagnostic required\ifndrdef{over.literal.reserved}. \pnum A declaration whose \grammarterm{declarator-id} is a diff --git a/source/preprocessor.tex b/source/preprocessor.tex index 0bfb7f194f..c05a798b76 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -527,12 +527,12 @@ as a macro\iref{cpp.replace.general}, the program is ill-formed. If the preprocessing token \tcode{defined} -is generated as a result of this replacement process +is generated as a result of this replacement process\ifndrdef{cpp.cond.defined.after.macro} or use of the \tcode{defined} unary operator does not match one of the two specified forms prior to macro replacement, -the program is ill-formed, no diagnostic required. +the program is ill-formed, no diagnostic required\ifndrdef{cpp.cond.defined.malformed}. \pnum After all replacements due to macro expansion and @@ -757,7 +757,8 @@ is \impldef{treatment of whitespace when processing a \tcode{\#include} directive}. If the attempt succeeds, the directive with the so-formed \grammarterm{header-name} is processed as specified for the previous form. -Otherwise, the program is ill-formed, no diagnostic required. +Otherwise, the program is +ill-formed, no diagnostic required\ifndrdef{cpp.include.malformed.headername}. \begin{note} Adjacent \grammarterm{string-literal}s are not concatenated into a single \grammarterm{string-literal} diff --git a/source/statements.tex b/source/statements.tex index fa6944b172..3742c06e8a 100644 --- a/source/statements.tex +++ b/source/statements.tex @@ -1130,7 +1130,7 @@ equivalent to a \tcode{return} with no operand. Otherwise, flowing off the end of a function that is neither \tcode{main}\iref{basic.start.main} nor a coroutine\iref{dcl.fct.def.coroutine} -results in undefined behavior. +results in undefined behavior\ubdef{stmt.return.flow.off}. \pnum The copy-initialization of the result of the call is sequenced before the @@ -1226,7 +1226,7 @@ flowing off the end of a coroutine's \grammarterm{function-body} is equivalent to a \keyword{co_return} with no operand; otherwise flowing off the end of a coroutine's \grammarterm{function-body} -results in undefined behavior. +results in undefined behavior\ubdef{stmt.return.coroutine.flow.off}. \rSec2[stmt.goto]{The \keyword{goto} statement}% \indextext{statement!\idxcode{goto}} @@ -1366,7 +1366,7 @@ \end{note} If control re-enters the declaration recursively while -the variable is being initialized, the behavior is undefined. +the variable is being initialized, the behavior is undefined\ubdef{stmt.dcl.local.static.init.recursive}. \begin{example} \begin{codeblock} int foo(int i) { @@ -1458,7 +1458,7 @@ that a name in a template argument is bound to (part of) the declaration being parsed, the program is ill-formed. -No diagnostic is required. +No diagnostic is required\ifndrdef{stmt.ambig.bound.diff.parse}. \begin{example} \begin{codeblock} struct T1 { diff --git a/source/std.tex b/source/std.tex index ab1d082396..7180e68e55 100644 --- a/source/std.tex +++ b/source/std.tex @@ -166,6 +166,8 @@ \include{limits} \include{compatibility} \include{future} +\include{ub} +\include{ifndr} \include{uax31} %%-------------------------------------------------- diff --git a/source/strings.tex b/source/strings.tex index b8619c9b4b..1286a2364b 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -519,13 +519,20 @@ \rSec2[string.view.general]{General} \pnum -The class template \tcode{basic_string_view} describes an object that can refer to a constant contiguous sequence of char-like\iref{strings.general} objects with the first element of the sequence at position zero. -In the rest of \ref{string.view}, the type of the char-like objects held in a \tcode{basic_string_view} object is designated by \tcode{charT}. +The class template \tcode{basic_string_view} describes an object +that can refer to a constant contiguous sequence of char-like\iref{strings.general} objects +with the first element of the sequence at position zero. +In the rest of \ref{string.view}, the type of the char-like objects +held in a \tcode{basic_string_view} object is designated by \tcode{charT}. \pnum \begin{note} -The library provides implicit conversions from \tcode{const charT*} and \tcode{std::basic_string} to \tcode{std::basic_string_view} so that user code can accept just \tcode{std::basic_string_view} as a non-templated parameter wherever a sequence of characters is expected. -User-defined types can define their own implicit conversions to \tcode{std::basic_string_view} in order to interoperate with these functions. +The library provides implicit conversions from \tcode{const charT*} +and \tcode{std::basic_string} to \tcode{std::basic_string_view} +so that user code can accept just \tcode{std::basic_string_view} +as a non-templated parameter wherever a sequence of characters is expected. +User-defined types can define their own implicit conversions +to \tcode{std::basic_string_view} in order to interoperate with these functions. \end{note} \rSec2[string.view.synop]{Header \tcode{} synopsis} @@ -934,7 +941,8 @@ whose \tcode{value_type} is the template parameter \tcode{charT}. \pnum -All requirements on container iterators\iref{container.requirements} apply to \tcode{basic_string_view::const_iterator} as well. +All requirements on container iterators\iref{container.requirements} +apply to \tcode{basic_string_view::const_iterator} as well. \end{itemdescr} \indexlibrarymember{begin}{basic_string_view}% @@ -1017,7 +1025,8 @@ \begin{itemdescr} \pnum \returns -The largest possible number of char-like objects that can be referred to by a \tcode{basic_string_view}. +The largest possible number of char-like objects +that can be referred to by a \tcode{basic_string_view}. \end{itemdescr} \indexlibrarymember{empty}{basic_string_view}% @@ -1122,7 +1131,8 @@ \begin{note} Unlike \tcode{basic_string::data()} and \grammarterm{string-literal}s, \tcode{data()} can return a pointer to a buffer that is not null-terminated. -Therefore it is typically a mistake to pass \tcode{data()} to a function that takes just a \tcode{const charT*} and expects a null-terminated string. +Therefore it is typically a mistake to pass \tcode{data()} to a function +that takes just a \tcode{const charT*} and expects a null-terminated string. \end{note} \end{itemdescr} diff --git a/source/support.tex b/source/support.tex index e86cf14734..70028e6719 100644 --- a/source/support.tex +++ b/source/support.tex @@ -236,7 +236,7 @@ constexpr int abs(int j); // freestanding constexpr long int abs(long int j); // freestanding constexpr long long int abs(long long int j); // freestanding - constexpr @\placeholder{floating-point-type}@ abs(@\placeholder{floating-point-type}@ j); // freestanding-deleted + constexpr @\placeholder{floating-point-type}@ abs(@\placeholder{floating-point-type}@ j); // freestanding-deleted constexpr long int labs(long int j); // freestanding constexpr long long int llabs(long long int j); // freestanding diff --git a/source/templates.tex b/source/templates.tex index 369755465d..de6fd2c460 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -249,7 +249,7 @@ shall be reachable from the end of every definition domain\iref{basic.def.odr} in which it is implicitly instantiated\iref{temp.inst} unless the corresponding specialization is explicitly instantiated\iref{temp.explicit} -in some translation unit; no diagnostic is required. +in some translation unit; no diagnostic is required\ifndrdef{temp.pre.reach.def}. \rSec1[temp.param]{Template parameters} @@ -1514,7 +1514,7 @@ specialization based on the template template parameter is instantiated. If a specialization is not reachable from the point of instantiation, and it would have been selected had it been reachable, the program is ill-formed, -no diagnostic required. +no diagnostic required\ifndrdef{temp.arg.template.sat.constraints}. \begin{example} \begin{codeblock} template class A { // primary template @@ -1871,7 +1871,7 @@ if the validity or meaning of the program depends on whether two constructs are equivalent, and they are functionally equivalent but not equivalent, -the program is ill-formed, no diagnostic required. +the program is ill-formed, no diagnostic required\ifndrdef{temp.constr.atomic.equiv.but.not.equiv}. \begin{example} \begin{codeblock} template void f2() @@ -1902,7 +1902,7 @@ results in \tcode{true}. If, at different points in the program, the satisfaction result is different for identical atomic constraints and template arguments, -the program is ill-formed, no diagnostic required. +the program is ill-formed, no diagnostic required\ifndrdef{temp.constr.atomic.sat.result.diff}. \begin{example} \begin{codeblock} template concept C = @@ -2255,7 +2255,7 @@ after substituting in \tcode{E$_i$} the respective $i^\text{th}$ concept argument of each \tcode{P$_k$}. If any such substitution results in an invalid type or expression, - the program is ill-formed; no diagnostic is required. + the program is ill-formed; no diagnostic is required\ifndrdef{temp.constr.normal.invalid}. \item Otherwise, the normal form of \tcode{F} is @@ -3739,7 +3739,7 @@ that template. A partial specialization shall be reachable from any use of a template specialization that would make use of the partial specialization as the result of -an implicit or explicit instantiation; no diagnostic is required. +an implicit or explicit instantiation; no diagnostic is required\ifndrdef{temp.spec.partial.general.partial.reachable}. \pnum Two partial specialization declarations declare the same entity @@ -4349,7 +4349,7 @@ If the validity or meaning of the program depends on whether two constructs are equivalent, and they are functionally equivalent but not equivalent, the program is ill-formed, -no diagnostic required. +no diagnostic required\ifndrdef{temp.over.link.equiv.not.equiv}. Furthermore, if two declarations $A$ and $B$ of function templates \begin{itemize} \item @@ -4915,7 +4915,7 @@ introduced in a declaration that is reachable from the point of instantiation of a specialization\iref{temp.point} but is not found by lookup for the specialization, -the program is ill-formed, no diagnostic required. +the program is ill-formed, no diagnostic required\ifndrdef{temp.res.general.default.but.not.found}. \begin{bnf} \nontermdef{typename-specifier}\br @@ -6261,7 +6261,7 @@ translation units. If two different points of instantiation give a template specialization different meanings according to the one-definition rule\iref{basic.def.odr}, -the program is ill-formed, no diagnostic required. +the program is ill-formed, no diagnostic required\ifndrdef{temp.point.diff.pt.diff.meaning}. \pnum For the \grammarterm{compound-statement} @@ -6281,7 +6281,7 @@ introduced in the associated namespaces in all translation units, not just considering those declarations found in the template definition and template instantiation contexts\iref{basic.lookup.argdep}, -then the program is ill-formed, no diagnostic required. +then the program is ill-formed, no diagnostic required\ifndrdef{temp.dep.candidate.different.lookup.different}. \pnum \begin{example} @@ -6939,7 +6939,7 @@ There is an \impldef{maximum depth of recursive template instantiations} quantity that specifies the limit on the total depth of recursive instantiations\iref{implimits}, which could involve more than one template. -The result of an infinite recursion in instantiation is undefined. +The result of an infinite recursion in instantiation is undefined\ubdef{temp.inst.inf.recursion}. \begin{example} \begin{codeblock} template class X { @@ -7168,7 +7168,7 @@ in a way that would otherwise cause an implicit instantiation\iref{temp.inst} in the translation unit shall be the subject of an explicit instantiation definition somewhere in the -program; otherwise the program is ill-formed, no diagnostic required. +program; otherwise the program is ill-formed, no diagnostic required\ifndrdef{temp.explicit.decl.implicit.inst}. \begin{note} This rule does apply to inline functions even though an explicit instantiation declaration of such an entity has no other normative @@ -7370,11 +7370,11 @@ every use of that specialization that would cause an implicit instantiation to take place, in every translation unit in which such a use occurs; -no diagnostic is required. +no diagnostic is required\ifndrdef{temp.expl.spec.unreachable.declaration}. If the program does not provide a definition for an explicit specialization and either the specialization is used in a way that would cause an implicit instantiation to take place or the member is a virtual member function, -the program is ill-formed, no diagnostic required. +the program is ill-formed, no diagnostic required\ifndrdef{temp.expl.spec.missing.definition}. An implicit instantiation is never generated for an explicit specialization that is declared but not defined. \begin{example} @@ -8011,7 +8011,7 @@ a condition that causes deduction to fail is encountered. If substitution into different declarations of the same function template would cause template instantiations to occur in a different order or not at all, -the program is ill-formed; no diagnostic required. +the program is ill-formed; no diagnostic required\ifndrdef{temp.deduct.general.diff.order}. \begin{note} The equivalent substitution in exception specifications\iref{except.spec} diff --git a/source/text.tex b/source/text.tex index 8c08f20295..549d6f32e0 100644 --- a/source/text.tex +++ b/source/text.tex @@ -10,8 +10,8 @@ \begin{libsumtab}{Text library summary}{text.summary} \ref{charconv} & Primitive numeric conversions & \tcode{} \\ \rowsep \ref{localization} & Localization library & \tcode{}, \tcode{} \\ \rowsep -\ref{format} & Formatting & \tcode{} \\ \rowsep \ref{text.encoding} & Text encodings identification & \tcode{} \\ \rowsep +\ref{format} & Formatting & \tcode{} \\ \rowsep \ref{re} & Regular expressions library & \tcode{} \\ \rowsep \ref{text.c.strings} & Null-terminated sequence utilities & \tcode{}, \tcode{}, \tcode{}, \tcode{}, \tcode{} \\ @@ -1354,44 +1354,44 @@ \begin{codeblock} namespace std { template - class ctype : public locale::facet, public ctype_base { - public: - using @\libmember{char_type}{ctype}@ = charT; + class ctype : public locale::facet, public ctype_base { + public: + using @\libmember{char_type}{ctype}@ = charT; - explicit ctype(size_t refs = 0); + explicit ctype(size_t refs = 0); - bool is(mask m, charT c) const; - const charT* is(const charT* low, const charT* high, mask* vec) const; - const charT* scan_is(mask m, const charT* low, const charT* high) const; - const charT* scan_not(mask m, const charT* low, const charT* high) const; - charT toupper(charT c) const; - const charT* toupper(charT* low, const charT* high) const; - charT tolower(charT c) const; - const charT* tolower(charT* low, const charT* high) const; + bool is(mask m, charT c) const; + const charT* is(const charT* low, const charT* high, mask* vec) const; + const charT* scan_is(mask m, const charT* low, const charT* high) const; + const charT* scan_not(mask m, const charT* low, const charT* high) const; + charT toupper(charT c) const; + const charT* toupper(charT* low, const charT* high) const; + charT tolower(charT c) const; + const charT* tolower(charT* low, const charT* high) const; - charT widen(char c) const; - const char* widen(const char* low, const char* high, charT* to) const; - char narrow(charT c, char dfault) const; - const charT* narrow(const charT* low, const charT* high, char dfault, char* to) const; + charT widen(char c) const; + const char* widen(const char* low, const char* high, charT* to) const; + char narrow(charT c, char dfault) const; + const charT* narrow(const charT* low, const charT* high, char dfault, char* to) const; - static locale::id @\libmember{id}{ctype}@; + static locale::id @\libmember{id}{ctype}@; - protected: - ~ctype(); - virtual bool do_is(mask m, charT c) const; - virtual const charT* do_is(const charT* low, const charT* high, mask* vec) const; - virtual const charT* do_scan_is(mask m, const charT* low, const charT* high) const; - virtual const charT* do_scan_not(mask m, const charT* low, const charT* high) const; - virtual charT do_toupper(charT) const; - virtual const charT* do_toupper(charT* low, const charT* high) const; - virtual charT do_tolower(charT) const; - virtual const charT* do_tolower(charT* low, const charT* high) const; - virtual charT do_widen(char) const; - virtual const char* do_widen(const char* low, const char* high, charT* dest) const; - virtual char do_narrow(charT, char dfault) const; - virtual const charT* do_narrow(const charT* low, const charT* high, - char dfault, char* dest) const; - }; + protected: + ~ctype(); + virtual bool do_is(mask m, charT c) const; + virtual const charT* do_is(const charT* low, const charT* high, mask* vec) const; + virtual const charT* do_scan_is(mask m, const charT* low, const charT* high) const; + virtual const charT* do_scan_not(mask m, const charT* low, const charT* high) const; + virtual charT do_toupper(charT) const; + virtual const charT* do_toupper(charT* low, const charT* high) const; + virtual charT do_tolower(charT) const; + virtual const charT* do_tolower(charT* low, const charT* high) const; + virtual charT do_widen(char) const; + virtual const char* do_widen(const char* low, const char* high, charT* dest) const; + virtual char do_narrow(charT, char dfault) const; + virtual const charT* do_narrow(const charT* low, const charT* high, + char dfault, char* dest) const; + }; } \end{codeblock} @@ -1685,15 +1685,15 @@ \begin{codeblock} namespace std { template - class ctype_byname : public ctype { - public: - using @\libmember{mask}{ctype_byname}@ = ctype::mask; - explicit ctype_byname(const char*, size_t refs = 0); - explicit ctype_byname(const string&, size_t refs = 0); + class ctype_byname : public ctype { + public: + using @\libmember{mask}{ctype_byname}@ = ctype::mask; + explicit ctype_byname(const char*, size_t refs = 0); + explicit ctype_byname(const string&, size_t refs = 0); - protected: - ~ctype_byname(); - }; + protected: + ~ctype_byname(); + }; } \end{codeblock} @@ -1705,46 +1705,46 @@ \begin{codeblock} namespace std { template<> - class ctype : public locale::facet, public ctype_base { - public: - using @\libmember{char_type}{ctype}@ = char; + class ctype : public locale::facet, public ctype_base { + public: + using @\libmember{char_type}{ctype}@ = char; - explicit ctype(const mask* tab = nullptr, bool del = false, size_t refs = 0); + explicit ctype(const mask* tab = nullptr, bool del = false, size_t refs = 0); - bool is(mask m, char c) const; - const char* is(const char* low, const char* high, mask* vec) const; - const char* scan_is (mask m, const char* low, const char* high) const; - const char* scan_not(mask m, const char* low, const char* high) const; + bool is(mask m, char c) const; + const char* is(const char* low, const char* high, mask* vec) const; + const char* scan_is (mask m, const char* low, const char* high) const; + const char* scan_not(mask m, const char* low, const char* high) const; - char toupper(char c) const; - const char* toupper(char* low, const char* high) const; - char tolower(char c) const; - const char* tolower(char* low, const char* high) const; + char toupper(char c) const; + const char* toupper(char* low, const char* high) const; + char tolower(char c) const; + const char* tolower(char* low, const char* high) const; - char widen(char c) const; - const char* widen(const char* low, const char* high, char* to) const; - char narrow(char c, char dfault) const; - const char* narrow(const char* low, const char* high, char dfault, char* to) const; + char widen(char c) const; + const char* widen(const char* low, const char* high, char* to) const; + char narrow(char c, char dfault) const; + const char* narrow(const char* low, const char* high, char dfault, char* to) const; - static locale::id @\libmember{id}{ctype}@; - static const size_t @\libmember{table_size}{ctype}@ = @\impdef@; + static locale::id @\libmember{id}{ctype}@; + static const size_t @\libmember{table_size}{ctype}@ = @\impdef@; - const mask* table() const noexcept; - static const mask* classic_table() noexcept; + const mask* table() const noexcept; + static const mask* classic_table() noexcept; - protected: - ~ctype(); - virtual char do_toupper(char c) const; - virtual const char* do_toupper(char* low, const char* high) const; - virtual char do_tolower(char c) const; - virtual const char* do_tolower(char* low, const char* high) const; - - virtual char do_widen(char c) const; - virtual const char* do_widen(const char* low, const char* high, char* to) const; - virtual char do_narrow(char c, char dfault) const; - virtual const char* do_narrow(const char* low, const char* high, - char dfault, char* to) const; - }; + protected: + ~ctype(); + virtual char do_toupper(char c) const; + virtual const char* do_toupper(char* low, const char* high) const; + virtual char do_tolower(char c) const; + virtual const char* do_tolower(char* low, const char* high) const; + + virtual char do_widen(char c) const; + virtual const char* do_widen(const char* low, const char* high, char* to) const; + virtual char do_narrow(char c, char dfault) const; + virtual const char* do_narrow(const char* low, const char* high, + char dfault, char* to) const; + }; } \end{codeblock} @@ -1967,54 +1967,54 @@ }; template - class codecvt : public locale::facet, public codecvt_base { - public: - using @\libmember{intern_type}{codecvt}@ = internT; - using @\libmember{extern_type}{codecvt}@ = externT; - using @\libmember{state_type}{codecvt}@ = stateT; + class codecvt : public locale::facet, public codecvt_base { + public: + using @\libmember{intern_type}{codecvt}@ = internT; + using @\libmember{extern_type}{codecvt}@ = externT; + using @\libmember{state_type}{codecvt}@ = stateT; - explicit codecvt(size_t refs = 0); + explicit codecvt(size_t refs = 0); - result out( - stateT& state, - const internT* from, const internT* from_end, const internT*& from_next, - externT* to, externT* to_end, externT*& to_next) const; + result out( + stateT& state, + const internT* from, const internT* from_end, const internT*& from_next, + externT* to, externT* to_end, externT*& to_next) const; - result unshift( - stateT& state, - externT* to, externT* to_end, externT*& to_next) const; + result unshift( + stateT& state, + externT* to, externT* to_end, externT*& to_next) const; - result in( - stateT& state, - const externT* from, const externT* from_end, const externT*& from_next, - internT* to, internT* to_end, internT*& to_next) const; + result in( + stateT& state, + const externT* from, const externT* from_end, const externT*& from_next, + internT* to, internT* to_end, internT*& to_next) const; - int encoding() const noexcept; - bool always_noconv() const noexcept; - int length(stateT&, const externT* from, const externT* end, size_t max) const; - int max_length() const noexcept; + int encoding() const noexcept; + bool always_noconv() const noexcept; + int length(stateT&, const externT* from, const externT* end, size_t max) const; + int max_length() const noexcept; - static locale::id @\libmember{id}{codecvt}@; + static locale::id @\libmember{id}{codecvt}@; - protected: - ~codecvt(); - virtual result do_out( - stateT& state, - const internT* from, const internT* from_end, const internT*& from_next, - externT* to, externT* to_end, externT*& to_next) const; - virtual result do_in( - stateT& state, - const externT* from, const externT* from_end, const externT*& from_next, - internT* to, internT* to_end, internT*& to_next) const; - virtual result do_unshift( - stateT& state, - externT* to, externT* to_end, externT*& to_next) const; - - virtual int do_encoding() const noexcept; - virtual bool do_always_noconv() const noexcept; - virtual int do_length(stateT&, const externT* from, const externT* end, size_t max) const; - virtual int do_max_length() const noexcept; - }; + protected: + ~codecvt(); + virtual result do_out( + stateT& state, + const internT* from, const internT* from_end, const internT*& from_next, + externT* to, externT* to_end, externT*& to_next) const; + virtual result do_in( + stateT& state, + const externT* from, const externT* from_end, const externT*& from_next, + internT* to, internT* to_end, internT*& to_next) const; + virtual result do_unshift( + stateT& state, + externT* to, externT* to_end, externT*& to_next) const; + + virtual int do_encoding() const noexcept; + virtual bool do_always_noconv() const noexcept; + virtual int do_length(stateT&, const externT* from, const externT* end, size_t max) const; + virtual int do_max_length() const noexcept; + }; } \end{codeblock} @@ -2373,14 +2373,14 @@ \begin{codeblock} namespace std { template - class codecvt_byname : public codecvt { - public: - explicit codecvt_byname(const char*, size_t refs = 0); - explicit codecvt_byname(const string&, size_t refs = 0); + class codecvt_byname : public codecvt { + public: + explicit codecvt_byname(const char*, size_t refs = 0); + explicit codecvt_byname(const string&, size_t refs = 0); - protected: - ~codecvt_byname(); - }; + protected: + ~codecvt_byname(); + }; } \end{codeblock} @@ -2431,63 +2431,63 @@ \begin{codeblock} namespace std { template> - class num_get : public locale::facet { - public: - using @\libmember{char_type}{num_get}@ = charT; - using @\libmember{iter_type}{num_get}@ = InputIterator; - - explicit num_get(size_t refs = 0); - - iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, bool& v) const; - iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, long& v) const; - iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, long long& v) const; - iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, unsigned short& v) const; - iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, unsigned int& v) const; - iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, unsigned long& v) const; - iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, unsigned long long& v) const; - iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, float& v) const; - iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, double& v) const; - iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, long double& v) const; - iter_type get(iter_type in, iter_type end, ios_base&, - ios_base::iostate& err, void*& v) const; - - static locale::id @\libmember{id}{num_get}@; + class num_get : public locale::facet { + public: + using @\libmember{char_type}{num_get}@ = charT; + using @\libmember{iter_type}{num_get}@ = InputIterator; + + explicit num_get(size_t refs = 0); + + iter_type get(iter_type in, iter_type end, ios_base&, + ios_base::iostate& err, bool& v) const; + iter_type get(iter_type in, iter_type end, ios_base&, + ios_base::iostate& err, long& v) const; + iter_type get(iter_type in, iter_type end, ios_base&, + ios_base::iostate& err, long long& v) const; + iter_type get(iter_type in, iter_type end, ios_base&, + ios_base::iostate& err, unsigned short& v) const; + iter_type get(iter_type in, iter_type end, ios_base&, + ios_base::iostate& err, unsigned int& v) const; + iter_type get(iter_type in, iter_type end, ios_base&, + ios_base::iostate& err, unsigned long& v) const; + iter_type get(iter_type in, iter_type end, ios_base&, + ios_base::iostate& err, unsigned long long& v) const; + iter_type get(iter_type in, iter_type end, ios_base&, + ios_base::iostate& err, float& v) const; + iter_type get(iter_type in, iter_type end, ios_base&, + ios_base::iostate& err, double& v) const; + iter_type get(iter_type in, iter_type end, ios_base&, + ios_base::iostate& err, long double& v) const; + iter_type get(iter_type in, iter_type end, ios_base&, + ios_base::iostate& err, void*& v) const; + + static locale::id @\libmember{id}{num_get}@; - protected: - ~num_get(); - virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, bool& v) const; - virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, long& v) const; - virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, long long& v) const; - virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, unsigned short& v) const; - virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, unsigned int& v) const; - virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, unsigned long& v) const; - virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, unsigned long long& v) const; - virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, float& v) const; - virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, double& v) const; - virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, long double& v) const; - virtual iter_type do_get(iter_type, iter_type, ios_base&, - ios_base::iostate& err, void*& v) const; - }; + protected: + ~num_get(); + virtual iter_type do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& err, bool& v) const; + virtual iter_type do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& err, long& v) const; + virtual iter_type do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& err, long long& v) const; + virtual iter_type do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& err, unsigned short& v) const; + virtual iter_type do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& err, unsigned int& v) const; + virtual iter_type do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& err, unsigned long& v) const; + virtual iter_type do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& err, unsigned long long& v) const; + virtual iter_type do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& err, float& v) const; + virtual iter_type do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& err, double& v) const; + virtual iter_type do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& err, long double& v) const; + virtual iter_type do_get(iter_type, iter_type, ios_base&, + ios_base::iostate& err, void*& v) const; + }; } \end{codeblock} @@ -2810,35 +2810,35 @@ \begin{codeblock} namespace std { template> - class num_put : public locale::facet { - public: - using @\libmember{char_type}{num_put}@ = charT; - using @\libmember{iter_type}{num_put}@ = OutputIterator; + class num_put : public locale::facet { + public: + using @\libmember{char_type}{num_put}@ = charT; + using @\libmember{iter_type}{num_put}@ = OutputIterator; - explicit num_put(size_t refs = 0); + explicit num_put(size_t refs = 0); - iter_type put(iter_type s, ios_base& f, char_type fill, bool v) const; - iter_type put(iter_type s, ios_base& f, char_type fill, long v) const; - iter_type put(iter_type s, ios_base& f, char_type fill, long long v) const; - iter_type put(iter_type s, ios_base& f, char_type fill, unsigned long v) const; - iter_type put(iter_type s, ios_base& f, char_type fill, unsigned long long v) const; - iter_type put(iter_type s, ios_base& f, char_type fill, double v) const; - iter_type put(iter_type s, ios_base& f, char_type fill, long double v) const; - iter_type put(iter_type s, ios_base& f, char_type fill, const void* v) const; + iter_type put(iter_type s, ios_base& f, char_type fill, bool v) const; + iter_type put(iter_type s, ios_base& f, char_type fill, long v) const; + iter_type put(iter_type s, ios_base& f, char_type fill, long long v) const; + iter_type put(iter_type s, ios_base& f, char_type fill, unsigned long v) const; + iter_type put(iter_type s, ios_base& f, char_type fill, unsigned long long v) const; + iter_type put(iter_type s, ios_base& f, char_type fill, double v) const; + iter_type put(iter_type s, ios_base& f, char_type fill, long double v) const; + iter_type put(iter_type s, ios_base& f, char_type fill, const void* v) const; - static locale::id @\libmember{id}{num_put}@; + static locale::id @\libmember{id}{num_put}@; - protected: - ~num_put(); - virtual iter_type do_put(iter_type, ios_base&, char_type fill, bool v) const; - virtual iter_type do_put(iter_type, ios_base&, char_type fill, long v) const; - virtual iter_type do_put(iter_type, ios_base&, char_type fill, long long v) const; - virtual iter_type do_put(iter_type, ios_base&, char_type fill, unsigned long) const; - virtual iter_type do_put(iter_type, ios_base&, char_type fill, unsigned long long) const; - virtual iter_type do_put(iter_type, ios_base&, char_type fill, double v) const; - virtual iter_type do_put(iter_type, ios_base&, char_type fill, long double v) const; - virtual iter_type do_put(iter_type, ios_base&, char_type fill, const void* v) const; - }; + protected: + ~num_put(); + virtual iter_type do_put(iter_type, ios_base&, char_type fill, bool v) const; + virtual iter_type do_put(iter_type, ios_base&, char_type fill, long v) const; + virtual iter_type do_put(iter_type, ios_base&, char_type fill, long long v) const; + virtual iter_type do_put(iter_type, ios_base&, char_type fill, unsigned long) const; + virtual iter_type do_put(iter_type, ios_base&, char_type fill, unsigned long long) const; + virtual iter_type do_put(iter_type, ios_base&, char_type fill, double v) const; + virtual iter_type do_put(iter_type, ios_base&, char_type fill, long double v) const; + virtual iter_type do_put(iter_type, ios_base&, char_type fill, const void* v) const; + }; } \end{codeblock} @@ -3112,29 +3112,29 @@ \begin{codeblock} namespace std { template - class numpunct : public locale::facet { - public: - using @\libmember{char_type}{numpunct}@ = charT; - using @\libmember{string_type}{numpunct}@ = basic_string; + class numpunct : public locale::facet { + public: + using @\libmember{char_type}{numpunct}@ = charT; + using @\libmember{string_type}{numpunct}@ = basic_string; - explicit numpunct(size_t refs = 0); + explicit numpunct(size_t refs = 0); - char_type decimal_point() const; - char_type thousands_sep() const; - string grouping() const; - string_type truename() const; - string_type falsename() const; + char_type decimal_point() const; + char_type thousands_sep() const; + string grouping() const; + string_type truename() const; + string_type falsename() const; - static locale::id @\libmember{id}{numpunct}@; + static locale::id @\libmember{id}{numpunct}@; - protected: - ~numpunct(); // virtual - virtual char_type do_decimal_point() const; - virtual char_type do_thousands_sep() const; - virtual string do_grouping() const; - virtual string_type do_truename() const; // for \tcode{bool} - virtual string_type do_falsename() const; // for \tcode{bool} - }; + protected: + ~numpunct(); // virtual + virtual char_type do_decimal_point() const; + virtual char_type do_thousands_sep() const; + virtual string do_grouping() const; + virtual string_type do_truename() const; // for \tcode{bool} + virtual string_type do_falsename() const; // for \tcode{bool} + }; } \end{codeblock} @@ -3333,18 +3333,18 @@ \begin{codeblock} namespace std { template - class numpunct_byname : public numpunct { - // this class is specialized for \tcode{char} and \keyword{wchar_t}. - public: - using @\libmember{char_type}{numpunct_byname}@ = charT; - using @\libmember{string_type}{numpunct_byname}@ = basic_string; + class numpunct_byname : public numpunct { + // this class is specialized for \tcode{char} and \keyword{wchar_t}. + public: + using @\libmember{char_type}{numpunct_byname}@ = charT; + using @\libmember{string_type}{numpunct_byname}@ = basic_string; - explicit numpunct_byname(const char*, size_t refs = 0); - explicit numpunct_byname(const string&, size_t refs = 0); + explicit numpunct_byname(const char*, size_t refs = 0); + explicit numpunct_byname(const string&, size_t refs = 0); - protected: - ~numpunct_byname(); - }; + protected: + ~numpunct_byname(); + }; } \end{codeblock} @@ -3358,27 +3358,27 @@ \begin{codeblock} namespace std { template - class collate : public locale::facet { - public: - using @\libmember{char_type}{collate}@ = charT; - using @\libmember{string_type}{collate}@ = basic_string; + class collate : public locale::facet { + public: + using @\libmember{char_type}{collate}@ = charT; + using @\libmember{string_type}{collate}@ = basic_string; - explicit collate(size_t refs = 0); + explicit collate(size_t refs = 0); - int compare(const charT* low1, const charT* high1, - const charT* low2, const charT* high2) const; - string_type transform(const charT* low, const charT* high) const; - long hash(const charT* low, const charT* high) const; + int compare(const charT* low1, const charT* high1, + const charT* low2, const charT* high2) const; + string_type transform(const charT* low, const charT* high) const; + long hash(const charT* low, const charT* high) const; - static locale::id @\libmember{id}{collate}@; + static locale::id @\libmember{id}{collate}@; - protected: - ~collate(); - virtual int do_compare(const charT* low1, const charT* high1, - const charT* low2, const charT* high2) const; - virtual string_type do_transform(const charT* low, const charT* high) const; - virtual long do_hash (const charT* low, const charT* high) const; - }; + protected: + ~collate(); + virtual int do_compare(const charT* low1, const charT* high1, + const charT* low2, const charT* high2) const; + virtual string_type do_transform(const charT* low, const charT* high) const; + virtual long do_hash (const charT* low, const charT* high) const; + }; } \end{codeblock} @@ -7880,7 +7880,7 @@ \indexlibraryglobal{format_kind} \begin{itemdecl} template - requires @\libconcept{same_as}@> + requires @\libconcept{same_as}@> constexpr range_format format_kind = @\seebelow@; \end{itemdecl} diff --git a/source/threads.tex b/source/threads.tex index a0d0f8559d..b3a041cf6f 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -3988,7 +3988,7 @@ \indexlibrarymember{fetch_min}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} constexpr value_type fetch_@\placeholdernc{key}@(value_type operand, - memory_order order = memory_order::seq_cst) const noexcept; + memory_order order = memory_order::seq_cst) const noexcept; \end{itemdecl} \begin{itemdescr} @@ -4067,7 +4067,7 @@ \indexlibrarymember{store_fmaximum_num}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} constexpr void store_@\placeholdernc{key}@(value_type operand, - memory_order order = memory_order::seq_cst) const noexcept; + memory_order order = memory_order::seq_cst) const noexcept; \end{itemdecl} \begin{itemdescr} @@ -11228,7 +11228,7 @@ \end{note} \pnum -The enum values of \tcode{future_errc} are distinct and not zero. +The enumerator values of \tcode{future_errc} are distinct and not zero. \rSec2[futures.errors]{Error handling} diff --git a/source/time.tex b/source/time.tex index a29b08edf7..dcbcd38598 100644 --- a/source/time.tex +++ b/source/time.tex @@ -800,9 +800,9 @@ strong_ordering operator<=>(const time_zone_link& x, const time_zone_link& y); // \ref{time.format}, formatting - template struct @\placeholder{local-time-format-t}@; // \expos + template struct @\exposid{local-time-format-t}@; // \expos template - @\placeholder{local-time-format-t}@ + @\exposid{local-time-format-t}@ local_time_format(local_time time, const string* abbrev = nullptr, const seconds* offset_sec = nullptr); } @@ -823,7 +823,7 @@ template struct formatter, charT>; template - struct formatter, charT>; + struct formatter, charT>; template struct formatter; template struct formatter; template struct formatter; @@ -1081,12 +1081,12 @@ \indexlibraryglobal{duration_values}% \begin{itemdecl} template - struct duration_values { - public: - static constexpr Rep zero() noexcept; - static constexpr Rep min() noexcept; - static constexpr Rep max() noexcept; - }; +struct duration_values { +public: + static constexpr Rep zero() noexcept; + static constexpr Rep min() noexcept; + static constexpr Rep max() noexcept; +}; \end{itemdecl} \pnum @@ -1245,7 +1245,7 @@ using period = Period::type; private: - rep rep_; // \expos + rep @\exposid{rep_}@; // \expos public: // \ref{time.duration.cons}, construct/copy/destroy @@ -1304,7 +1304,7 @@ \pnum The defaulted copy constructor of \tcode{duration} shall be a constexpr function if and only if the required initialization -of the member \tcode{rep_} for copy and move, respectively, would +of the member \exposid{rep_} for copy and move, respectively, would be constexpr-suitable\iref{dcl.constexpr}. \pnum @@ -1342,7 +1342,7 @@ \pnum \effects -Initializes \tcode{rep_} with \tcode{r}. +Initializes \exposid{rep_} with \tcode{r}. \end{itemdescr} \indexlibraryctor{duration}% @@ -1378,7 +1378,7 @@ \pnum \effects -Initializes \tcode{rep_} with \tcode{duration_cast(d).count()}. +Initializes \exposid{rep_} with \tcode{duration_cast(d).count()}. \end{itemdescr} \rSec2[time.duration.observer]{Observer} @@ -1391,7 +1391,7 @@ \begin{itemdescr} \pnum \returns -\tcode{rep_}. +\exposid{rep_}. \end{itemdescr} \rSec2[time.duration.arithmetic]{Arithmetic} @@ -1415,7 +1415,7 @@ \begin{itemdescr} \pnum \returns -\tcode{common_type_t(-rep_)}. +\tcode{common_type_t(-\exposid{rep_})}. \end{itemdescr} \indexlibrarymember{operator++}{duration}% @@ -1426,7 +1426,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{++rep_}. +Equivalent to: \tcode{++\exposid{rep_}}. \pnum \returns @@ -1441,7 +1441,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return duration(rep_++);} +Equivalent to: \tcode{return duration(\exposid{rep_}++);} \end{itemdescr} \indexlibrarymember{operator--}{duration}% @@ -1452,7 +1452,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{--rep_}. +Equivalent to: \tcode{--\exposid{rep_}}. \pnum \returns @@ -1467,7 +1467,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return duration(rep_-{}-);} +Equivalent to: \tcode{return duration(\exposid{rep_}-{}-);} \end{itemdescr} \indexlibrarymember{operator+=}{duration}% @@ -1478,7 +1478,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{rep_ += d.count()}. +Equivalent to: \tcode{\exposid{rep_} += d.count()}. \pnum \returns @@ -1493,7 +1493,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{rep_ -= d.count()}. +Equivalent to: \tcode{\exposid{rep_} -= d.count()}. \pnum \returns @@ -1508,7 +1508,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{rep_ *= rhs}. +Equivalent to: \tcode{\exposid{rep_} *= rhs}. \pnum \returns @@ -1523,7 +1523,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{rep_ /= rhs}. +Equivalent to: \tcode{\exposid{rep_} /= rhs}. \pnum \returns @@ -1538,7 +1538,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{rep_ \%= rhs}. +Equivalent to: \tcode{\exposid{rep_} \%= rhs}. \pnum \returns @@ -1553,7 +1553,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{rep_ \%= rhs.count()}. +Equivalent to: \tcode{\exposid{rep_} \%= rhs.count()}. \pnum \returns @@ -2225,7 +2225,7 @@ using period = duration::period; private: - duration d_; // \expos + duration @\exposid{d_}@; // \expos public: // \ref{time.point.cons}, construct @@ -2266,7 +2266,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{d_} with \tcode{duration::zero()}. +Initializes \exposid{d_} with \tcode{duration::zero()}. Such a \tcode{time_point} object represents the epoch. \end{itemdescr} @@ -2278,7 +2278,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{d_} with \tcode{d}. +Initializes \exposid{d_} with \tcode{d}. Such a \tcode{time_point} object represents the epoch \tcode{+ d}. \end{itemdescr} @@ -2295,7 +2295,7 @@ \pnum \effects -Initializes \tcode{d_} with \tcode{t.time_since_epoch()}. +Initializes \exposid{d_} with \tcode{t.time_since_epoch()}. \end{itemdescr} \rSec2[time.point.observer]{Observer} @@ -2308,7 +2308,7 @@ \begin{itemdescr} \pnum \returns -\tcode{d_}. +\exposid{d_}. \end{itemdescr} \rSec2[time.point.arithmetic]{Arithmetic} @@ -2321,7 +2321,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{++d_}. +Equivalent to: \tcode{++\exposid{d_}}. \pnum \returns @@ -2336,7 +2336,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return time_point\{d_++\};} +Equivalent to: \tcode{return time_point\{\exposid{d_}++\};} \end{itemdescr} \indexlibrarymember{operator--}{time_point}% @@ -2347,7 +2347,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{--d_}. +Equivalent to: \tcode{--\exposid{d_}}. \pnum \returns @@ -2362,7 +2362,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return time_point\{d_-{}-\};} +Equivalent to: \tcode{return time_point\{\exposid{d_}-{}-\};} \end{itemdescr} \indexlibrarymember{operator+=}{time_point}% @@ -2373,7 +2373,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{d_ += d}. +Equivalent to: \tcode{\exposid{d_} += d}. \pnum \returns @@ -2388,7 +2388,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{d_ -= d}. +Equivalent to: \tcode{\exposid{d_} -= d}. \pnum \returns @@ -2744,7 +2744,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), tp); +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L%F %T}"), tp); \end{codeblock} \pnum @@ -2940,7 +2940,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L%F %T}"), t); \end{codeblock} \pnum @@ -3146,7 +3146,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L%F %T}"), t); \end{codeblock} \pnum @@ -3309,7 +3309,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L%F %T}"), t); \end{codeblock} \pnum @@ -3432,7 +3432,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), t); +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L%F %T}"), t); \end{codeblock} \end{itemdescr} @@ -3959,7 +3959,7 @@ \begin{codeblock} namespace std::chrono { class day { - unsigned char d_; // \expos + unsigned char @\exposid{d_}@; // \expos public: day() = default; constexpr explicit day(unsigned d) noexcept; @@ -4002,7 +4002,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{d_} with \tcode{d}. +Initializes \exposid{d_} with \tcode{d}. The value held is unspecified if \tcode{d} is not in the range \crange{0}{255}. \end{itemdescr} @@ -4014,7 +4014,7 @@ \begin{itemdescr} \pnum \effects -\tcode{++d_}. +\tcode{++\exposid{d_}}. \pnum \returns @@ -4044,7 +4044,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{--d_}. +Equivalent to: \tcode{--\exposid{d_}}. \pnum \returns @@ -4104,7 +4104,7 @@ \begin{itemdescr} \pnum \returns -\tcode{d_}. +\exposid{d_}. \end{itemdescr} \indexlibrarymember{ok}{day}% @@ -4115,7 +4115,7 @@ \begin{itemdescr} \pnum \returns -\tcode{1 <= d_ \&\& d_ <= 31}. +\tcode{1 <= \exposid{d_} \&\& \exposid{d_} <= 31}. \end{itemdescr} \rSec3[time.cal.day.nonmembers]{Non-member functions} @@ -4199,8 +4199,8 @@ Equivalent to: \begin{codeblock} return os << (d.ok() ? - format(@\placeholder{STATICALLY-WIDEN}@("{:%d}"), d) : - format(@\placeholder{STATICALLY-WIDEN}@("{:%d} is not a valid day"), d)); + format(@\exposid{STATICALLY-WIDEN}@("{:%d}"), d) : + format(@\exposid{STATICALLY-WIDEN}@("{:%d} is not a valid day"), d)); \end{codeblock} \end{itemdescr} @@ -4252,7 +4252,7 @@ \begin{codeblock} namespace std::chrono { class month { - unsigned char m_; // \expos + unsigned char @\exposid{m_}@; // \expos public: month() = default; constexpr explicit month(unsigned m) noexcept; @@ -4295,7 +4295,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{m_} with \tcode{m}. +Initializes \exposid{m_} with \tcode{m}. The value held is unspecified if \tcode{m} is not in the range \crange{0}{255}. \end{itemdescr} @@ -4397,7 +4397,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_}. +\exposid{m_}. \end{itemdescr} \indexlibrarymember{ok}{month}% @@ -4408,7 +4408,7 @@ \begin{itemdescr} \pnum \returns -\tcode{1 <= m_ \&\& m_ <= 12}. +\tcode{1 <= \exposid{m_} \&\& \exposid{m_} <= 12}. \end{itemdescr} \rSec3[time.cal.month.nonmembers]{Non-member functions} @@ -4512,8 +4512,8 @@ Equivalent to: \begin{codeblock} return os << (m.ok() ? - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%b}"), m) : - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{} is not a valid month"), + format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L%b}"), m) : + format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{} is not a valid month"), static_cast(m))); \end{codeblock} \end{itemdescr} @@ -4555,7 +4555,7 @@ \begin{codeblock} namespace std::chrono { class year { - short y_; // \expos + short @\exposid{y_}@; // \expos public: year() = default; constexpr explicit year(int y) noexcept; @@ -4605,7 +4605,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{y_} with \tcode{y}. +Initializes \exposid{y_} with \tcode{y}. The value held is unspecified if \tcode{y} is not in the range \crange{-32767}{32767}. \end{itemdescr} @@ -4617,7 +4617,7 @@ \begin{itemdescr} \pnum \effects -\tcode{++y_}. +\tcode{++\exposid{y_}}. \pnum \returns @@ -4647,7 +4647,7 @@ \begin{itemdescr} \pnum \effects -\tcode{--y_}. +\tcode{--\exposid{y_}}. \pnum \returns @@ -4718,7 +4718,7 @@ \begin{itemdescr} \pnum \returns -\tcode{year\{-y_\}}. +\tcode{year\{-\exposid{y_}\}}. \end{itemdescr} \indexlibrarymember{is_leap}{year}% @@ -4729,7 +4729,7 @@ \begin{itemdescr} \pnum \returns -\tcode{y_ \% 4 == 0 \&\& (y_ \% 100 != 0 || y_ \% 400 == 0)}. +\tcode{\exposid{y_} \% 4 == 0 \&\& (\exposid{y_} \% 100 != 0 || \exposid{y_} \% 400 == 0)}. \end{itemdescr} \indexlibrarymember{operator int}{year}% @@ -4740,7 +4740,7 @@ \begin{itemdescr} \pnum \returns -\tcode{y_}. +\exposid{y_}. \end{itemdescr} \indexlibrarymember{ok}{year}% @@ -4751,7 +4751,7 @@ \begin{itemdescr} \pnum \returns -\tcode{min().y_ <= y_ \&\& y_ <= max().y_}. +\tcode{min().\exposid{y_} <= \exposid{y_} \&\& \exposid{y_} <= max().\exposid{y_}}. \end{itemdescr} \indexlibrarymember{min}{year}% @@ -4857,8 +4857,8 @@ Equivalent to: \begin{codeblock} return os << (y.ok() ? - format(@\placeholder{STATICALLY-WIDEN}@("{:%Y}"), y) : - format(@\placeholder{STATICALLY-WIDEN}@("{:%Y} is not a valid year"), y)); + format(@\exposid{STATICALLY-WIDEN}@("{:%Y}"), y) : + format(@\exposid{STATICALLY-WIDEN}@("{:%Y} is not a valid year"), y)); \end{codeblock} \end{itemdescr} @@ -4910,7 +4910,7 @@ \begin{codeblock} namespace std::chrono { class weekday { - unsigned char wd_; // \expos + unsigned char @\exposid{wd_}@; // \expos public: weekday() = default; constexpr explicit weekday(unsigned wd) noexcept; @@ -4964,7 +4964,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{wd_} with \tcode{wd == 7 ?\ 0 :\ wd}. +Initializes \exposid{wd_} with \tcode{wd == 7 ?\ 0 :\ wd}. The value held is unspecified if \tcode{wd} is not in the range \crange{0}{255}. \end{itemdescr} @@ -4977,13 +4977,13 @@ \pnum \effects Computes what day of the week corresponds to the \tcode{sys_days} \tcode{dp}, -and initializes that day of the week in \tcode{wd_}. +and initializes that day of the week in \exposid{wd_}. \pnum \begin{example} If \tcode{dp} represents 1970-01-01, the constructed \tcode{weekday} represents Thursday -by storing \tcode{4} in \tcode{wd_}. +by storing \tcode{4} in \exposid{wd_}. \end{example} \end{itemdescr} @@ -4996,7 +4996,7 @@ \pnum \effects Computes what day of the week corresponds to the \tcode{local_days} \tcode{dp}, -and initializes that day of the week in \tcode{wd_}. +and initializes that day of the week in \exposid{wd_}. \pnum \ensures @@ -5102,7 +5102,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wd_}. +\exposid{wd_}. \end{itemdescr} \indexlibrarymember{iso_encoding}{weekday}% @@ -5113,7 +5113,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wd_ == 0u ?\ 7u :\ wd_}. +\tcode{\exposid{wd_} == 0u ?\ 7u :\ \exposid{wd_}}. \end{itemdescr} \indexlibrarymember{ok}{weekday}% @@ -5124,7 +5124,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wd_ <= 6}. +\tcode{\exposid{wd_} <= 6}. \end{itemdescr} \indexlibrarymember{operator[]}{weekday}% @@ -5159,7 +5159,7 @@ \begin{itemdescr} \pnum \returns -\tcode{x.wd_ == y.wd_}. +\tcode{x.\exposid{wd_} == y.\exposid{wd_}}. \end{itemdescr} \indexlibrarymember{operator+}{weekday}% @@ -5171,7 +5171,7 @@ \pnum \returns \begin{codeblock} -weekday{modulo(static_cast(x.wd_) + y.count(), 7)} +weekday{modulo(static_cast(x.@\exposid{wd_}@) + y.count(), 7)} \end{codeblock} where \tcode{modulo(n, 7)} computes the remainder of \tcode{n} divided by 7 using Euclidean division. \begin{note} @@ -5239,9 +5239,9 @@ Equivalent to: \begin{codeblock} return os << (wd.ok() ? - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%a}"), wd) : - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{} is not a valid weekday"), - static_cast(wd.wd_))); + format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L%a}"), wd) : + format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{} is not a valid weekday"), + static_cast(wd.@\exposid{wd_}@))); \end{codeblock} \end{itemdescr} @@ -5282,8 +5282,8 @@ \begin{codeblock} namespace std::chrono { class weekday_indexed { - chrono::weekday wd_; // \expos - unsigned char index_; // \expos + chrono::weekday @\exposid{wd_}@; // \expos + unsigned char @\exposid{index_}@; // \expos public: weekday_indexed() = default; @@ -5329,7 +5329,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{wd_} with \tcode{wd} and \tcode{index_} with \tcode{index}. +Initializes \exposid{wd_} with \tcode{wd} and \exposid{index_} with \tcode{index}. The values held are unspecified if \tcode{!wd.ok()} or \tcode{index} is not in the range \crange{0}{7}. \end{itemdescr} @@ -5341,7 +5341,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wd_}. +\exposid{wd_}. \end{itemdescr} \indexlibrarymember{index}{weekday_indexed}% @@ -5352,7 +5352,7 @@ \begin{itemdescr} \pnum \returns -\tcode{index_}. +\exposid{index_}. \end{itemdescr} \indexlibrarymember{ok}{weekday_indexed}% @@ -5363,7 +5363,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wd_.ok() \&\& 1 <= index_ \&\& index_ <= 5}. +\tcode{\exposid{wd_}.ok() \&\& 1 <= \exposid{index_} \&\& \exposid{index_} <= 5}. \end{itemdescr} \rSec3[time.cal.wdidx.nonmembers]{Non-member functions} @@ -5393,8 +5393,8 @@ \begin{codeblock} auto i = wdi.index(); return os << (i >= 1 && i <= 5 ? - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}[{}]"), wdi.weekday(), i) : - format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}[{} is not a valid index]"), + format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L}[{}]"), wdi.weekday(), i) : + format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L}[{} is not a valid index]"), wdi.weekday(), i)); \end{codeblock} \end{itemdescr} @@ -5407,7 +5407,7 @@ \begin{codeblock} namespace std::chrono { class weekday_last { - chrono::weekday wd_; // \expos + chrono::weekday @\exposid{wd_}@; // \expos public: constexpr explicit weekday_last(const chrono::weekday& wd) noexcept; @@ -5446,7 +5446,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{wd_} with \tcode{wd}. +Initializes \exposid{wd_} with \tcode{wd}. \end{itemdescr} \indexlibrarymember{weekday_last}{weekday}% @@ -5457,7 +5457,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wd_}. +\exposid{wd_}. \end{itemdescr} \indexlibrarymember{ok}{weekday_last}% @@ -5468,7 +5468,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wd_.ok()}. +\tcode{\exposid{wd_}.ok()}. \end{itemdescr} \rSec3[time.cal.wdlast.nonmembers]{Non-member functions} @@ -5496,7 +5496,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}[last]"), wdl.weekday()); +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L}[last]"), wdl.weekday()); \end{codeblock} \end{itemdescr} @@ -5508,8 +5508,8 @@ \begin{codeblock} namespace std::chrono { class month_day { - chrono::month m_; // \expos - chrono::day d_; // \expos + chrono::month @\exposid{m_}@; // \expos + chrono::day @\exposid{d_}@; // \expos public: month_day() = default; @@ -5541,7 +5541,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{m_} with \tcode{m}, and \tcode{d_} with \tcode{d}. +Initializes \exposid{m_} with \tcode{m}, and \exposid{d_} with \tcode{d}. \end{itemdescr} \indexlibrarymember{month}{month_day}% @@ -5552,7 +5552,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_}. +\exposid{m_}. \end{itemdescr} \indexlibrarymember{day}{month_day}% @@ -5563,7 +5563,7 @@ \begin{itemdescr} \pnum \returns -\tcode{d_}. +\exposid{d_}. \end{itemdescr} \indexlibrarymember{ok}{month_day}% @@ -5575,11 +5575,11 @@ \pnum \returns \tcode{true} if -\tcode{m_.ok()} is \tcode{true}, -\tcode{1d <= d_}, and -\tcode{d_} is less than or equal to the number of days in month \tcode{m_}; +\tcode{\exposid{m_}.ok()} is \tcode{true}, +\tcode{1d <= \exposid{d_}}, and +\exposid{d_} is less than or equal to the number of days in month \exposid{m_}; otherwise returns \tcode{false}. -When \tcode{m_ == February}, +When \tcode{\exposid{m_} == February}, the number of days is considered to be 29. \end{itemdescr} @@ -5623,7 +5623,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/{}"), +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L}/{}"), md.month(), md.day()); \end{codeblock} \end{itemdescr} @@ -5663,7 +5663,7 @@ \begin{codeblock} namespace std::chrono { class month_day_last { - chrono::month m_; // \expos + chrono::month @\exposid{m_}@; // \expos public: constexpr explicit month_day_last(const chrono::month& m) noexcept; @@ -5701,7 +5701,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{m_} with \tcode{m}. +Initializes \exposid{m_} with \tcode{m}. \end{itemdescr} \indexlibrarymember{month}{month_day_last}% @@ -5712,7 +5712,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_}. +\exposid{m_}. \end{itemdescr} \indexlibrarymember{ok}{month_day_last}% @@ -5723,7 +5723,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_.ok()}. +\tcode{\exposid{m_}.ok()}. \end{itemdescr} \indexlibrarymember{operator==}{month_day_last}% @@ -5760,7 +5760,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/last"), mdl.month()); +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L}/last"), mdl.month()); \end{codeblock} \end{itemdescr} @@ -5772,8 +5772,8 @@ \begin{codeblock} namespace std::chrono { class month_weekday { - chrono::month m_; // \expos - chrono::weekday_indexed wdi_; // \expos + chrono::month @\exposid{m_}@; // \expos + chrono::weekday_indexed @\exposid{wdi_}@; // \expos public: constexpr month_weekday(const chrono::month& m, const chrono::weekday_indexed& wdi) noexcept; @@ -5812,7 +5812,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{m_} with \tcode{m}, and \tcode{wdi_} with \tcode{wdi}. +Initializes \exposid{m_} with \tcode{m}, and \exposid{wdi_} with \tcode{wdi}. \end{itemdescr} \indexlibrarymember{month}{month_weekday}% @@ -5823,7 +5823,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_}. +\exposid{m_}. \end{itemdescr} \indexlibrarymember{weekday_indexed}{month_weekday}% @@ -5834,7 +5834,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wdi_}. +\exposid{wdi_}. \end{itemdescr} \indexlibrarymember{ok}{month_weekday}% @@ -5845,7 +5845,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_.ok() \&\& wdi_.ok()}. +\tcode{\exposid{m_}.ok() \&\& \exposid{wdi_}.ok()}. \end{itemdescr} \rSec3[time.cal.mwd.nonmembers]{Non-member functions} @@ -5873,7 +5873,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/{:L}"), +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L}/{:L}"), mwd.month(), mwd.weekday_indexed()); \end{codeblock} \end{itemdescr} @@ -5886,8 +5886,8 @@ \begin{codeblock} namespace std::chrono { class month_weekday_last { - chrono::month m_; // \expos - chrono::weekday_last wdl_; // \expos + chrono::month @\exposid{m_}@; // \expos + chrono::weekday_last @\exposid{wdl_}@; // \expos public: constexpr month_weekday_last(const chrono::month& m, const chrono::weekday_last& wdl) noexcept; @@ -5928,7 +5928,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{m_} with \tcode{m}, and \tcode{wdl_} with \tcode{wdl}. +Initializes \exposid{m_} with \tcode{m}, and \exposid{wdl_} with \tcode{wdl}. \end{itemdescr} \indexlibrarymember{month}{month_weekday_last}% @@ -5939,7 +5939,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_}. +\exposid{m_}. \end{itemdescr} \indexlibrarymember{weekday_last}{month_weekday_last}% @@ -5950,7 +5950,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wdl_}. +\exposid{wdl_}. \end{itemdescr} \indexlibrarymember{ok}{month_weekday_last}% @@ -5961,7 +5961,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_.ok() \&\& wdl_.ok()}. +\tcode{\exposid{m_}.ok() \&\& \exposid{wdl_}.ok()}. \end{itemdescr} \rSec3[time.cal.mwdlast.nonmembers]{Non-member functions} @@ -5989,7 +5989,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L}/{:L}"), +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L}/{:L}"), mwdl.month(), mwdl.weekday_last()); \end{codeblock} \end{itemdescr} @@ -6002,8 +6002,8 @@ \begin{codeblock} namespace std::chrono { class year_month { - chrono::year y_; // \expos - chrono::month m_; // \expos + chrono::year @\exposid{y_}@; // \expos + chrono::month @\exposid{m_}@; // \expos public: year_month() = default; @@ -6042,7 +6042,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{y_} with \tcode{y}, and \tcode{m_} with \tcode{m}. +Initializes \exposid{y_} with \tcode{y}, and \exposid{m_} with \tcode{m}. \end{itemdescr} \indexlibrarymember{year}{year_month}% @@ -6053,7 +6053,7 @@ \begin{itemdescr} \pnum \returns -\tcode{y_}. +\exposid{y_}. \end{itemdescr} \indexlibrarymember{month}{year_month}% @@ -6064,7 +6064,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_}. +\exposid{m_}. \end{itemdescr} \indexlibrarymember{operator+=}{year_month}% @@ -6151,7 +6151,7 @@ \begin{itemdescr} \pnum \returns -\tcode{y_.ok() \&\& m_.ok()}. +\tcode{\exposid{y_}.ok() \&\& \exposid{m_}.ok()}. \end{itemdescr} \rSec3[time.cal.ym.nonmembers]{Non-member functions} @@ -6303,7 +6303,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}"), +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{}/{:L}"), ym.year(), ym.month()); \end{codeblock} \end{itemdescr} @@ -6345,9 +6345,9 @@ \begin{codeblock} namespace std::chrono { class year_month_day { - chrono::year y_; // \expos - chrono::month m_; // \expos - chrono::day d_; // \expos + chrono::year @\exposid{y_}@; // \expos + chrono::month @\exposid{m_}@; // \expos + chrono::day @\exposid{d_}@; // \expos public: year_month_day() = default; @@ -6400,9 +6400,9 @@ \pnum \effects Initializes -\tcode{y_} with \tcode{y}, -\tcode{m_} with \tcode{m}, and -\tcode{d_} with \tcode{d}. +\exposid{y_} with \tcode{y}, +\exposid{m_} with \tcode{m}, and +\exposid{d_} with \tcode{d}. \end{itemdescr} \indexlibraryctor{year_month_day}% @@ -6414,9 +6414,9 @@ \pnum \effects Initializes -\tcode{y_} with \tcode{ymdl.year()}, -\tcode{m_} with \tcode{ymdl.month()}, and -\tcode{d_} with \tcode{ymdl.day()}. +\exposid{y_} with \tcode{ymdl.year()}, +\exposid{m_} with \tcode{ymdl.month()}, and +\exposid{d_} with \tcode{ymdl.day()}. \begin{note} This conversion from \tcode{year_month_day_last} to \tcode{year_month_day} can be more efficient than converting a \tcode{year_month_day_last} to a \tcode{sys_days}, @@ -6538,7 +6538,7 @@ \begin{itemdescr} \pnum \returns -\tcode{y_}. +\exposid{y_}. \end{itemdescr} \indexlibrarymember{month}{year_month_day}% @@ -6549,7 +6549,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_}. +\exposid{m_}. \end{itemdescr} \indexlibrarymember{day}{year_month_day}% @@ -6560,7 +6560,7 @@ \begin{itemdescr} \pnum \returns -\tcode{d_}. +\exposid{d_}. \end{itemdescr} \indexlibrarymember{operator sys_days}{year_month_day}% @@ -6575,8 +6575,8 @@ returns a \tcode{sys_days} holding a count of days from the \tcode{sys_days} epoch to \tcode{*this} (a negative value if \tcode{*this} represents a date prior to the \tcode{sys_days} epoch). -Otherwise, if \tcode{y_.ok() \&\& m_.ok()} is \tcode{true}, -returns \tcode{sys_days\{y_/m_/1d\} + (d_ - 1d)}. +Otherwise, if \tcode{\exposid{y_}.ok() \&\& \exposid{m_}.ok()} is \tcode{true}, +returns \tcode{sys_days\{\exposid{y_}/\exposid{m_}/1d\} + (\exposid{d_} - 1d)}. Otherwise the value returned is unspecified. \pnum @@ -6614,9 +6614,9 @@ \begin{itemdescr} \pnum \returns -If \tcode{y_.ok()} is \tcode{true}, -and \tcode{m_.ok()} is \tcode{true}, -and \tcode{d_} is in the range \crange{1d}{(y_/m_/last).day()}, +If \tcode{\exposid{y_}.ok()} is \tcode{true}, +and \tcode{\exposid{m_}.ok()} is \tcode{true}, +and \exposid{d_} is in the range \crange{1d}{(\exposid{y_}/\exposid{m_}/last).day()}, then returns \tcode{true}; otherwise returns \tcode{false}. \end{itemdescr} @@ -6767,8 +6767,8 @@ Equivalent to: \begin{codeblock} return os << (ymd.ok() ? - format(@\placeholder{STATICALLY-WIDEN}@("{:%F}"), ymd) : - format(@\placeholder{STATICALLY-WIDEN}@("{:%F} is not a valid date"), ymd)); + format(@\exposid{STATICALLY-WIDEN}@("{:%F}"), ymd) : + format(@\exposid{STATICALLY-WIDEN}@("{:%F} is not a valid date"), ymd)); \end{codeblock} \end{itemdescr} @@ -6809,8 +6809,8 @@ \begin{codeblock} namespace std::chrono { class year_month_day_last { - chrono::year y_; // \expos - chrono::month_day_last mdl_; // \expos + chrono::year @\exposid{y_}@; // \expos + chrono::month_day_last @\exposid{mdl_}@; // \expos public: constexpr year_month_day_last(const chrono::year& y, @@ -6860,7 +6860,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{y_} with \tcode{y} and \tcode{mdl_} with \tcode{mdl}. +Initializes \exposid{y_} with \tcode{y} and \exposid{mdl_} with \tcode{mdl}. \end{itemdescr} \indexlibrarymember{operator+=}{year_month_day_last}% @@ -6947,7 +6947,7 @@ \begin{itemdescr} \pnum \returns -\tcode{y_}. +\exposid{y_}. \end{itemdescr} \indexlibrarymember{month}{year_month_day_last}% @@ -6958,7 +6958,7 @@ \begin{itemdescr} \pnum \returns -\tcode{mdl_.month()}. +\tcode{\exposid{mdl_}.month()}. \end{itemdescr} \indexlibrarymember{month_day_last}{year_month_day_last}% @@ -6969,7 +6969,7 @@ \begin{itemdescr} \pnum \returns -\tcode{mdl_}. +\exposid{mdl_}. \end{itemdescr} \indexlibrarymember{day}{year_month_day_last}% @@ -7022,7 +7022,7 @@ \begin{itemdescr} \pnum \returns -\tcode{y_.ok() \&\& mdl_.ok()}. +\tcode{\exposid{y_}.ok() \&\& \exposid{mdl_}.ok()}. \end{itemdescr} \rSec3[time.cal.ymdlast.nonmembers]{Non-member functions} @@ -7162,7 +7162,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}"), +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{}/{:L}"), ymdl.year(), ymdl.month_day_last()); \end{codeblock} \end{itemdescr} @@ -7175,9 +7175,9 @@ \begin{codeblock} namespace std::chrono { class year_month_weekday { - chrono::year y_; // \expos - chrono::month m_; // \expos - chrono::weekday_indexed wdi_; // \expos + chrono::year @\exposid{y_}@; // \expos + chrono::month @\exposid{m_}@; // \expos + chrono::weekday_indexed @\exposid{wdi_}@; // \expos public: year_month_weekday() = default; @@ -7230,7 +7230,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{y_} with \tcode{y}, \tcode{m_} with \tcode{m}, and \tcode{wdi_} with \tcode{wdi}. +Initializes \exposid{y_} with \tcode{y}, \exposid{m_} with \tcode{m}, and \exposid{wdi_} with \tcode{wdi}. \end{itemdescr} \indexlibraryctor{year_month_weekday}% @@ -7346,7 +7346,7 @@ \begin{itemdescr} \pnum \returns -\tcode{y_}. +\exposid{y_}. \end{itemdescr} \indexlibrarymember{month}{year_month_weekday}% @@ -7357,7 +7357,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_}. +\exposid{m_}. \end{itemdescr} \indexlibrarymember{weekday}{year_month_weekday}% @@ -7368,7 +7368,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wdi_.weekday()}. +\tcode{\exposid{wdi_}.weekday()}. \end{itemdescr} \indexlibrarymember{index}{year_month_weekday}% @@ -7379,7 +7379,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wdi_.index()}. +\tcode{\exposid{wdi_}.index()}. \end{itemdescr} \indexlibrarymember{weekday_indexed}{year_month_weekday}% @@ -7390,7 +7390,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wdi_}. +\exposid{wdi_}. \end{itemdescr} \indexlibrarymember{operator sys_days}{year_month_weekday}% @@ -7401,7 +7401,7 @@ \begin{itemdescr} \pnum \returns -If \tcode{y_.ok() \&\& m_.ok() \&\& wdi_.weekday().ok()}, +If \tcode{\exposid{y_}.ok() \&\& \exposid{m_}.ok() \&\& \exposid{wdi_}.weekday().ok()}, returns a \tcode{sys_days} that represents the date \tcode{(index() - 1) * 7} days after the first \tcode{weekday()} of \tcode{year()/month()}. @@ -7432,9 +7432,9 @@ \pnum \returns If any of -\tcode{y_.ok()}, -\tcode{m_.ok()}, or -\tcode{wdi_.ok()} +\tcode{\exposid{y_}.ok()}, +\tcode{\exposid{m_}.ok()}, or +\tcode{\exposid{wdi_}.ok()} is \tcode{false}, returns \tcode{false}. Otherwise, if \tcode{*this} represents a valid date, returns \tcode{true}. @@ -7558,7 +7558,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}/{:L}"), +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{}/{:L}/{:L}"), ymwd.year(), ymwd.month(), ymwd.weekday_indexed()); \end{codeblock} \end{itemdescr} @@ -7571,9 +7571,9 @@ \begin{codeblock} namespace std::chrono { class year_month_weekday_last { - chrono::year y_; // \expos - chrono::month m_; // \expos - chrono::weekday_last wdl_; // \expos + chrono::year @\exposid{y_}@; // \expos + chrono::month @\exposid{m_}@; // \expos + chrono::weekday_last @\exposid{wdl_}@; // \expos public: constexpr year_month_weekday_last(const chrono::year& y, const chrono::month& m, @@ -7623,7 +7623,7 @@ \begin{itemdescr} \pnum \effects -Initializes \tcode{y_} with \tcode{y}, \tcode{m_} with \tcode{m}, and \tcode{wdl_} with \tcode{wdl}. +Initializes \exposid{y_} with \tcode{y}, \exposid{m_} with \tcode{m}, and \exposid{wdl_} with \tcode{wdl}. \end{itemdescr} \indexlibrarymember{operator+=}{year_month_weekday_last}% @@ -7710,7 +7710,7 @@ \begin{itemdescr} \pnum \returns -\tcode{y_}. +\exposid{y_}. \end{itemdescr} \indexlibrarymember{month}{year_month_weekday_last}% @@ -7721,7 +7721,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m_}. +\exposid{m_}. \end{itemdescr} \indexlibrarymember{weekday}{year_month_weekday_last}% @@ -7732,7 +7732,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wdl_.weekday()}. +\tcode{\exposid{wdl_}.weekday()}. \end{itemdescr} \indexlibrarymember{weekday_last}{year_month_weekday_last}% @@ -7743,7 +7743,7 @@ \begin{itemdescr} \pnum \returns -\tcode{wdl_}. +\exposid{wdl_}. \end{itemdescr} \indexlibrarymember{operator sys_days}{year_month_weekday_last}% @@ -7779,7 +7779,7 @@ \begin{itemdescr} \pnum \returns -\tcode{y_.ok() \&\& m_.ok() \&\& wdl_.ok()}. +\tcode{\exposid{y_}.ok() \&\& \exposid{m_}.ok() \&\& \exposid{wdl_}.ok()}. \end{itemdescr} \rSec3[time.cal.ymwdlast.nonmembers]{Non-member functions} @@ -7906,7 +7906,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{}/{:L}/{:L}"), +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{}/{:L}/{:L}"), ymwdl.year(), ymwdl.month(), ymwdl.weekday_last()); \end{codeblock} \end{itemdescr} @@ -8427,11 +8427,11 @@ constexpr precision to_duration() const noexcept; private: - bool is_neg; // \expos - chrono::hours h; // \expos - chrono::minutes m; // \expos - chrono::seconds s; // \expos - precision ss; // \expos + bool @\exposid{is-neg}@; // \expos + chrono::hours @\exposid{h_}@; // \expos + chrono::minutes @\exposid{m_}@; // \expos + chrono::seconds @\exposid{s_}@; // \expos + precision @\exposid{ss_}@; // \expos }; } \end{codeblock} @@ -8533,23 +8533,23 @@ which represents the \tcode{Duration d} with precision \tcode{precision}. \begin{itemize} \item - Initializes \tcode{is_neg} with \tcode{d < Duration::zero()}. + Initializes \exposid{is-neg} with \tcode{d < Duration::zero()}. Let \tcode{\placeholder{ABS_D}} represent - \tcode{-d} if \tcode{is_neg} is \tcode{true} and + \tcode{-d} if \exposid{is-neg} is \tcode{true} and \tcode{d} otherwise. \item - Initializes \tcode{h} with \tcode{duration_cast(\placeholder{ABS_D})}. + Initializes \exposid{h_} with \tcode{duration_cast(\placeholder{ABS_D})}. \item - Initializes \tcode{m} + Initializes \exposid{m_} with \tcode{duration_cast(\placeholder{ABS_D} - hours())}. \item - Initializes \tcode{s} + Initializes \exposid{s_} with \tcode{duration_cast(\placeholder{ABS_D} - hours() - minutes())}. \item If \tcode{treat_as_floating_point_v} is \tcode{true}, - initializes \tcode{ss} with \tcode{\placeholder{ABS_D} - hours() - minutes() - seconds()}. - Otherwise, initializes \tcode{ss} - with \tcode{duration_cast(\placeholder{ABS_D} - hours() - minutes() - seconds())}. + initializes \exposid{ss_} with \tcode{\placeholder{ABS_D}\linebreak{} - hours() - minutes() - seconds()}. + Otherwise, initializes \exposid{ss_} + with \tcode{duration_cast(\placeholder{ABS_D} - hours() - minutes() - seconds())}. \end{itemize} \begin{note} When \tcode{precision::rep} is integral and @@ -8572,7 +8572,7 @@ \begin{itemdescr} \pnum \returns -\tcode{is_neg}. +\exposid{is-neg}. \end{itemdescr} \indexlibrarymember{hours}{hh_mm_ss}% @@ -8583,7 +8583,7 @@ \begin{itemdescr} \pnum \returns -\tcode{h}. +\exposid{h_}. \end{itemdescr} \indexlibrarymember{minutes}{hh_mm_ss}% @@ -8594,7 +8594,7 @@ \begin{itemdescr} \pnum \returns -\tcode{m}. +\exposid{m_}. \end{itemdescr} \indexlibrarymember{seconds}{hh_mm_ss}% @@ -8605,7 +8605,7 @@ \begin{itemdescr} \pnum \returns -\tcode{s}. +\exposid{s_}. \end{itemdescr} \indexlibrarymember{subseconds}{hh_mm_ss}% @@ -8616,7 +8616,7 @@ \begin{itemdescr} \pnum \returns -\tcode{ss}. +\exposid{ss_}. \end{itemdescr} \indexlibrarymember{to_duration}{hh_mm_ss}% @@ -8627,8 +8627,8 @@ \begin{itemdescr} \pnum \returns -If \tcode{is_neg}, returns \tcode{-(h + m + s + ss)}, -otherwise returns \tcode{h + m + s + ss}. +If \exposid{is-neg}, returns \tcode{-(\exposid{h_} + \exposid{m_} + \exposid{s_} + \exposid{ss_})}, +otherwise returns \tcode{\exposid{h_} + \exposid{m_} + \exposid{s_} + \exposid{ss_}}. \end{itemdescr} \indexlibrarymember{operator precision}{hh_mm_ss}% @@ -8655,7 +8655,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%T}"), hms); +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L%T}"), hms); \end{codeblock} \pnum @@ -9641,10 +9641,10 @@ using duration = common_type_t; private: - TimeZonePtr zone_; // \expos - sys_time tp_; // \expos + TimeZonePtr @\exposid{zone_}@; // \expos + sys_time @\exposid{tp_}@; // \expos - using traits = zoned_traits; // \expos + using @\exposid{traits_}@ = zoned_traits; // \expos public: zoned_time(); @@ -9751,12 +9751,12 @@ \begin{itemdescr} \pnum \constraints -\tcode{traits::default_zone()} is a well-formed expression. +\tcode{\exposid{traits_}::default_zone()} is a well-formed expression. \pnum \effects -Initializes \tcode{zone_} with \tcode{traits::default_zone()} and -default constructs \tcode{tp_}. +Initializes \exposid{zone_} with \tcode{\exposid{traits_}::default_zone()} and +default constructs \exposid{tp_}. \end{itemdescr} \begin{itemdecl} @@ -9766,11 +9766,11 @@ \begin{itemdescr} \pnum \constraints -\tcode{traits::default_zone()} is a well-formed expression. +\tcode{\exposid{traits_}::default_zone()} is a well-formed expression. \pnum \effects -Initializes \tcode{zone_} with \tcode{traits::default_zone()} and \tcode{tp_} with \tcode{st}. +Initializes \exposid{zone_} with \tcode{\exposid{traits_}::default_zone()} and \exposid{tp_} with \tcode{st}. \end{itemdescr} \begin{itemdecl} @@ -9784,8 +9784,8 @@ \pnum \effects -Initializes \tcode{zone_} with \tcode{std::move(z)} and -default constructs \tcode{tp_}. +Initializes \exposid{zone_} with \tcode{std::move(z)} and +default constructs \exposid{tp_}. \end{itemdescr} \begin{itemdecl} @@ -9795,13 +9795,13 @@ \begin{itemdescr} \pnum \constraints -\tcode{traits::locate_zone(string_view\{\})} is a well-formed expression and -\tcode{zoned_time} is constructible from the return type of \tcode{traits::locate_zone(string_view\{\})}. +\tcode{\exposid{traits_}::locate_zone(string_view\{\})} is a well-formed expression and +\tcode{zoned_time} is constructible from the return type of \tcode{\exposid{traits_}::locate_zone(string_view\{\})}. \pnum \effects -Initializes \tcode{zone_} with \tcode{traits::locate_zone(name)} and -default constructs \tcode{tp_}. +Initializes \exposid{zone_} with \tcode{\exposid{traits_}::locate_zone(name)} and +default constructs \exposid{tp_}. \end{itemdescr} \begin{itemdecl} @@ -9816,7 +9816,7 @@ \pnum \effects -Initializes \tcode{zone_} with \tcode{y.zone_} and \tcode{tp_} with \tcode{y.tp_}. +Initializes \exposid{zone_} with \tcode{y.\exposid{zone_}} and \exposid{tp_} with \tcode{y.\exposid{tp_}}. \end{itemdescr} \begin{itemdecl} @@ -9830,7 +9830,7 @@ \pnum \effects -Initializes \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{st}. +Initializes \exposid{zone_} with \tcode{std::move(z)} and \exposid{tp_} with \tcode{st}. \end{itemdescr} \begin{itemdecl} @@ -9840,11 +9840,11 @@ \begin{itemdescr} \pnum \constraints -\tcode{zoned_time} is constructible from the return type of \tcode{traits::locate_zone(name)} and \tcode{st}. +\tcode{zoned_time} is constructible from the return type of \tcode{\exposid{traits_}::locate_zone(name)} and \tcode{st}. \pnum \effects -Equivalent to construction with \tcode{\{traits::locate_zone(name), st\}}. +Equivalent to construction with \tcode{\{\exposid{traits_}::locate_zone(name), st\}}. \end{itemdescr} \begin{itemdecl} @@ -9867,7 +9867,7 @@ \pnum \effects -Initializes \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{zone_->to_sys(tp)}. +Initializes \exposid{zone_} with \tcode{std::move(z)} and \exposid{tp_} with \tcode{\exposid{zone_}->to_sys(tp)}. \end{itemdescr} \begin{itemdecl} @@ -9877,11 +9877,11 @@ \begin{itemdescr} \pnum \constraints -\tcode{zoned_time} is constructible from the return type of \tcode{traits::locate_zone(name)} and \tcode{tp}. +\tcode{zoned_time} is constructible from the return type of \tcode{\exposid{traits_}::locate_zone(name)} and \tcode{tp}. \pnum \effects -Equivalent to construction with \tcode{\{traits::locate_zone(name), tp\}}. +Equivalent to construction with \tcode{\{\exposid{traits_}::locate_zone(name), tp\}}. \end{itemdescr} \begin{itemdecl} @@ -9904,7 +9904,7 @@ \pnum \effects -Initializes \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{zone_->to_sys(tp, c)}. +Initializes \exposid{zone_} with \tcode{std::move(z)} and \exposid{tp_} with \tcode{\exposid{zone_}->to_sys(tp, c)}. \end{itemdescr} \begin{itemdecl} @@ -9915,11 +9915,11 @@ \pnum \constraints \tcode{zoned_time} is constructible from -the return type of \tcode{traits::locate_zone(name)}, \tcode{local_time}, and \tcode{choose}. +the return type of \tcode{\exposid{traits_}::locate_zone(name)}, \tcode{local_time}, and \tcode{choose}. \pnum \effects -Equivalent to construction with \tcode{\{traits::locate_zone(name), tp, c\}}. +Equivalent to construction with \tcode{\{\exposid{traits_}::locate_zone(name), tp, c\}}. \end{itemdescr} \begin{itemdecl} @@ -9938,7 +9938,7 @@ \pnum \effects -Initializes \tcode{zone_} with \tcode{std::move(z)} and \tcode{tp_} with \tcode{y.tp_}. +Initializes \exposid{zone_} with \tcode{std::move(z)} and \exposid{tp_} with \tcode{y.\exposid{tp_}}. \end{itemdescr} \begin{itemdecl} @@ -9974,12 +9974,12 @@ \pnum \constraints \tcode{zoned_time} is constructible from -the return type of \tcode{traits::locate_zone(name)} and +the return type of \tcode{\exposid{traits_}::locate_zone(name)} and the type \tcode{zoned_time}. \pnum \effects -Equivalent to construction with \tcode{\{traits::locate_zone(name), y\}}. +Equivalent to construction with \tcode{\{\exposid{traits_}::locate_zone(name), y\}}. \end{itemdescr} \begin{itemdecl} @@ -9991,13 +9991,13 @@ \pnum \constraints \tcode{zoned_time} is constructible from -the return type of \tcode{traits::locate_zone(name)}, +the return type of \tcode{\exposid{traits_}::locate_zone(name)}, the type \tcode{zoned_time}, and the type \tcode{choose}. \pnum \effects -Equivalent to construction with \tcode{\{traits::locate_zone(name), y, c\}}. +Equivalent to construction with \tcode{\{\exposid{traits_}::locate_zone(name), y, c\}}. \pnum \begin{note} @@ -10070,7 +10070,7 @@ \begin{itemdescr} \pnum \returns -\tcode{zone_}. +\exposid{zone_}. \end{itemdescr} \indexlibrarymember{get_local_time}{zoned_time}% @@ -10081,7 +10081,7 @@ \begin{itemdescr} \pnum \returns -\tcode{zone_->to_local(tp_)}. +\tcode{\exposid{zone_}->to_local(\exposid{tp_})}. \end{itemdescr} \indexlibrarymember{get_sys_time}{zoned_time}% @@ -10092,7 +10092,7 @@ \begin{itemdescr} \pnum \returns -\tcode{tp_}. +\exposid{tp_}. \end{itemdescr} \indexlibrarymember{get_info}{zoned_time}% @@ -10103,7 +10103,7 @@ \begin{itemdescr} \pnum \returns -\tcode{zone_->get_info(tp_)}. +\tcode{\exposid{zone_}->get_info(\exposid{tp_})}. \end{itemdescr} \rSec3[time.zone.zonedtime.nonmembers]{Non-member functions} @@ -10118,7 +10118,7 @@ \begin{itemdescr} \pnum \returns -\tcode{x.zone_ == y.zone_ \&\& x.tp_ == y.tp_}. +\tcode{x.\exposid{zone_} == y.\exposid{zone_} \&\& x.\exposid{tp_} == y.\exposid{tp_}}. \end{itemdescr} \indexlibrarymember{operator<<}{zoned_time}% @@ -10134,7 +10134,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T %Z}"), t); +return os << format(os.getloc(), @\exposid{STATICALLY-WIDEN}@("{:L%F %T %Z}"), t); \end{codeblock} \end{itemdescr} @@ -10975,17 +10975,17 @@ \indexlibrary{local-time-format-t@\exposid{local-time-format-t}}% \begin{codeblock} -template struct @\placeholder{local-time-format-t}@ { // \expos - local_time time; // \expos - const string* abbrev; // \expos - const seconds* offset_sec; // \expos +template struct @\exposid{local-time-format-t}@ { // \expos + local_time @\exposid{time_}@; // \expos + const string* @\exposid{abbrev_}@; // \expos + const seconds* @\exposid{offset-sec}@; // \expos }; \end{codeblock} \indexlibraryglobal{local_time_format}% \begin{itemdecl} template - @\placeholder{local-time-format-t}@ + @\exposid{local-time-format-t}@ local_time_format(local_time time, const string* abbrev = nullptr, const seconds* offset_sec = nullptr); \end{itemdecl} @@ -10999,7 +10999,7 @@ \indexlibrary{\idxcode{formatter}!specializations!chrono::local-time-format-t@\tcode{chrono::\exposid{local-time-format-t}}}% \begin{itemdecl} template - struct formatter, charT>; + struct formatter, charT>; \end{itemdecl} \begin{itemdescr} @@ -11013,16 +11013,16 @@ the result is equivalent to using \tcode{\%F \%T \%Z} as the \fmtgrammarterm{chrono-specs}. If \tcode{\%Z} is used, -it is replaced with \tcode{*f.abbrev} -if \tcode{f.abbrev} is not a null pointer value. +it is replaced with \tcode{*f.\exposid{abbrev_}} +if \tcode{f.\exposid{abbrev_}} is not a null pointer value. If \tcode{\%Z} is used -and \tcode{f.abbrev} is a null pointer value, +and \tcode{f.\exposid{abbrev_}} is a null pointer value, an exception of type \tcode{format_error} is thrown. If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used, -it is formatted with the value of \tcode{*f.offset_sec} -if \tcode{f.offset_sec} is not a null pointer value. +it is formatted with the value of \tcode{*f.\exposid{offset-sec}} +if \tcode{f.\exposid{offset-sec}} is not a null pointer value. If \tcode{\%z} (or a modified variant of \tcode{\%z}) is used -and \tcode{f.offset_sec} is a null pointer value, +and \tcode{f.\exposid{offset-sec}} is a null pointer value, then an exception of type \tcode{format_error} is thrown. \end{itemdescr} @@ -11030,7 +11030,7 @@ \begin{codeblock} template struct formatter, charT> - : formatter>, charT> { + : formatter>, charT> { template typename FormatContext::iterator format(const chrono::zoned_time& tp, FormatContext& ctx) const; @@ -11050,7 +11050,7 @@ Equivalent to: \begin{codeblock} sys_info info = tp.get_info(); -return formatter>, charT>:: +return formatter>, charT>:: format({tp.get_local_time(), &info.abbrev, &info.offset}, ctx); \end{codeblock} \end{itemdescr} diff --git a/source/ub.tex b/source/ub.tex new file mode 100644 index 0000000000..4f82faf686 --- /dev/null +++ b/source/ub.tex @@ -0,0 +1,1976 @@ +%!TEX root = std.tex +\infannex{ub}{Core undefined behavior} + +\rSec1[ub.general]{General} + +This Annex documents +undefined behavior explicitly called out in +\ref{intro} through \ref{\lastcorechapter} +using the following phrases: +\begin{itemize} +\item the behavior of the program is undefined +\item has undefined behavior +\item results in undefined behavior +\item the behavior is undefined +\item have undefined behavior +\item is undefined +\item result has undefined behavior +\end{itemize} +Undefined behavior that is implicit is not covered by this annex. +Each entry contains +a title, +a cross-reference, +a summary of the circumstances, +and code examples. +The code examples are not intended +to exhaustively cover all possible ways of invoking that case. + +\rSec1[ub.basic]{\ref{basic}: Basics} + +\ubdescription{intro.object.implicit.create} + +\pnum +For each +operation that is specified as implicitly creating objects, that operation implicitly creates and starts the +lifetime of zero or more objects of implicit-lifetime types\iref{basic.types} in its specified region of storage if doing so +would result in the program having defined behavior. If no such set of objects would give the program defined +behavior, the behavior of the program is undefined. + +\pnum +\begin{example} +\begin{codeblock} +void f() +{ + void *p = malloc(sizeof(int) + sizeof(float)); + *reinterpret_cast(p) = 0; + *reinterpret_cast(p) = 0.0f; // undefined behavior, cannot create + // both \tcode{int} and \tcode{float} in same place +} +\end{codeblock} +\end{example} + +\ubdescription{intro.object.implicit.pointer} + +\pnum +After implicitly creating objects within a specified region of storage, +some operations are described as producing a pointer to a +suitable created object\iref{basic.types}. +These operations select one of the implicitly-created objects +whose address is the address of the start of the region of storage, +and produce a pointer value that points to that object, +if that value would result in the program having defined behavior. +If no such pointer value would give the program defined behavior, +the behavior of the program is undefined. + +\pnum +\begin{example} +\begin{codeblock} +#include +struct X { + int a, b; + ~X() = delete; // deleted destructor makes \tcode{X} a non-implicit-lifetime class +}; + +X* make_x() { + // The call to \tcode{std::malloc} cannot implicitly create an object of type \tcode{X} + // because \tcode{X} is not an implicit-lifetime class. + X* p = (X*)std::malloc(sizeof(struct X)); + p->a = 1; // undefined behavior, no set of objects give us defined behavior + return p; +} +\end{codeblock} +\end{example} +\begin{example} +\begin{codeblock} +#include + +struct X { + int a; +}; + +struct Y { + int x; +}; + +Y* make_y() { + X* p1 = (X*)std::malloc(sizeof(struct X)); // Object \#1 + p1->a = 1; + Y* p2 = (Y*)p1; + p2->x = 2; // undefined behavior, \tcode{p2} points to an in-lifetime object of type \tcode{X}, + // which is not similar to \tcode{Y}\iref{expr.ref}. + return p2; +} +\end{codeblock} +\end{example} + +\ubdescription{basic.align.object.alignment} + +\pnum +All instances of a type must be created in storage that meets the alignment +requirement of that type. + +\pnum +\begin{example} +\begin{codeblock} +struct alignas(4) S {}; + +void make_misaligned() +{ + alignas(S) char s[sizeof(S) + 1]; + new (&s+1) S(); // undefined behavior, \tcode{\&s+1} will yield a pointer to + // a \tcode{char} which is $1$ byte away from an address with + // an alignment of $4$ and so cannot have an alignment of $4$. +} +\end{codeblock} +\end{example} + +\ubdescription{lifetime.outside.pointer.delete} + +\pnum +For a pointer pointing to an object outside of its lifetime, behavior is +undefined if the object will be or was of a class type with a non-trivial destructor +and the pointer is used as the operand of a \grammarterm{delete-expression}. + +\pnum +\begin{example} +\begin{codeblock} +struct S { + float f = 0; + ~S() {} +}; + +void f() { + S* p = new S; + p->~S(); + delete p; // undefined behavior, operand of \tcode{delete}, lifetime has ended and \tcode{S} + // has a non-trivial destructor +} +\end{codeblock} +\end{example} + +\ubdescription{lifetime.outside.pointer.member} + +\pnum +For a pointer pointing to an object outside of its lifetime, behavior is +undefined if the pointer is used to access a non-static data member or call a +non-static member function of the object. + +\pnum +\begin{example} +\begin{codeblock} +struct S { + float f = 0; +}; + +float f() { + S s; + S* p = &s; + s.~S(); + return p->f; // undefined behavior, accessing non-static data member after + // end of lifetime +} +\end{codeblock} +\end{example} + +\ubdescription{lifetime.outside.pointer.virtual} + +\pnum +For a pointer pointing to an object outside of its lifetime, behavior is +undefined if the pointer is implicitly converted\iref{conv.ptr} to a pointer +to a virtual base class (or base class of a virtual base class). + +\pnum +\begin{example} +\begin{codeblock} +struct B {}; +struct D : virtual B {}; +void f() { + D d; + D* p = &d; + d.~D(); + B* b = p; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{lifetime.outside.pointer.dynamic.cast} + +\pnum +For a pointer pointing to an object outside of its lifetime, behavior is +undefined if the pointer is used as the operand of a +\tcode{dynamic_cast}\iref{expr.dynamic.cast}. + +\pnum +\begin{example} +\begin{codeblock} +struct B { virtual ~B() = default; }; +struct D : B {}; +void f() +{ + D d; + B* bp = &d; + d.~D(); + D* dp = dynamic_cast(bp); // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{lifetime.outside.glvalue.access} + +\pnum +Behavior is undefined if a glvalue referring to an object outside of its +lifetime is used to access the object. + +\pnum +\begin{example} +\begin{codeblock} +void f() { + int x = int{10}; + using T = int; + x.~T(); + int y = x; // undefined behavior, glvalue used to access the + // object after the lifetime has ended +} +\end{codeblock} +\end{example} + +\ubdescription{lifetime.outside.glvalue.member} + +\pnum +Behavior is undefined if a glvalue referring to an object outside of its +lifetime is used to call a non-static member function of the object. + +\pnum +\begin{example} +\begin{codeblock} +struct A { + void f() {} +}; + +void f() { + A a; + a.~A(); + a.f(); // undefined behavior, glvalue used to access a non-static member + // function after the lifetime has ended +} +\end{codeblock} +\end{example} + +\ubdescription{lifetime.outside.glvalue.virtual} + +\pnum +Behavior is undefined if a glvalue referring to an object outside of its +lifetime is bound to a reference to a virtual base class. + +\pnum +\begin{example} +\begin{codeblock} +struct B {}; +struct D : virtual B { +}; + +void f() { + D d; + d.~D(); + B& b = d; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{lifetime.outside.glvalue.dynamic.cast} + +\pnum +Behavior is undefined if a glvalue referring to an object outside of its +lifetime is used as the operand of a +\keyword{dynamic_cast} or as the operand of \keyword{typeid}. + +\pnum +\begin{example} +\begin{codeblock} +struct B { virtual ~B(); }; +struct D : virtual B {}; + +void f() { + D d; + B& br = d; + d.~D(); + D& dr = dynamic_cast(br); // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{original.type.implicit.destructor} + +\pnum +The behavior is undefined if +a non-trivial implicit destructor call +occurs when the type of the object inhabiting the associated storage +is not the original type associated with that storage. + +\pnum +\begin{example} +\begin{codeblock} +class T {}; + +struct B { + ~B(); +}; + +void h() { + B b; + new (&b) T; +} // undefined behavior at block exit +\end{codeblock} +\end{example} + +\ubdescription{creating.within.const.complete.obj} + +\pnum +Creating a new object within the storage that a const complete object with static, thread, or automatic +storage duration occupies, or within the storage that such a const object used to occupy before its lifetime +ended, results in undefined behavior + +\pnum +\begin{example} +\begin{codeblock} +struct B { + B(); + ~B(); +}; + +const B b; + +void h() { + b.~B(); + new (const_cast(&b)) const B; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{basic.indet.value} + +\pnum +When the result of an evaluation is +an indeterminate value +(but not just an erroneous value) +the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +void g() { + int x [[ indeterminate ]]; + int y = x; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{basic.stc.alloc.dealloc.constraint} + +\pnum +If the behavior of an allocation or deallocation function does not satisfy the semantic constraints +specified +in~\ref{basic.stc.dynamic.allocation} and~\ref{basic.stc.dynamic.deallocation}. +the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +#include +void* operator new(std::size_t sz) { + if (sz == 0) + return nullptr; // undefined behavior, should return non-null pointer + + return std::malloc(1); // undefined behavior, if successful should return allocation with + // length in bytes is at least as large as the requested size +} +void operator delete(void* ptr) noexcept { + throw 0; // undefined behavior, terminates by throwing an exception +} +\end{codeblock} +\end{example} + +\ubdescription{basic.stc.alloc.dealloc.throw} + +\pnum +If a call to a deallocation function +terminates by throwing an exception +the behavior is undefined. +\pnum +\begin{example} +\begin{codeblock} +struct X { + void operator delete(void*) noexcept(false) { throw "oops"; } +}; +void f() +{ + X* x = new X(); + delete x; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{basic.stc.alloc.zero.dereference} + +\pnum +The pointer returned when invoking an allocation function with a size of zero +cannot be dereferenced. + +\pnum +\begin{example} +\begin{codeblock} +void test() +{ + char* c = static_cast(operator new(0z)); + c[0] = 'X'; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{basic.compound.invalid.pointer} + +\pnum +Indirection or +the invocation of a deallocation function +with a pointer value referencing storage +that has been freed +has undefined behavior. +(Most other uses of such a pointer have +implementation-defined behavior.) + +\pnum +\begin{example} +\begin{codeblock} +void f() +{ + int *x = new int{5}; + delete x; + int y = *x; // undefined behavior + delete x; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{intro.execution.unsequenced.modification} + +\pnum +If a side effect on a +memory location\iref{intro.memory} is unsequenced relative to either another side effect on the same memory location or +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. + +\pnum +\begin{example} +\begin{codeblock} +void g(int i) { + i = 7, i++, i++; // \tcode{i} becomes 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 +} +\end{codeblock} +\end{example} + +\ubdescription{intro.races.data} + +\pnum +The execution of a program contains a data race if it contains two potentially concurrent conflicting actions, +at least one of which is not atomic, and neither happens before the other, except for the special case for +signal handlers described in~\ref{intro.races}. Any such data race results in undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +int count = 0; +auto f = [&] { count++; }; +std::thread t1{f}, t2{f}, t3{f}; +// undefined behavior \tcode{t1}, \tcode{t2} and \tcode{t3} have a data race on access of variable \tcode{count} +\end{codeblock} +\end{example} + +\ubdescription{intro.progress.stops} + +\pnum +The behavior is undefined if a thread of execution that has not terminated stops +making execution steps. + +\pnum +\begin{example} +\begin{codeblock} +bool stop() { return false; } + +void busy_wait_thread() { + while (!stop()); // undefined behavior, thread makes no progress but the loop +} // is not trivial because \tcode{stop()} is not a constant expression + +int main() { + std::thread t(busy_wait_thread); + t.join(); +} +\end{codeblock} +\end{example} + +\ubdescription{basic.start.main.exit.during.destruction} + +\pnum +If \tcode{std::exit} is called to +end a program during the destruction of an object with static or thread storage duration, the program has +undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +#include + +struct Exiter { + ~Exiter() { std::exit(0); } +}; + +Exiter ex; + +int main() {} +// undefined behavior when destructor of static variable \tcode{ex} is called it will call \tcode{std::exit} +\end{codeblock} +\end{example} + +\ubdescription{basic.start.term.use.after.destruction} + +\pnum +If a function contains a block-scope object of static or thread storage duration that has been destroyed and the +function is called during the destruction of an object with static or thread storage duration, the program has +undefined behavior if the flow of control passes through the definition of the previously destroyed block-scope +object. Likewise, the behavior is undefined if the block-scope object is used indirectly (i.e., through a pointer) +after its destruction. + +\pnum +\begin{example} +\begin{codeblock} +struct A {}; +void f() { + static A a; +} + +struct B { + B() { f(); } +}; +struct C { + ~C() { f(); } +}; + +C c; +B b; // call to \tcode{f()} in constructor begins lifetime of \tcode{a} + +int main() {} +// undefined behavior, static objects are destructed in reverse order, in this case \tcode{a} then \tcode{b} and +// finally \tcode{c}. When the destructor of \tcode{c} is called, it calls \tcode{f()} which passes through the definition of +// previously destroyed block-scope object +\end{codeblock} +\end{example} + +\rSec1[ub.expr]{\ref{expr}: Expressions} + +\ubdescription{expr.expr.eval} + +\pnum +If during the evaluation of an expression, the result is not mathematically defined or not in the range of +representable values for its type, the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +#include +int main() { + // Assuming $32$-bit \tcode{int} the range of values are: $-2,147,483,648$ to $2,147,483,647$ + int x1 = std::numeric_limits::max() + 1; + // undefined behavior, $2,147,483,647 + 1$ is not representable as an int + int x2 = std::numeric_limits::min() / -1; + // undefined behavior, $-2,147,483,648 / -1$ is not representable as an int +} +\end{codeblock} +\end{example} + +\ubdescription{expr.basic.lvalue.strict.aliasing.violation} + +\pnum +If a program attempts to access\iref{defns.access} the stored value of an object +whose dynamic type is $T$ through a glvalue whose type is not +similar\iref{conv.qual} to $T$ (or its corresponding signed or unsigned types) +the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +int foo(float* f, int* i) { + *i = 1; + *f = 0.f; // undefined behavior, glvalue is not similar to \tcode{int} + + return *i; +} + +int main() { + int x = 0; + + x = foo(reinterpret_cast(&x), &x); +} +\end{codeblock} +\end{example} + +\ubdescription{expr.basic.lvalue.union.initialization} + +\pnum +If a program invokes a defaulted copy/move constructor or +defaulted copy/move assignment +operator of a union with an argument that is not an object of a similar type +within its lifetime, the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +union U { int x; }; +void f() +{ + char u[sizeof(U)]; + U o = reinterpret_cast(u); // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{expr.type.reference.lifetime} + +\pnum +Evaluating a reference when an equivalent use of a pointer denoting the same object +would be invalid has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +void g() +{ + int* ip = new int(5); + int& i = *ip; + delete ip; + i; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{conv.lval.valid.representation} + +\pnum +Performing an +lvalue-to-rvalue conversion +on an object whose +value representation +is not valid for its type +has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +bool f() { + bool b = true; + char c = 42; + memcpy(&b, &c, 1); + return b; // undefined behavior if \tcode{42} is not a valid value representation for \keyword{bool} +} +\end{codeblock} +\end{example} + +\ubdescription{conv.double.out.of.range} + +\pnum +Converting a floating point value to a type that cannot represent the value is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +#include + +int main() { + // Assuming 32-bit int, 32-bit float and 64-bit double + double d2 = std::numeric_limits::max(); + float f = d2; // undefined behavior on systems where the range of representable values + // of \tcode{float} is \tcode{[-max,+max]}; on systems where the range of representable + // values are \tcode{[-inf,+inf]} this would not be undefined behavior + int i = d2; // undefined behavior, the max value of \tcode{double} is not representable as \tcode{int} +} +\end{codeblock} +\end{example} + +\ubdescription{conv.fpint.int.not.represented} + +\pnum +When converting a value of integer or unscoped enumeration type to a +floating-point type, if the value is not representable in the destination type +it is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +int main() { + unsigned long long x2 = -1; + float f = x2; // undefined behavior on systems where \tcode{f} does not include + // a representation for infinity and the maximum value for \tcode{float} + // is smaller than the maximum value for \tcode{unsigned long long}. +} +\end{codeblock} +\end{example} + +\ubdescription{conv.fpint.float.not.represented} + +\pnum +When converting a floating-point value to an integer type, if +the value is not representable in the destination type it is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +#include + +int main() { + // Assuming $32$-bit \tcode{int} the range of values are: $-2,147,483,648$ to + // $2,147,483,647$ Assuming $32$-bit \tcode{float} and $64$-bit \tcode{double} + double d = (double)std::numeric_limits::max() + 1; + int x1 = d; // undefined behavior $2,147,483,647 + 1$ is not representable as \tcode{int} +} +\end{codeblock} +\end{example} + +\ubdescription{conv.ptr.virtual.base} + +\pnum +Converting +a pointer to a derived class \tcode{D} +to +a pointer to a virtual base class \tcode{B} +that does not point to +a valid object +within its lifetime +has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +struct B {}; +struct D : virtual B {}; +void f() +{ + D ds[1]; + B* b = &ds[1]; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{conv.member.missing.member} + +\pnum +The conversion of +a pointer to a member of a base class +to a pointer to member of a derived class +that could not contain that member +has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +struct B {}; +struct D1 : B { int d1; }; +struct D2 : B {}; +void f() +{ + int (D1::*pd1) = &D1::d1; + int (B::*pb) = static_cast(pd1); + int (D2::*pd2) = pb; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{expr.call.different.type} + +\pnum +Calling a function through an expression whose +function type is not call-compatible with +the function type of the called +function's definition results in undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +using f_float = int (*)(float); +using f_int = int (*)(int); + +int f1(float) { return 10; } + +int f2(int) { return 20; } + +int main() { + return reinterpret_cast(f1)(20); // undefined behavior, the function type of the expression + // is different from the called functions definition +} +\end{codeblock} +\end{example} + +\ubdescription{expr.ref.member.not.similar} + +\pnum +In a class member access \tcode{E1.E2}, +where \tcode{E2} is a non-static member, +the behavior is undefined +if \tcode{E1} refers to an object +whose type is not similar +to the type of the expression \tcode{E1}. + +\pnum +\begin{example} +\begin{codeblock} +struct A { int i; }; +struct B { int j; }; +A a; +int x = reinterpret_cast(a).j; // undefined behavior +\end{codeblock} +\end{example} + +\ubdescription{expr.dynamic.cast.pointer.lifetime} + +\pnum +Evaluating a \keyword{dynamic_cast} on a non-null pointer that points to +an object (of polymorphic type) of the wrong type or to an object +not within its lifetime has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +struct B { virtual ~B(); }; +void f() { + B bs[1]; + B* dp = dynamic_cast(bs+1); // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{expr.dynamic.cast.glvalue.lifetime} + +\pnum +Evaluating a \keyword{dynamic_cast} on a reference that +denotes an object (of polymorphic type) of the wrong type or an object +not within its lifetime has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +struct B { virtual ~B(); }; +void f() { + B bs[1]; + B& dr = dynamic_cast(bs[1]); // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{expr.static.cast.base.class} + +\pnum +A glvalue of type \tcode{B} +can be cast to the type ``reference to \tcode{D}'' +if \tcode{B} is a base class of \tcode{D}, +otherwise the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +struct B {}; +struct D1 : B {}; +struct D2 : B {}; + +void f() { + D1 d; + B &b = d; + static_cast(b); // undefined behavior, base class object of type \tcode{D1} not \tcode{D2} +} +\end{codeblock} +\end{example} + +\ubdescription{expr.static.cast.enum.outside.range} + +\pnum +If the enumeration type does not have a fixed underlying +type, the value is unchanged if the original value is within the range of the enumeration values\iref{dcl.enum}, and +otherwise, the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +enum A { e1 = 1, e2 }; + +void f() { + enum A a = static_cast(4); // undefined behavior, $4$ is not within the range of enumeration values +} +\end{codeblock} +\end{example} + +\ubdescription{expr.static.cast.fp.outside.range} + +\pnum +An explicit conversion of a +floating-point value that is outside the range of the +target type has undefined behavior. + +\pnum +\begin{example} +If \tcode{float} does not adhere to \IsoFloatUndated{} +and cannot represent positive infinity, +a sufficiently large \tcode{double} value will be +outside the (finite) range of \tcode{float}. +\begin{codeblock} +void f() { + double d = FLT_MAX; + d *= 16; + float f = static_cast(d); // undefined behavior. +} +\end{codeblock} +\end{example} + +\ubdescription{expr.static.cast.downcast.wrong.derived.type} + +\pnum +Casting from a pointer to a base class to a pointer to a derived class +when there is no enclosing object of that derived class at the +specified location has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +struct B {}; +struct D1 : B {}; +struct D2 : B {}; + +void f() { + B *bp = new D1; + static_cast(bp); // undefined behavior, base class object of type \tcode{D1} not \tcode{D2} +} +\end{codeblock} +\end{example} + +\ubdescription{expr.static.cast.does.not.contain.original.member} + +\pnum +A +pointer to member of derived class D +can be cast to +a pointer to member of base class B +(with certain restrictions on cv qualifiers) +as long as B contains the original member, +or is a base or derived class of the class +containing the original member; +otherwise the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +struct A { + char c; +}; + +struct B { + int i; +}; + +struct D : A, B {}; + +int main() { + char D::*p1 = &D::c; + char B::*p2 = static_cast(p1); // undefined behavior, \tcode{B} does not contain the original member \tcode{c} +} +\end{codeblock} +\end{example} + +\ubdescription{expr.unary.dereference} + +\pnum +Dereferencing a pointer that does not point to an object or function +has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +int f() +{ + int *p = nullptr; + return *p; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{expr.new.non.allocating.null} + +\pnum +If the allocation +function is a non-allocating form\iref{new.delete.placement} that returns null, the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +#include +[[nodiscard]] void* operator new(std::size_t size, void* ptr) noexcept { + return nullptr; // undefined behavior, should return non-null pointer +} +\end{codeblock} +\end{example} +\begin{example} +\begin{codeblock} +#include + +struct A { + int x; +}; + +int main() { + char *p = nullptr; + A *a = new (p) A; // undefined behavior, non-allocating new returning nullptr +} +\end{codeblock} +\end{example} + +\ubdescription{expr.delete.mismatch} + +\pnum +Using array delete on the result of a single object new expression is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +int* x = new int; +delete[] x; // undefined behavior, allocated using single object new expression +\end{codeblock} +\end{example} + +\ubdescription{expr.delete.array.mismatch} + +\pnum +Using single object delete on the result of an array new expression is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +int* x = new int[10]; +delete x; // undefined behavior, allocated using array new expression +\end{codeblock} +\end{example} + +\ubdescription{expr.delete.dynamic.type.differ} + +\pnum +If the static type of the object to be deleted is different from its dynamic +type and the selected deallocation function is not a destroying operator delete, the static type +shall be a base class of the dynamic type of the object to be deleted and the static type shall have a virtual +destructor or the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +struct B { + int a; +}; + +struct D : public B { + int b; +}; + +void f() { + B* b = new D; + delete b; // undefined behavior, no virtual destructor +} +\end{codeblock} +\end{example} + +\ubdescription{expr.delete.dynamic.array.dynamic.type.differ} + +\pnum +In an array delete expression, if the dynamic type of the object to be deleted differs from its static type, the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +struct B { + virtual ~B(); + void operator delete[](void*, std::size_t); +}; + +struct D : B { + void operator delete[](void*, std::size_t); +}; + +void f(int i) { + D* dp = new D[i]; + delete[] dp; // uses \tcode{D::operator delete[](void*, std::size_t)} + B* bp = new D[i]; + delete[] bp; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{expr.mptr.oper.not.contain.member} + +\pnum +Abbreviating \grammarterm{pm-expression}.*\grammarterm{cast-expression} as \tcode{E1.*E2}, \tcode{E1} is called the object expression. If the dynamic type +of \tcode{E1} does not contain the member to which \tcode{E2} refers, the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +struct B {}; +struct D : B { + int x; +}; + +void f() { + B *b = new B; + D *d = static_cast(b); + int D::*p = &D::x; + (*d).*p = 1; // undefined behavior, dynamic type \tcode{B} does not contain \tcode{x} +} +\end{codeblock} +\end{example} + +\ubdescription{expr.mptr.oper.member.func.null} + +\pnum +If the second operand in a \tcode{.*} expression is the null +member pointer value\iref{conv.mem}, the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +struct S { + int f(); +}; + +void f() { + S cs; + int (S::*pm)() = nullptr; + (cs.*pm)(); // undefined behavior, the second operand is null +} +\end{codeblock} +\end{example} + +\ubdescription{expr.mul.div.by.zero} + +\pnum +Division by zero is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +int main() { + int x = 1 / 0; // undefined behavior, division by zero + double d = 1.0 / 0.0; // undefined behavior on systems where the range of + // representable values of \tcode{double} is \tcode{[-max,+max]}, on systems where + // representable values are \tcode{[-inf,+inf]} this would not be undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{expr.mul.representable.type.result} + +\pnum +If the +quotient \tcode{a/b} +is representable in the type of the result, +\tcode{(a/b)*b + a\%b} +is equal to \tcode{a}; +otherwise, the behavior of both \tcode{a/b} and \tcode{a\%b} is undefined. + +\pnum +\begin{example} +\begin{codeblock} +#include + +int main() { + int x = std::numeric_limits::min() / -1; + // Assuming \tcode{LP64} $-2,147,483,648$ which when divided by $-1$ + // gives us $2,147,483,648$ which is not representable by \tcode{int} +} +\end{codeblock} +\end{example} + +\ubdescription{expr.add.out.of.bounds} + +\pnum +Creating an out of bounds pointer is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +static const int arrs[10]{}; + +int main() { + const int *y = arrs + 11; // undefined behavior, creating an out of bounds pointer +} +\end{codeblock} +\end{example} + +\begin{example} +\begin{codeblock} +static const int arrs[10][10]{}; + +int main() { + const int(*y)[10] = arrs + 11; // undefined behavior, creating an out of bounds pointer. + // We can't treat arrs as-if it was a pointer to $100$ \tcode{int}, +} +\end{codeblock} +\end{example} + +\ubdescription{expr.add.sub.diff.pointers} + +\pnum +Subtracting pointers that are not part of the same array is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +#include +void f() { + int x[2]; + int y[2]; + int* p1 = x; + int* p2 = y; + std::ptrdiff_t off = p1 - p2; // undefined behavior, \tcode{p1} and \tcode{p2} point to different arrays +} +\end{codeblock} +\end{example} + +\ubdescription{expr.add.not.similar} + +\pnum +For addition or subtraction of two expressions P and Q, +if P or Q have type ``pointer to cv T'', where T and the array +element type are not similar\iref{conv.rval}, the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +struct S { + int i; +}; + +struct T : S { + double d; +}; + +void f(const S* s, std::size_t count) { + for (const S* end = s + count; s != end; ++s) { + @\commentellip@ + } +} + +int main() { + T test[5]; + f(test, 5); +} +\end{codeblock} +\end{example} + +\ubdescription{expr.shift.neg.and.width} + +\pnum +Shifting by a negative amount or equal or greater than the bit-width of a type is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +int y = 1 << -1; // undefined behavior, shift is negative + +static_assert(sizeof(int) == 4 && CHAR_BIT == 8); +int y1 = 1 << 32; // undefined behavior, shift is equal to the bit width of \tcode{int} +int y2 = 1 >> 32; // undefined behavior, shift is equal to the bit width of \tcode{int} +\end{codeblock} +\end{example} + +\ubdescription{expr.assign.overlap} + +\pnum +Overlap in the storage between the source and destination may result in undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +int x = 1; +char* c = reinterpret_cast(&x); +x = *c; // undefined behavior, source overlaps storage of destination +\end{codeblock} +\end{example} + +\rSec1[ub.stmt]{\ref{stmt}: Statements} + +\ubdescription{stmt.return.flow.off} + +\pnum +Flowing off the end of a function other +than main or a coroutine results in undefined behavior if the return type +is not \cv{}~\keyword{void}. + +\pnum +\begin{example} +\begin{codeblock} +int f(int x) { + if (x) + return 1; + // undefined behavior if \tcode{x} is \tcode{0} +} + +void b() { + int x = f(0); // undefined behavior, using \tcode{0} as an argument will cause \tcode{f(...)} to flow + // off the end without a \tcode{return} statement +} +\end{codeblock} +\end{example} + +\ubdescription{stmt.return.coroutine.flow.off} + +\pnum +Flowing off the end of a coroutine function body +that does not return void +has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +#include +#include +#include +#include + +class resumable { + public: + struct promise_type; + using coro_handle = std::coroutine_handle; + resumable(coro_handle handle) : handle_(handle) { assert(handle); } + resumable(resumable&) = delete; + resumable(resumable&&) = delete; + bool resume() { + if (not handle_.done()) + handle_.resume(); + return not handle_.done(); + } + ~resumable() { handle_.destroy(); } + const char* return_val(); + + private: + coro_handle handle_; +}; + +struct resumable::promise_type { + using coro_handle = std::coroutine_handle; + const char* string_; + auto get_return_object() { return coro_handle::from_promise(*this); } + auto initial_suspend() { return std::suspend_always(); } + auto final_suspend() noexcept { return std::suspend_always(); } + void unhandled_exception() { std::terminate(); } + void return_value(const char* string) { string_ = string; } +}; + +const char* resumable::return_val() { + return handle_.promise().string_; +} + +resumable foo() { + std::cout << "Hello" << std::endl; + co_await std::suspend_always(); + // undefined behavior, falling off the end of coroutine that does not return \tcode{void} +} + +int main() { + resumable res = foo(); + while (res.resume()) + ; + std::cout << res.return_val() << std::endl; +} +\end{codeblock} +\end{example} + +\ubdescription{stmt.dcl.local.static.init.recursive} + +\pnum +If control re-enters the declaration recursively while the +variable is being initialized, the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +int foo(int i) { + static int s = foo(2 * i); // undefined behavior, recursive call + return i + 1; +} +\end{codeblock} +\end{example} + +\rSec1[ub.dcl]{\ref{dcl}: Declarations} + +\ubdescription{dcl.type.cv.modify.const.obj} + +\pnum +Any attempt to modify a const object during its lifetime results in +undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +const int* ciq = new const int(3); // initialized as required +int* iq = const_cast(ciq); // cast required +*iq = 4; // undefined behavior, modifies a \tcode{const} object +\end{codeblock} +\end{example} + +\ubdescription{dcl.type.cv.access.volatile} + +\pnum +If an attempt is made to +access an object defined with a volatile-qualified type through the use of a non-volatile glvalue, the behavior +is undefined + +\pnum +\begin{example} +\begin{codeblock} +volatile int x = 0; +int& y = const_cast(x); +std::cout << y; // undefined behavior, accessing volatile through non-volatile glvalue +\end{codeblock} +\end{example} + +\ubdescription{dcl.ref.incompatible.function} + +\pnum +Initializing a reference to a function +with a value that is a function +that is not call-compatible\iref{expr.call} +with the type of the reference +has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +void f(float x); +void (&g)(int) = reinterpret_cast(f); // undefined behavior +\end{codeblock} +\end{example} + +\ubdescription{dcl.ref.incompatible.type} + +\pnum +Initializing a reference to an object +with a value that is not +type-accessible\iref{basic.lval} through +the type of the reference +has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +float g; +int& i = reinterpret_cast(g); // undefined behavior +\end{codeblock} +\end{example} + +\ubdescription{dcl.ref.uninitialized.reference} + +\pnum +Evaluating a reference +prior to initializing that +reference has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +extern int &ir1; +int i2 = ir1; // undefined behavior, \tcode{ir1} not yet initialized +int i3 = 17; +int &ir1 = i3; +\end{codeblock} +\end{example} + +\ubdescription{dcl.fct.def.coroutine.resume.not.suspended} + +\pnum +Invoking a resumption member function for a coroutine that is not suspended results in undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +#include + +struct minig { + struct promise_type { + int val; + minig get_return_object() { return {*this}; } + constexpr suspend_always initial_suspend() noexcept { return {}; } + constexpr suspend_always final_suspend() noexcept { return {}; } + constexpr void return_void() noexcept {} + [[noreturn]] void unhandled_exception() noexcept { throw; } + suspend_always yield_value(int v) noexcept { + val = v; + return {}; + } + }; + using HDL = coroutine_handle; + HDL coro; + minig(promise_type& p) : coro(HDL::from_promise(p)) {} + ~minig() { coro.destroy(); } + bool move_next() { + coro.resume(); + return !coro.done(); + } + int current_value() { return coro.promise().val; } +}; + +static minig f(int n) { + for (int i = 0; i < n; ++i) + co_yield i; +} + +int main() { + auto g = f(10); + int sum = 0; + while (g.move_next()) + sum += g.current_value(); + + g.move_next(); // undefined behavior, will call \tcode{coro.resume()} but \tcode{final_suspend} + // has already returned, even though it returned \tcode{suspend_always} + + return sum; +} +\end{codeblock} +\end{example} + +\ubdescription{dcl.fct.def.coroutine.destroy.not.suspended} + +\pnum +Invoking destroy() on a coroutine that is not suspended is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +#include + +struct minig { + struct promise_type { + int val; + minig get_return_object() { return {*this}; } + constexpr suspend_always initial_suspend() noexcept { return {}; } + constexpr suspend_always final_suspend() noexcept { return {}; } + constexpr void return_void() noexcept {} + [[noreturn]] void unhandled_exception() { throw; } + suspend_always yield_value(int v) noexcept { + val = v; + return {}; + } + }; + using HDL = coroutine_handle; + HDL coro; + minig(promise_type& p) : coro(HDL::from_promise(p)) {} + ~minig() { coro.destroy(); } + bool move_next() { + coro.resume(); + return !coro.done(); + } + int current_value() { + // this coroutine is not suspended therefore a call to destroy is undefined behavior + coro.destroy(); + return coro.promise().val; + } +}; + +static minig f(int n) { + for (int i = 0; i < n; ++i) + co_yield i; +} + +int main() { + auto g = f(10); + int sum = 0; + while (g.move_next()) + sum += g.current_value(); + + return sum; +} +\end{codeblock} +\end{example} + +\ubdescription{dcl.attr.assume.false} + +\pnum +If an assumption expression would not evaluate to true at the point where it +appears the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +int g(int x) { + [[assume(x >= 0)]]; + return x/32; +} + +int f() { + return g(-10); // undefined behavior, assumption in \tcode{g} is \tcode{false} +} +\end{codeblock} +\end{example} + +\ubdescription{dcl.attr.noreturn.eventually.returns} + +\pnum +If a function f is called where f was previously declared with the \tcode{noreturn} attribute and f eventually returns, +the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +[[noreturn]] void f(int i) { + if (i > 0) + throw "positive"; +} + +int main() { + f(0); // undefined behavior, returns from a \tcode{[[noreturn]]} function +} +\end{codeblock} +\end{example} + +\rSec1[ub.class]{\ref{class}: Classes} + +\ubdescription{class.dtor.no.longer.exists} + +\pnum +Once a destructor is invoked for an object, +the object's lifetime has ended; +the behavior is undefined if the +destructor is invoked for an object whose lifetime has ended. + +\pnum +\begin{example} +\begin{codeblock} +struct A { + ~A() {} +}; + +int main() { + A a; + a.~A(); +} // undefined behavior, lifetime of \tcode{a} already ended before implicit destructor +\end{codeblock} +\end{example} + +\ubdescription{class.abstract.pure.virtual} + +\pnum +Calling a pure virtual function from a constructor or destructor in an abstract class is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +struct B { + virtual void f() = 0; + B() { + f(); // undefined behavior, \tcode{f} is pure virtual and we are calling from the constructor + } +}; + +struct D : B { + void f() override; +}; +\end{codeblock} +\end{example} + +\ubdescription{class.base.init.mem.fun} + +\pnum +It is undefined behavior to call a member function before all the \grammarterm{mem-initializer}s for base classes have completed. + +\pnum +\begin{example} +\begin{codeblock} +class A { +public: + A(int); +}; + +class B : public A { + int j; + +public: + int f(); + B() + : A(f()), // undefined behavior, calls member function but base \tcode{A} not yet initialized + j(f()) {} // defined, bases are all initialized +}; + +class C { +public: + C(int); +}; + +class D : public B, C { + int i; + +public: + D() + : C(f()), // undefined behavior, calls member function but base \tcode{C} not yet initialized + i(f()) {} // defined, bases are all initialized +}; +\end{codeblock} +\end{example} + +\ubdescription{class.cdtor.before.ctor} + +\pnum +For an object with a non-trivial constructor, referring to any non-static member or base class of the object +before the constructor begins execution results in undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +struct W { + int j; +}; +struct X : public virtual W {}; +struct Y { + int *p; + X x; + Y() : p(&x.j) { // undefined behavior, \tcode{x} is not yet constructed + } +}; +\end{codeblock} +\end{example} + +\ubdescription{class.cdtor.after.dtor} + +\pnum +For an object with a non-trivial destructor, +referring to any non-static member or base class of the object +after the destructor finishes execution +has undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +struct X { + int i; + ~X(); // non-trivial +}; +X& g() +{ + static X x; + return x; +} +void f() +{ + X* px = &g(); + px->~X(); + int j = px->i; // undefined behavior +} +\end{codeblock} +\end{example} + +\ubdescription{class.cdtor.convert.pointer} + +\pnum +When converting a pointer to a base class of an object, +construction must have started and destruction must not have finished otherwise +this is undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +struct A { }; +struct B : virtual A { }; +struct C : B { }; +struct D : virtual A { D(A*); }; +struct X { X(A*); }; + +struct E : C, D, X { + E() : D(this), // undefined behavior, upcast from \tcode{E*} to \tcode{A*} might use path \tcode{E*} $\rightarrow$ \tcode{D*} $\rightarrow$ \tcode{A*} + // but \tcode{D} is not constructed + + // ``\tcode{D((C*)this)}\!'' would be defined, \tcode{E*} $\rightarrow$ \tcode{C*} is defined because \tcode{E()} has started, + // and \tcode{C*} $\rightarrow$ \tcode{A*} is defined because \tcode{C} is fully constructed + + X(this) {} // defined, upon construction of \tcode{X}, \tcode{C/B/D/A} sublattice is fully constructed +}; +\end{codeblock} +\end{example} + +\ubdescription{class.cdtor.form.pointer} + +\pnum +When forming a pointer to +a direct non-static member of a class, +construction must have started +and destruction must not have finished +otherwise the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +struct A { + int i = 0; +}; +struct B { + int *p; + A a; + B() : p(&a.i) {} // undefined behavior +}; +\end{codeblock} +\end{example} + +\ubdescription{class.cdtor.virtual.not.x} + +\pnum +When a virtual function is called directly or indirectly from a constructor or from a destructor, +including during the construction or destruction of the class's non-static data members, and the object to +which the call applies is the object (call it \tcode{x}) under construction or destruction, the function called is the +final overrider in the constructor's or destructor's class and not one overriding it in a more-derived class. +If the virtual function call uses an explicit class member access\iref{expr.ref} and the object expression refers +to the complete object of \tcode{x} or one of that object's base class subobjects but not \tcode{x} or one of its base class +subobjects, the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +struct V { + virtual void f(); + virtual void g(); +}; + +struct A : virtual V { + virtual void f(); +}; + +struct B : virtual V { + virtual void g(); + B(V *, A *); +}; + +struct D : A, B { + virtual void f(); + virtual void g(); + D() : B((A *)this, this) {} +}; + +B::B(V *v, A *a) { + f(); // calls \tcode{V::f}, not \tcode{A::f} + g(); // calls \tcode{B::g}, not \tcode{D::g} + v->g(); // \tcode{v} is base of \tcode{B}, the call is defined, calls \tcode{B::g} + a->f(); // undefined behavior, \tcode{a}'s type not a base of \tcode{B} +} +\end{codeblock} +\end{example} + +\ubdescription{class.cdtor.typeid} + +\pnum +If the operand of \tcode{typeid} refers to +the object under construction or destruction and the static type of the operand is neither the constructor or +destructor's class nor one of its bases, the behavior is undefined. + +\pnum +\begin{example} +\begin{codeblock} +struct V { + virtual void f(); +}; + +struct A : virtual V {}; +struct B : virtual V { + B(V *, A *); +}; + +struct D : A, B { + D() : B((A *)this, this) {} +}; + +B::B(V *v, A *a) { + typeid(*this); // \tcode{std::type_info} for \tcode{B} + typeid(*v); // defined, \tcode{*v} has type \tcode{V}, a base of \tcode{B} yields \tcode{std::type_info} for \tcode{B} + typeid(*a); // undefined behavior, type \tcode{A} not a base of \tcode{B} +} +\end{codeblock} +\end{example} + +\ubdescription{class.cdtor.dynamic.cast} + +\pnum +If the operand of the +\tcode{dynamic_cast} refers to the object under construction or destruction and the static type of the operand is +not a pointer to or object of the constructor or destructor's own class or one of its bases, the \tcode{dynamic_cast} +results in undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +struct V { + virtual void f(); +}; + +struct A : virtual V {}; +struct B : virtual V { + B(V *, A *); +}; + +struct D : A, B { + D() : B((A *)this, this) {} +}; + +B::B(V *v, A *a) { + dynamic_cast(v); // defined, \tcode{v} of type \tcode{V*}, \tcode{V} base of \tcode{B} results in \tcode{B*} + dynamic_cast(a); // undefined behavior, \tcode{a} has type \tcode{A*}, \tcode{A} not a base of \tcode{B} +} +\end{codeblock} +\end{example} + +\rSec1[ub.temp]{\ref{temp}: Templates} + +\ubdescription{temp.inst.inf.recursion} + +\pnum +The result of an infinite recursion in template instantiation is undefined. + +\pnum +\begin{example} +\begin{codeblock} +template +class X { + X *p; // OK + X a; // implicit instantiation of \tcode{X} requires + // the implicit instantiation of \tcode{X} which requires + // the implicit instantiation of \tcode{X} which \ldots +}; + +int main() { + X x; // undefined behavior, instantiation will kick off infinite recursion +} +\end{codeblock} +\end{example} + +\rSec1[ub.except]{\ref{except}: Exception handling} + +\ubdescription{except.handle.handler.ctor.dtor} + +\pnum +Referring to any non-static member or base class of an object in the handler for a \grammarterm{function-try-block} of a +constructor or destructor for that object results in undefined behavior. + +\pnum +\begin{example} +\begin{codeblock} +#include + +struct A { + A() try : x(0 ? 1 : throw 1) { + } catch (int) { + std::cout << "y: " << y << std::endl; // undefined behavior, referring to non-static member y in + // the handler of function-try-block + } + int x; + int y = 42; +}; +\end{codeblock} +\end{example} diff --git a/source/utilities.tex b/source/utilities.tex index 402dbea68d..f3e66eb429 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -3577,7 +3577,7 @@ template constexpr bool operator>=(const optional&, const U&); template constexpr bool operator>=(const T&, const optional&); template - requires (!@\exposconcept{is-derived-from-optional}@) && @\libconcept{three_way_comparable_with}@ + requires (!@\exposconcept{is-derived-from-optional}@) && @\libconcept{three_way_comparable_with}@ constexpr compare_three_way_result_t operator<=>(const optional&, const U&); @@ -4795,7 +4795,6 @@ using iterator = @\impdefnc@; // present only if \tcode{T} is an object type other than an array // of unknown bound; see~\ref{optional.ref.iterators} - public: // \ref{optional.ref.ctor}, constructors constexpr optional() noexcept = default; constexpr optional(nullopt_t) noexcept : optional() {} @@ -5870,7 +5869,7 @@ \indexlibrarymember{operator<=>}{optional}% \begin{itemdecl} template - requires (!@\exposconcept{is-derived-from-optional}@) && @\libconcept{three_way_comparable_with}@ + requires (!@\exposconcept{is-derived-from-optional}@) && @\libconcept{three_way_comparable_with}@ constexpr compare_three_way_result_t operator<=>(const optional& x, const U& v); \end{itemdecl} @@ -9925,7 +9924,6 @@ template constexpr explicit expected(unexpect_t, initializer_list, Args&&...); - // \ref{expected.void.dtor}, destructor constexpr ~expected(); @@ -12649,7 +12647,7 @@ \indexlibrarymember{operator()}{plus<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) + std::forward(u)); + -> decltype(std::forward(t) + std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -12691,7 +12689,7 @@ \indexlibrarymember{operator()}{minus<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) - std::forward(u)); + -> decltype(std::forward(t) - std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -12733,7 +12731,7 @@ \indexlibrarymember{operator()}{multiplies<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) * std::forward(u)); + -> decltype(std::forward(t) * std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -12775,7 +12773,7 @@ \indexlibrarymember{operator()}{divides<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) / std::forward(u)); + -> decltype(std::forward(t) / std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -12817,7 +12815,7 @@ \indexlibrarymember{operator()}{modulus<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) % std::forward(u)); + -> decltype(std::forward(t) % std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -12859,7 +12857,7 @@ \indexlibrarymember{operator()}{negate<>}% \begin{itemdecl} template constexpr auto operator()(T&& t) const - -> decltype(-std::forward(t)); + -> decltype(-std::forward(t)); \end{itemdecl} \begin{itemdescr} @@ -12927,7 +12925,7 @@ \indexlibrarymember{operator()}{equal_to<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) == std::forward(u)); + -> decltype(std::forward(t) == std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -12969,7 +12967,7 @@ \indexlibrarymember{operator()}{not_equal_to<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) != std::forward(u)); + -> decltype(std::forward(t) != std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -13011,7 +13009,7 @@ \indexlibrarymember{operator()}{greater<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) > std::forward(u)); + -> decltype(std::forward(t) > std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -13053,7 +13051,7 @@ \indexlibrarymember{operator()}{less<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) < std::forward(u)); + -> decltype(std::forward(t) < std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -13095,7 +13093,7 @@ \indexlibrarymember{operator()}{greater_equal<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) >= std::forward(u)); + -> decltype(std::forward(t) >= std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -13137,7 +13135,7 @@ \indexlibrarymember{operator()}{less_equal<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) <= std::forward(u)); + -> decltype(std::forward(t) <= std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -13446,7 +13444,7 @@ \indexlibrarymember{operator()}{logical_and<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) && std::forward(u)); + -> decltype(std::forward(t) && std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -13488,7 +13486,7 @@ \indexlibrarymember{operator()}{logical_or<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) || std::forward(u)); + -> decltype(std::forward(t) || std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -13530,7 +13528,7 @@ \indexlibrarymember{operator()}{logical_not<>}% \begin{itemdecl} template constexpr auto operator()(T&& t) const - -> decltype(!std::forward(t)); + -> decltype(!std::forward(t)); \end{itemdecl} \begin{itemdescr} @@ -13581,7 +13579,7 @@ \indexlibrarymember{operator()}{bit_and<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) & std::forward(u)); + -> decltype(std::forward(t) & std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -13623,7 +13621,7 @@ \indexlibrarymember{operator()}{bit_or<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) | std::forward(u)); + -> decltype(std::forward(t) | std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -13665,7 +13663,7 @@ \indexlibrarymember{operator()}{bit_xor<>}% \begin{itemdecl} template constexpr auto operator()(T&& t, U&& u) const - -> decltype(std::forward(t) ^ std::forward(u)); + -> decltype(std::forward(t) ^ std::forward(u)); \end{itemdecl} \begin{itemdescr} @@ -13706,7 +13704,7 @@ \indexlibrarymember{operator()}{bit_not<>}% \begin{itemdecl} template constexpr auto operator()(T&& t) const - -> decltype(~std::forward(t)); + -> decltype(~std::forward(t)); \end{itemdecl} \begin{itemdescr} diff --git a/tools/check-output.sh b/tools/check-output.sh index 8b23f65141..280fc1d423 100755 --- a/tools/check-output.sh +++ b/tools/check-output.sh @@ -36,7 +36,7 @@ rm -f tmp.txt # Find bad labels grep newlabel `ls *.aux | grep -v std.aux` | awk -F '{' '{ print $2 }' | - sed 's/}//g' | sed 's/^tab://;s/fig://;s/eq://;s/idx.*\..//' | + sed 's/}//g' | sed 's/^tab://;s/fig://;s/eq://;s/ub://;s/ubx://;s/ifndr://;s/ifndrx://;s/idx.*\..//' | grep -v '^[a-z.0-9]*$' | sed 's/^\(.*\)$/bad label \1/' | fail || failed=1 diff --git a/tools/check-source.sh b/tools/check-source.sh index ffd7c94d47..b473511598 100755 --- a/tools/check-source.sh +++ b/tools/check-source.sh @@ -242,7 +242,7 @@ done | fail 'hanging paragraph' || failed=1 # Subclauses without siblings -for f in $texfiles; do +for f in `ls $texfiles | grep -v ub.tex | grep -v ifndr.tex`; do sed -n '/^\\rSec/{=;p;}' $f | # prefix output with filename and line sed '/^[0-9]\+$/{N;s/\n/:/;}' | sed "s/.*/$f:&/" |