From 41c2bcb2d2a76013431e059d17b773ad1288a1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Fri, 26 Aug 2022 17:42:08 +0100 Subject: [PATCH 001/257] Update configuration for building working drafts after N4917. --- source/config.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/config.tex b/source/config.tex index f5acf7b1e1..358c759819 100644 --- a/source/config.tex +++ b/source/config.tex @@ -1,8 +1,8 @@ %!TEX root = std.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{N4917} -\newcommand{\prevdocno}{N4910} +\newcommand{\docno}{Dxxxx} +\newcommand{\prevdocno}{N4917} \newcommand{\cppver}{202002L} %% Release date From 7772de4408db8122431169156ea230803cb6bf56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 6 Sep 2022 19:47:21 +0100 Subject: [PATCH 002/257] [headers] Reflow table after header additions --- source/lib-intro.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 590670d176..0216d77049 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1079,8 +1079,8 @@ \tcode{} \\ \tcode{} \\ \tcode{} \\ -\columnbreak \tcode{} \\ +\columnbreak \tcode{} \\ \tcode{} \\ \tcode{} \\ @@ -1103,8 +1103,8 @@ \tcode{} \\ \tcode{} \\ \tcode{} \\ -\tcode{} \\ \columnbreak +\tcode{} \\ \tcode{} \\ \tcode{} \\ \tcode{} \\ From fd027ea3387ca4031cb6639ddfb19a66b163716c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Mon, 7 Jun 2021 17:24:23 +0100 Subject: [PATCH 003/257] [actions] Extend GitHub action to run also on MacOS --- .github/workflows/check.yml | 30 +++++++++++++++++++++++++++--- README.rst | 2 +- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4135d1d0f2..1bd460753c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -11,22 +11,45 @@ defaults: jobs: run-checks: - name: Run checks - runs-on: ubuntu-22.04 + name: Run checks on ${{matrix.cfg.name}} + runs-on: ${{matrix.cfg.os}} + + strategy: + matrix: + cfg: + - { name: 'Linux', os: 'ubuntu-22.04' } + - { name: 'MacOS', os: 'macos-12' } steps: - name: checkout uses: actions/checkout@v2 + - name: install GNU tools + if: matrix.cfg.os == 'macos-12' + run: | + brew install gnu-sed + echo "/usr/local/opt/gnu-sed/libexec/gnubin" >> ${GITHUB_PATH} + - name: check-source.sh run: ../tools/check-source.sh - name: update-apt-cache + if: matrix.cfg.os == 'ubuntu-22.04' run: sudo apt-get update - - name: install + - name: install (Linux) + if: matrix.cfg.os == 'ubuntu-22.04' run: sudo apt-get install latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended lmodern + - name: install (MacOS, Part 1/2) + if: matrix.cfg.os == 'macos-12' + run: | + brew install basictex + eval "$(/usr/libexec/path_helper)" + echo "PATH=${PATH}" >> ${GITHUB_ENV} + sudo tlmgr update --self + sudo tlmgr install latexmk isodate substr relsize ulem fixme rsfs extract layouts enumitem l3packages l3kernel imakeidx splitindex xstring + - name: make run: make quiet @@ -34,6 +57,7 @@ jobs: run: ../tools/check-output.sh - name: upload PDF + if: matrix.cfg.os == 'ubuntu-22.04' uses: actions/upload-artifact@v2 with: name: draft-snapshot diff --git a/README.rst b/README.rst index f8d179c44e..0bef62ee71 100644 --- a/README.rst +++ b/README.rst @@ -24,7 +24,7 @@ Install the `MacTeX distribution `_. If you are on a slow network, you'll want to get the `BasicTeX package `_ instead, then run the following command to install the other packages that the draft requires: - sudo tlmgr install latexmk isodate substr relsize ulem fixme rsfs extract layouts enumitem l3packages l3kernel imakeidx splitindex + sudo tlmgr install latexmk isodate substr relsize ulem fixme rsfs extract layouts enumitem l3packages l3kernel imakeidx splitindex xstring --------------------------------------- Getting Started on Debian-based Systems From 94dc5a7b67719c390349486d4f4bff9fb0689c28 Mon Sep 17 00:00:00 2001 From: "S. B. Tam" Date: Wed, 7 Sep 2022 23:07:57 +0800 Subject: [PATCH 004/257] [expr] Replace `\^` with `\caret` --- source/expressions.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index ec05f026da..f582a61230 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -6720,7 +6720,7 @@ \end{bnf} \pnum -The \tcode{\^} operator groups left-to-right. +The \tcode{\caret} operator groups left-to-right. The operands shall be of integral or unscoped enumeration type. The usual arithmetic conversions\iref{expr.arith.conv} are performed. Given the coefficients $\tcode{x}_i$ and $\tcode{y}_i$ @@ -7168,7 +7168,7 @@ Such expressions are deprecated if \tcode{E1} has volatile-qualified type and \placeholder{op} is not one of the bitwise operators -\tcode{|}, \tcode{\&}, \tcode{\^}; see~\ref{depr.volatile.type}. +\tcode{|}, \tcode{\&}, \tcode{\caret}; see~\ref{depr.volatile.type}. For \tcode{+=} and \tcode{-=}, \tcode{E1} shall either have arithmetic type or be a pointer to a possibly cv-qualified completely-defined object type. In all other From 7ef69290c8b7c95d320d59054f7ea96c307bfe03 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Thu, 8 Sep 2022 21:12:34 +0200 Subject: [PATCH 005/257] [check] Add check for \^ and recommend \caret --- tools/check-source.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/check-source.sh b/tools/check-source.sh index db5291587d..eaa42679cb 100755 --- a/tools/check-source.sh +++ b/tools/check-source.sh @@ -73,7 +73,11 @@ grep -n "// not defined" $texfiles | # Use \Cpp{} instead of C++ grep -n '^[^%]*[^{"]C++[^"}]' $texfiles | - fail 'use \Cpp{} instead' || failed=1 + fail 'use \\Cpp{} instead' || failed=1 + +# Use \caret instead of \^ +fgrep -n '\^' $texfiles | + fail 'use \\caret instead' || failed=1 # Use \unicode instead of U+nnnn grep -n 'U+' $texfiles | From 3231e8115e93a24806694c36f1eb2d709fe78f4f Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sun, 12 Jun 2022 15:49:22 +0200 Subject: [PATCH 006/257] [basic.align] Recommend alignment-specifier instead of deprecated library facility --- source/basic.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index f32e82975f..26967cafc6 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -4156,8 +4156,9 @@ \pnum \begin{note} The runtime pointer alignment function\iref{ptr.align} -can be used to obtain an aligned pointer within a buffer; the aligned-storage templates -in the library\iref{meta.trans.other} can be used to obtain aligned storage. +can be used to obtain an aligned pointer within a buffer; +an \grammarterm{alignment-specifier}\iref{dcl.align} +can be used to align storage explicitly. \end{note} \pnum From 37d46b0d41d014febacd9ffe684eb0cf11a5c364 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 7 Jun 2022 16:19:08 +0800 Subject: [PATCH 007/257] [module.reach] Remove redundant module implementation unit declaration --- source/modules.tex | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/modules.tex b/source/modules.tex index 3701762ced..d82d1b0cfc 100644 --- a/source/modules.tex +++ b/source/modules.tex @@ -1048,7 +1048,6 @@ \end{codeblocktu} \begin{codeblocktu}{Translation unit \#5} -module X; import M; B b3; // error: no reachable definition of \tcode{struct B} void g() { f(); } // error: no reachable definition of \tcode{struct B} @@ -1069,7 +1068,6 @@ \end{codeblocktu} \begin{codeblocktu}{Translation unit \#2} -module B; import A; Y y; // OK, definition of \tcode{X} is reachable X x; // error: \tcode{X} not visible to unqualified lookup From 4e2297b8d2543062edf347ec13341a8356f59605 Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Fri, 9 Sep 2022 04:12:51 +0800 Subject: [PATCH 008/257] [thread.stoptoken.syn] "class template", not just "class"; fix spacing (#5799) --- source/threads.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/threads.tex b/source/threads.tex index a383dd8181..51617e1ee0 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -498,9 +498,9 @@ }; inline constexpr nostopstate_t nostopstate{}; - // \ref{stopcallback}, class \tcode{stop_callback} + // \ref{stopcallback}, class template \tcode{stop_callback} template - class stop_callback; + class stop_callback; } \end{codeblock} From 20452e91b30d0a299a03d937f443a81537dc03f2 Mon Sep 17 00:00:00 2001 From: xmh0511 <970252187@qq.com> Date: Fri, 9 Sep 2022 04:54:01 +0800 Subject: [PATCH 009/257] [basic.def.odr] A variable is "named by" an expression (#5534) The previous wording, a variable "whose name appears as [an] expression", is less precise and not well-defined. --- source/basic.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/basic.tex b/source/basic.tex index 26967cafc6..518b697fff 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -440,7 +440,7 @@ \label{term.odr.use}% A variable is named by an expression if the expression is an \grammarterm{id-expression} that denotes it. -A variable \tcode{x} whose name appears as a +A variable \tcode{x} that is named by a potentially-evaluated expression $E$ is \defnx{odr-used}{odr-use} by $E$ unless \begin{itemize} From 7260f30c74eaf670b3f3d33a7571f6c055930cd7 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Fri, 21 Jan 2022 23:27:34 +0100 Subject: [PATCH 010/257] [basic.life] Add cross-reference for union member lifetime --- source/basic.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/basic.tex b/source/basic.tex index 518b697fff..96602e5a7e 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -3358,7 +3358,8 @@ except that if the object is a union member or subobject thereof, its lifetime only begins if that union member is the initialized member in the union\iref{dcl.init.aggr,class.base.init}, -or as described in \ref{class.union} and \ref{class.copy.ctor}, +or as described in +\ref{class.union}, \ref{class.copy.ctor}, and \ref{class.copy.assign}, and except as described in \ref{allocator.members}. The lifetime of an object \placeholder{o} of type \tcode{T} ends when: \begin{itemize} From ba51a5375fa3099e4a85594f2e67d48bc11ec448 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 20 Mar 2017 11:58:33 +0000 Subject: [PATCH 011/257] [rand.req.seedseq] Rephrase in terms of const types not values --- source/numerics.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 514319824d..88e1b149f8 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -1571,9 +1571,9 @@ \tcode{T} is the type named by \tcode{S}'s associated \tcode{result_type}; \item - \tcode{q} is a value of \tcode{S} + \tcode{q} is a value of type \tcode{S} and - \tcode{r} is a possibly const value of \tcode{S}; + \tcode{r} is a value of type \tcode{S} or \tcode{const S}; \item \tcode{ib} and \tcode{ie} are input iterators with an unsigned integer \tcode{value_type} of at least 32 bits; @@ -1584,7 +1584,7 @@ \tcode{ob} is an output iterator; and \item - \tcode{il} is a value of \tcode{initializer_list}. + \tcode{il} is a value of type \tcode{initializer_list}. \end{itemize} From 88e574edc674e85911ea1a5b4e87c07457d97bf1 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 20 Mar 2017 12:23:12 +0000 Subject: [PATCH 012/257] [container.requirements] Rephrase in terms of const types not values --- source/containers.tex | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 7d02506cbe..5672ea1ac6 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -866,7 +866,7 @@ and an \tcode{allocator_type} identical to \tcode{allocator_traits::rebind_alloc} and given an lvalue \tcode{m} of type \tcode{A}, a pointer \tcode{p} of type \tcode{T*}, -an expression \tcode{v} of type (possibly \keyword{const}) \tcode{T}, +an expression \tcode{v} of type \tcode{T} or \tcode{const T}, and an rvalue \tcode{rv} of type \tcode{T}, the following terms are defined. If \tcode{X} is not allocator-aware or is a specialization of \tcode{basic_string}, @@ -2615,7 +2615,7 @@ \tcode{a2} denotes a value of a type with nodes compatible with type \tcode{X} (\tref{container.node.compat}), \item -\tcode{b} denotes a possibly \keyword{const} value of type \tcode{X}, +\tcode{b} denotes a value or type \tcode{X} or \tcode{const X}, \item \tcode{u} denotes the name of a variable being declared, \item @@ -2625,9 +2625,9 @@ \tcode{a_eq} denotes a value of type \tcode{X} when \tcode{X} supports multiple keys, \item -\tcode{a_tran} denotes a possibly \keyword{const} value of type \tcode{X} +\tcode{a_tran} denotes a value of type \tcode{X} or \tcode{const X} when the \grammarterm{qualified-id} -\tcode{X::key_compare::is_transpa\-rent} is valid +\tcode{X::key_compare::is_transparent} is valid and denotes a type\iref{temp.deduct}, \item \tcode{i} and \tcode{j} @@ -2654,7 +2654,7 @@ \item \tcode{k} denotes a value of type \tcode{X::key_type}, and \item -\tcode{c} denotes a possibly \keyword{const} value of type \tcode{X::key_compare}; +\tcode{c} denotes a value of type \tcode{X::key_compare} or \tcode{const X::key_compare}; \item \tcode{kl} is a value such that \tcode{a} is partitioned\iref{alg.sorting} with respect to \tcode{c(x, kl)}, @@ -4114,7 +4114,7 @@ \tcode{a2} denotes a value of a type with nodes compatible with type \tcode{X} (\tref{container.node.compat}), \item -\tcode{b} denotes a possibly const value of type \tcode{X}, +\tcode{b} denotes a value of type \tcode{X} or \tcode{const X}, \item \tcode{a_uniq} denotes a value of type \tcode{X} when \tcode{X} supports unique keys, @@ -4122,7 +4122,7 @@ \tcode{a_eq} denotes a value of type \tcode{X} when \tcode{X} supports equivalent keys, \item -\tcode{a_tran} denotes a possibly const value of type \tcode{X} +\tcode{a_tran} denotes a value of type \tcode{X} or \tcode{const X} when the \grammarterm{qualified-id}s \tcode{X::key_equal::is_transparent} and \tcode{X::hasher::is_transparent} @@ -4151,9 +4151,9 @@ \item \tcode{k} denotes a value of type \tcode{key_type}, \item -\tcode{hf} denotes a possibly const value of type \tcode{hasher}, +\tcode{hf} denotes a value of type \tcode{hasher} or \tcode{const hasher}, \item -\tcode{eq} denotes a possibly const value of type \tcode{key_equal}, +\tcode{eq} denotes a value of type \tcode{key_equal} or \tcode{const key_equal}, \item \tcode{ke} is a value such that \begin{itemize} @@ -4177,7 +4177,7 @@ \item \tcode{z} denotes a value of type \tcode{float}, and \item -\tcode{nh} denotes a non-const rvalue of type \tcode{X::node_type}. +\tcode{nh} denotes an rvalue of type \tcode{X::node_type}. \end{itemize} \pnum From 1b016d12829103bc0488fd0ee127846ca77d1241 Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Tue, 13 Sep 2022 18:50:31 +0800 Subject: [PATCH 013/257] [algorithm.syn] Indentation fixes (#5823) --- source/algorithms.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 1a4d627698..1b47c0b20b 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -1108,7 +1108,7 @@ class Proj1 = identity, class Proj2 = identity, @\libconcept{indirect_equivalence_relation}@, Proj1>, projected, Proj2>> - Pred = ranges::equal_to> + Pred = ranges::equal_to> constexpr bool is_permutation(R1&& r1, R2&& r2, Pred pred = {}, Proj1 proj1 = {}, Proj2 proj2 = {}); } @@ -1267,15 +1267,15 @@ constexpr auto fold_left_first(R&& r, F f); template<@\libconcept{bidirectional_iterator}@ I, @\libconcept{sentinel_for}@ S, class T, - @\exposconcept{indirectly-binary-right-foldable}@ F> + @\exposconcept{indirectly-binary-right-foldable}@ F> constexpr auto fold_right(I first, S last, T init, F f); template<@\libconcept{bidirectional_range}@ R, class T, - @\exposconcept{indirectly-binary-right-foldable}@> F> + @\exposconcept{indirectly-binary-right-foldable}@> F> constexpr auto fold_right(R&& r, T init, F f); template<@\libconcept{bidirectional_iterator}@ I, @\libconcept{sentinel_for}@ S, - @\exposconcept{indirectly-binary-right-foldable}@, I> F> + @\exposconcept{indirectly-binary-right-foldable}@, I> F> requires @\libconcept{constructible_from}@, iter_reference_t> constexpr auto fold_right_last(I first, S last, F f); @@ -1290,7 +1290,7 @@ using fold_left_first_with_iter_result = in_value_result; template<@\libconcept{input_iterator}@ I, @\libconcept{sentinel_for}@ S, class T, - @\exposconcept{indirectly-binary-left-foldable}@ F> + @\exposconcept{indirectly-binary-left-foldable}@ F> constexpr @\seebelow@ fold_left_with_iter(I first, S last, T init, F f); template<@\libconcept{input_range}@ R, class T, @\exposconcept{indirectly-binary-left-foldable}@> F> From 547987d9d203bb7f1f18297ca438ccb18d8fe612 Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Wed, 14 Sep 2022 14:39:16 +0800 Subject: [PATCH 014/257] [range.chunk.view.input, range.slide.view] Remove unused name in the deduction guide --- source/ranges.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 82e0257ed3..99d02dc276 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -11740,7 +11740,7 @@ }; template - chunk_view(R&& r, range_difference_t) -> chunk_view>; + chunk_view(R&&, range_difference_t) -> chunk_view>; } \end{codeblock} @@ -12702,7 +12702,7 @@ }; template - slide_view(R&& r, range_difference_t) -> slide_view>; + slide_view(R&&, range_difference_t) -> slide_view>; } \end{codeblock} From 6070381686cb64b7939af548bc890d18f15768c6 Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Fri, 16 Sep 2022 05:58:55 +0800 Subject: [PATCH 015/257] [ranges] Make indentation consistent (#5811) --- source/ranges.tex | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 99d02dc276..9495ac5498 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1695,16 +1695,16 @@ } constexpr auto cbegin() { - return ranges::cbegin(@\exposid{derived}@()); + return ranges::cbegin(@\exposid{derived}@()); } constexpr auto cbegin() const requires @\libconcept{range}@ { - return ranges::cbegin(@\exposid{derived}@()); + return ranges::cbegin(@\exposid{derived}@()); } constexpr auto cend() { - return ranges::cend(@\exposid{derived}@()); + return ranges::cend(@\exposid{derived}@()); } constexpr auto cend() const requires @\libconcept{range}@ { - return ranges::cend(@\exposid{derived}@()); + return ranges::cend(@\exposid{derived}@()); } constexpr explicit operator bool() @@ -4481,9 +4481,9 @@ constexpr V base() && { return std::move(@\exposid{base_}@); } constexpr auto begin() requires (!@\exposconcept{simple-view}@) - { return move_iterator(ranges::begin(@\exposid{base_}@)); } + { return move_iterator(ranges::begin(@\exposid{base_}@)); } constexpr auto begin() const requires @\libconcept{range}@ - { return move_iterator(ranges::begin(@\exposid{base_}@)); } + { return move_iterator(ranges::begin(@\exposid{base_}@)); } constexpr auto end() requires (!@\exposconcept{simple-view}@) { if constexpr (@\libconcept{common_range}@) { @@ -7039,28 +7039,28 @@ @\exposid{iterator}@() requires @\libconcept{default_initializable}@<@\exposid{OuterIter}@> = default; constexpr @\exposid{iterator}@(@\exposid{iterator}@ i) - requires Const && @\libconcept{convertible_to}@, @\exposid{OuterIter}@> && - @\libconcept{convertible_to}@, @\exposid{InnerIter}@> && - @\libconcept{convertible_to}@, @\exposid{PatternIter}@>; + requires Const && @\libconcept{convertible_to}@, @\exposid{OuterIter}@> && + @\libconcept{convertible_to}@, @\exposid{InnerIter}@> && + @\libconcept{convertible_to}@, @\exposid{PatternIter}@>; constexpr decltype(auto) operator*() const; constexpr @\exposid{iterator}@& operator++(); constexpr void operator++(int); constexpr @\exposid{iterator}@ operator++(int) - requires @\exposid{ref-is-glvalue}@ && @\libconcept{forward_iterator}@<@\exposid{OuterIter}@> && - @\libconcept{forward_iterator}@<@\exposid{InnerIter}@>; + requires @\exposid{ref-is-glvalue}@ && @\libconcept{forward_iterator}@<@\exposid{OuterIter}@> && + @\libconcept{forward_iterator}@<@\exposid{InnerIter}@>; constexpr @\exposid{iterator}@& operator--() - requires @\exposid{ref-is-glvalue}@ && @\libconcept{bidirectional_range}@<@\exposid{Base}@> && - @\exposconcept{bidirectional-common}@<@\exposid{InnerBase}@> && @\exposconcept{bidirectional-common}@<@\exposid{PatternBase}@>; + requires @\exposid{ref-is-glvalue}@ && @\libconcept{bidirectional_range}@<@\exposid{Base}@> && + @\exposconcept{bidirectional-common}@<@\exposid{InnerBase}@> && @\exposconcept{bidirectional-common}@<@\exposid{PatternBase}@>; constexpr @\exposid{iterator}@ operator--(int) - requires @\exposid{ref-is-glvalue}@ && @\libconcept{bidirectional_range}@<@\exposid{Base}@> && - @\exposconcept{bidirectional-common}@<@\exposid{InnerBase}@> && @\exposconcept{bidirectional-common}@<@\exposid{PatternBase}@>; + requires @\exposid{ref-is-glvalue}@ && @\libconcept{bidirectional_range}@<@\exposid{Base}@> && + @\exposconcept{bidirectional-common}@<@\exposid{InnerBase}@> && @\exposconcept{bidirectional-common}@<@\exposid{PatternBase}@>; friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) - requires @\exposid{ref-is-glvalue}@ && @\libconcept{equality_comparable}@<@\exposid{OuterIter}@> && - @\libconcept{equality_comparable}@<@\exposid{InnerIter}@>; + requires @\exposid{ref-is-glvalue}@ && @\libconcept{equality_comparable}@<@\exposid{OuterIter}@> && + @\libconcept{equality_comparable}@<@\exposid{InnerIter}@>; friend constexpr decltype(auto) iter_move(const @\exposid{iterator}@& x) { using rvalue_reference = common_reference_t< @@ -7070,7 +7070,7 @@ } friend constexpr void iter_swap(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) - requires @\libconcept{indirectly_swappable}@<@\exposid{InnerIter}@, @\exposid{PatternIter}@> { + requires @\libconcept{indirectly_swappable}@<@\exposid{InnerIter}@, @\exposid{PatternIter}@> { visit(ranges::iter_swap, x.@\exposid{inner_it_}@, y.@\exposid{inner_it_}@); } }; @@ -11197,9 +11197,9 @@ \begin{codeblock} namespace std::ranges { template<@\libconcept{forward_range}@ V, @\libconcept{move_constructible}@ F, size_t N> - requires @\libconcept{view}@ && (N > 0) && is_object_v && - @\libconcept{regular_invocable}@, N)...> && - @\exposconcept{can-reference}@, N)...>> + requires @\libconcept{view}@ && (N > 0) && is_object_v && + @\libconcept{regular_invocable}@, N)...> && + @\exposconcept{can-reference}@, N)...>> class adjacent_transform_view : public view_interface> { @\exposidnc{movable-box}@ @\exposid{fun_}@; // \expos adjacent_view @\exposid{inner_}@; // \expos @@ -13803,7 +13803,7 @@ requires @\libconcept{random_access_range}@<@\exposid{Base}@>; friend constexpr auto operator<=>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) - requires @\libconcept{random_access_range}@<@\exposid{Base}@> && @\libconcept{three_way_comparable}@>; + requires @\libconcept{random_access_range}@<@\exposid{Base}@> && @\libconcept{three_way_comparable}@>; friend constexpr @\exposid{iterator}@ operator+(const @\exposid{iterator}@& x, difference_type n) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; From c774ac4a072efd41e478d72ad57a3dae8b0946ff Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Fri, 16 Sep 2022 17:46:10 +0200 Subject: [PATCH 016/257] [basic.life] Change "complete const object" to "const, complete object" (#5818) "Complete object" is a defined term (https://eel.is/c++draft/basic#def:complete_object). Putting "const" in the middle of that leaves it ambiguous whether we are referring to a const-qualified "complete object", or to a complete const object with some other meaning of "complete" (such as "with a complete type"). --- source/basic.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index 96602e5a7e..f95469332f 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -3516,7 +3516,7 @@ \item $o_1$ and $o_2$ are of the same type (ignoring the top-level cv-qualifiers), and -\item $o_1$ is not a complete const object, and +\item $o_1$ is not a const, complete object, and \item neither $o_1$ nor $o_2$ is a potentially-overlapping subobject\iref{intro.object}, and @@ -3587,7 +3587,7 @@ \end{example} \pnum -Creating a new object within the storage that a const complete +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. From 787ea7683982ed58b1a8bf7bbfb7c77f8d227dce Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Fri, 16 Sep 2022 21:24:15 +0200 Subject: [PATCH 017/257] [diagnostics] Remove 'shall', use 'recommended practice' --- source/diagnostics.tex | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/diagnostics.tex b/source/diagnostics.tex index bb70eb8ff3..b75be934c1 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -493,7 +493,7 @@ \begin{note} The intent is to remain in close alignment with the POSIX standard. \end{note} -A separate \tcode{errno} value shall be provided for each thread. +A separate \tcode{errno} value is provided for each thread. \rSec2[cerrno.syn]{Header \tcode{} synopsis} @@ -674,8 +674,10 @@ the operating system or other low-level application program interfaces. \pnum -Components described in \ref{syserr} shall not change the value of +Components described in \ref{syserr} do not change the value of \tcode{errno}\iref{errno}. + +\recommended Implementations should leave the error states provided by other libraries unchanged. @@ -821,7 +823,7 @@ \end{codeblock} \pnum -The value of each \tcode{enum errc} constant shall be the same as +The value of each \tcode{enum errc} enumerator is the same as the value of the \libheader{cerrno} macro shown in the above synopsis. Whether or not the \libheader{system_error} implementation exposes the \libheader{cerrno} macros is unspecified. From 99ca2e6769b027378d3b015957ca3804974d027e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Fri, 9 Sep 2022 00:13:31 +0100 Subject: [PATCH 018/257] [std] Remove redundant hyperref parameters --- source/std.tex | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/std.tex b/source/std.tex index 040decb135..b58362bcb1 100644 --- a/source/std.tex +++ b/source/std.tex @@ -34,9 +34,7 @@ \hypersetup{pdftitle={C++ Working Draft}, pdfsubject={ISO/IEC JTC1 SC22 WG21, C++}, pdfcreator={Thomas K\"{o}ppe}, - bookmarks=true, bookmarksnumbered=true, - pdfpagelabels=true, pdfpagemode=UseOutlines, pdfstartview=FitH, linktocpage=true, From 9a005c04b91ffa9b92e6a57a03419091f365bc9b Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Fri, 16 Sep 2022 21:57:46 +0200 Subject: [PATCH 019/257] [func.bind.isplace] Add cross-reference to [func.bind.place] --- source/utilities.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index df39cb6a9b..7eadc05577 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -11634,7 +11634,8 @@ \pnum The class template \tcode{is_placeholder} can be used to detect the standard placeholders -\tcode{_1}, \tcode{_2}, and so on. The function template \tcode{bind} uses +\tcode{_1}, \tcode{_2}, and so on\iref{func.bind.place}. +The function template \tcode{bind} uses \tcode{is_placeholder} to detect placeholders. \pnum From 7bd72a7671d9bee0eed11578e325460bcf7fa5a1 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Fri, 16 Sep 2022 22:09:23 +0200 Subject: [PATCH 020/257] [vector.bool.pspc] Index vector::reference --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index 5672ea1ac6..6053ad0e0d 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -9146,7 +9146,7 @@ using const_reverse_iterator = std::reverse_iterator; // bit reference - class reference { + class @\libmember{reference}{vector}@ { friend class vector; constexpr reference() noexcept; public: From f68d6428f27d5cd722e713262d8986489484ae02 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Fri, 16 Sep 2022 22:18:36 +0200 Subject: [PATCH 021/257] [over.best.ics.general] Split long paragraph --- source/overloading.tex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/overloading.tex b/source/overloading.tex index a43a964b5c..741c11e8c3 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -2051,6 +2051,8 @@ to \tcode{A}. \end{example} + +\pnum When the parameter has a class type and the argument expression has the same type, the implicit conversion sequence is an identity conversion. When the parameter has a class type and the argument expression has a @@ -2058,11 +2060,13 @@ derived-to-base \indextext{conversion!derived-to-base}% conversion from the derived class to the base class. +A derived-to-base conversion has Conversion rank\iref{over.ics.scs}. \begin{note} There is no such standard conversion; this derived-to-base conversion exists only in the description of implicit conversion sequences. \end{note} -A derived-to-base conversion has Conversion rank\iref{over.ics.scs}. + +\pnum When the parameter is the implicit object parameter of a static member function, the implicit conversion sequence is a standard conversion sequence that is neither better nor worse than any other standard conversion sequence. From 1383e97e21d6d10ac210344d66ab715cfc0f747a Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 15 Sep 2022 15:38:58 +0100 Subject: [PATCH 022/257] [ranges.syn] Make get overloads freestanding These were moved to the synopsis after the P1642 changes to mark nearly everything in the synopsis freestanding, so they were not marked. --- source/ranges.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 9495ac5498..3c3af67a5b 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -140,15 +140,15 @@ template requires ((N == 0 && @\libconcept{copyable}@) || N == 1) - constexpr auto get(const subrange& r); + constexpr auto get(const subrange& r); // freestanding template requires (N < 2) - constexpr auto get(subrange&& r); + constexpr auto get(subrange&& r); // freestanding } namespace std { - using ranges::get; + using ranges::get; // freestanding } namespace std::ranges { From c70087afe980f9ec339f088babde575e04e185d7 Mon Sep 17 00:00:00 2001 From: languagelawyer <38548419+languagelawyer@users.noreply.github.com> Date: Sat, 17 Sep 2022 02:29:45 +0500 Subject: [PATCH 023/257] [expr.add] Move note, add example (#4778) The original note wasn't quite in the right place. It is moved and made more concrete. In the original place of the note we now put a more immediately relevant example. --- source/expressions.tex | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index f582a61230..04909d496c 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -6234,6 +6234,11 @@ $i - j$ of \tcode{x} if $0 \le i - j \le n$. \item Otherwise, the behavior is undefined. \end{itemize} +\begin{note} +Adding a value other than $0$ or $1$ +to a pointer to a base class subobject, a member subobject, +or a complete object results in undefined behavior. +\end{note} \pnum \indextext{\idxcode{ptrdiff_t}!implementation-defined type of}% @@ -6265,10 +6270,14 @@ 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. -\begin{note} -In particular, a pointer to a base class cannot be used for -pointer arithmetic when the array contains objects of a derived class type. -\end{note} +\begin{example} +\begin{codeblock} +int arr[5] = {1, 2, 3, 4, 5}; +unsigned int *p = reinterpret_cast(arr + 1); +unsigned int k = *p; // OK, value of \tcode{k} is $2$\iref{conv.lval} +unsigned int *q = p + 1; // undefined behavior: \tcode{p} points to an \tcode{int}, not an \tcode{unsigned int} object +\end{codeblock} +\end{example} \rSec2[expr.shift]{Shift operators} From 6000c29e5b9547bf457f4461fd538670144ad88c Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sat, 17 Sep 2022 10:05:19 +0200 Subject: [PATCH 024/257] [format.string.std] Clarify location of 0x prefix for pointers --- source/utilities.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index 7eadc05577..b181bb267b 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -14640,7 +14640,7 @@ \begin{codeblock} to_chars(first, last, reinterpret_cast(value), 16) \end{codeblock} -with the prefix \tcode{0x} added to the output; +with the prefix \tcode{0x} inserted immediately before the output of \tcode{to_chars}; otherwise, implementation-defined. \\ \end{floattable} From 858f4725a2417609bb4c0b274e32805a6c6bd227 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sat, 17 Sep 2022 08:48:09 +0200 Subject: [PATCH 025/257] [func.bind] Index 10 placeholders --- source/utilities.tex | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/source/utilities.tex b/source/utilities.tex index b181bb267b..05388fc895 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -11633,6 +11633,17 @@ \end{codeblock} \pnum +\indexlibraryglobal{placeholders}% +\indexlibrary{1@\tcode{_1}}% +\indexlibrary{2@\tcode{_2}}% +\indexlibrary{3@\tcode{_3}}% +\indexlibrary{4@\tcode{_4}}% +\indexlibrary{5@\tcode{_5}}% +\indexlibrary{6@\tcode{_6}}% +\indexlibrary{7@\tcode{_7}}% +\indexlibrary{8@\tcode{_8}}% +\indexlibrary{9@\tcode{_9}}% +\indexlibrary{10@\tcode{_10}}% The class template \tcode{is_placeholder} can be used to detect the standard placeholders \tcode{_1}, \tcode{_2}, and so on\iref{func.bind.place}. The function template \tcode{bind} uses @@ -11768,6 +11779,15 @@ \indexlibraryglobal{placeholders}% \indexlibrary{1@\tcode{_1}}% +\indexlibrary{2@\tcode{_2}}% +\indexlibrary{3@\tcode{_3}}% +\indexlibrary{4@\tcode{_4}}% +\indexlibrary{5@\tcode{_5}}% +\indexlibrary{6@\tcode{_6}}% +\indexlibrary{7@\tcode{_7}}% +\indexlibrary{8@\tcode{_8}}% +\indexlibrary{9@\tcode{_9}}% +\indexlibrary{10@\tcode{_10}}% \begin{codeblock} namespace std::placeholders { // M is the \impldef{number of placeholders for bind expressions} number of placeholders From 718873b512d0687143bbfa00e18edfb0a8b164ce Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sat, 17 Sep 2022 08:56:36 +0200 Subject: [PATCH 026/257] [expr.prim.lambda.capture] Cross-reference [basic.def.odr] for 'odr-usable' --- source/expressions.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/expressions.tex b/source/expressions.tex index 04909d496c..fa655634a5 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -2391,7 +2391,7 @@ \end{itemize} If an expression potentially references a local entity -within a scope in which it is odr-usable, +within a scope in which it is odr-usable\iref{basic.def.odr}, and the expression would be potentially evaluated if the effect of any enclosing \keyword{typeid} expressions\iref{expr.typeid} were ignored, the entity is said to be \defnx{implicitly captured}{capture!implicit} From 6a98fd8c1f9ea79961b78f731637ba9fe9d52218 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sat, 17 Sep 2022 09:05:57 +0200 Subject: [PATCH 027/257] [thread.thread.this] Clarify this_thread::get_id --- source/threads.tex | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/threads.tex b/source/threads.tex index 51617e1ee0..bedcd41846 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -1969,10 +1969,11 @@ \begin{itemdescr} \pnum \returns -An object of type \tcode{thread::id} that uniquely identifies the current thread of -execution. No other thread of execution has this id and this thread of execution -always has this id. The object returned does not compare equal to a default constructed -\tcode{thread::id}. +An object of type \tcode{thread::id} +that uniquely identifies the current thread of execution. +Every invocation from this thread of execution returns the same value. +The object returned does not compare equal to +a default-constructed \tcode{thread::id}. \end{itemdescr} \indexlibrarymember{yield}{this_thread}% From b758ecadbea4860568bee2421b2e2e64aa1a19f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Fri, 16 Sep 2022 22:20:01 +0100 Subject: [PATCH 028/257] [expected] Change stable label from "ctor" to "cons", add xref --- source/utilities.tex | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 05388fc895..1b1613fdf6 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -6917,6 +6917,7 @@ template class unexpected { public: + // \ref{expected.un.cons}, constructors constexpr unexpected(const unexpected&) = default; constexpr unexpected(unexpected&&) = default; template @@ -6957,7 +6958,7 @@ a cv-qualified type is ill-formed. -\rSec3[expected.un.ctor]{Constructors} +\rSec3[expected.un.cons]{Constructors} \indexlibraryctor{unexpected}% \begin{itemdecl} @@ -7223,7 +7224,7 @@ template using @\libmember{rebind}{expected}@ = expected; - // \ref{expected.object.ctor}, constructors + // \ref{expected.object.cons}, constructors constexpr expected(); constexpr expected(const expected&); constexpr expected(expected&&) noexcept(@\seebelow@); @@ -7336,7 +7337,7 @@ \tcode{E} shall meet the \oldconcept{Destructible} requirements. -\rSec3[expected.object.ctor]{Constructors} +\rSec3[expected.object.cons]{Constructors} \indexlibraryctor{expected}% \begin{itemdecl} @@ -8301,7 +8302,7 @@ template using @\libmember{rebind}{expected}@ = expected; - // \ref{expected.void.ctor}, constructors + // \ref{expected.void.cons}, constructors constexpr expected() noexcept; constexpr expected(const expected&); constexpr expected(expected&&) noexcept(@\seebelow@); @@ -8382,7 +8383,7 @@ \tcode{E} shall meet the requirements of \oldconcept{Destructible} (\tref{cpp17.destructible}). -\rSec3[expected.void.ctor]{Constructors} +\rSec3[expected.void.cons]{Constructors} \indexlibraryctor{expected}% \begin{itemdecl} From 43ed5826c0a41e2fec8cdbedeb85290794c9f4c6 Mon Sep 17 00:00:00 2001 From: "S. B. Tam" Date: Tue, 20 Sep 2022 05:27:23 +0800 Subject: [PATCH 029/257] [futures.errors] Add missing `\tcode` (#5855) --- source/threads.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/threads.tex b/source/threads.tex index bedcd41846..f630d28dce 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -9917,7 +9917,7 @@ A reference to an object of a type derived from class \tcode{error_category}. \pnum -The object's \tcode{default_error_condition} and equivalent virtual functions shall +The object's \tcode{default_error_condition} and \tcode{equivalent} virtual functions shall behave as specified for the class \tcode{error_category}. The object's \tcode{name} virtual function returns a pointer to the string \tcode{"future"}. \end{itemdescr} From 90c4ba5624a655af5c5d8b11c1137d552f3e0a60 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Sun, 18 Sep 2022 14:55:55 -0700 Subject: [PATCH 030/257] [headers] Order `` before `` in the header table Fixes #5853. --- source/lib-intro.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 0216d77049..d072273356 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1138,9 +1138,9 @@ \tcode{} \\ \tcode{} \\ \tcode{} \\ +\tcode{} \\ \tcode{} \\ \tcode{} \\ -\tcode{} \\ \tcode{} \\ \tcode{} \\ \tcode{} \\ From 16f92154ce99a5fef26c53c464e8b14ad5b78d79 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 20 Sep 2022 05:37:31 +0800 Subject: [PATCH 031/257] [c.math.hypot3] Fix mis-transcribed parameter type (#5852) The paper P1467R9 says that the third parameter of `hypot` should be `_floating-point-type_`, but it was erroneously transcribed as `double`. --- source/numerics.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/numerics.tex b/source/numerics.tex index 88e1b149f8..bd86eee84d 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -9401,7 +9401,7 @@ \indexlibrary{\idxcode{hypot}!3-argument form}% \begin{itemdecl} -@\placeholder{floating-point-type}@ hypot(@\placeholder{floating-point-type}@ x, @\placeholder{floating-point-type}@ y, double z); +@\placeholder{floating-point-type}@ hypot(@\placeholder{floating-point-type}@ x, @\placeholder{floating-point-type}@ y, @\placeholder{floating-point-type}@ z); \end{itemdecl} \begin{itemdescr} From db26a63222f10cec871656958b3e296e529df67e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 21 Sep 2022 22:18:51 +0100 Subject: [PATCH 032/257] [support, etc.] New subclause "Arithmetic types". (#5851) The new subclause contains both "integer types" () and "extended floating-point types" (). Previously, the newly added synopsis was somewhat disconnected and out of context. This change removes the stable labels [cstdint] and [cstdint.general]. --- source/lib-intro.tex | 2 +- source/preprocessor.tex | 2 +- source/support.tex | 19 ++++++++++--------- source/xrefdelta.tex | 2 ++ 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index d072273356..c564e23ead 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1441,7 +1441,7 @@ \ref{support.types} & Types & \tcode{} \\ \rowsep \ref{support.limits} & Implementation properties & \tcode{}, \tcode{}, \tcode{}, \tcode{} \\ \rowsep -\ref{cstdint} & Integer types & \tcode{} \\ \rowsep +\ref{cstdint.syn} & Integer types & \tcode{} \\ \rowsep \ref{support.start.term} & Start and termination & \tcode{} \\ \rowsep \ref{support.dynamic} & Dynamic memory management & \tcode{} \\ \rowsep \ref{support.rtti} & Type identification & \tcode{} \\ \rowsep diff --git a/source/preprocessor.tex b/source/preprocessor.tex index af42cac023..8ac266b714 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -474,7 +474,7 @@ in~\ref{support.limits}. For the purposes of this token conversion and evaluation all signed and unsigned integer types act as if they have the same representation as, respectively, -\tcode{intmax_t} or \tcode{uintmax_t}\iref{cstdint}. +\tcode{intmax_t} or \tcode{uintmax_t}\iref{cstdint.syn}. \begin{note} Thus on an implementation where \tcode{std::numeric_limits::max()} is \tcode{0x7FFF} diff --git a/source/support.tex b/source/support.tex index 3ea8ec79c5..e5ecee3876 100644 --- a/source/support.tex +++ b/source/support.tex @@ -26,8 +26,7 @@ \tcode{}, \tcode{} \\ \rowsep \ref{support.limits} & Implementation properties & \tcode{}, \tcode{}, \tcode{}, \tcode{} \\ \rowsep -\ref{cstdint} & Integer types & \tcode{} \\ \rowsep -\ref{stdfloat.syn} & Header \libheader{stdfloat} synopsis & \tcode{} \\ \rowsep +\ref{support.arith.types} & Arithmetic types & \tcode{}, \tcode{} \\ \rowsep \ref{support.start.term} & Start and termination & \tcode{} \\ \rowsep \ref{support.dynamic} & Dynamic memory management & \tcode{} \\ \rowsep \ref{support.rtti} & Type identification & \tcode{} \\ \rowsep @@ -1844,18 +1843,15 @@ \xrefc{5.2.4.2.2} -\rSec1[cstdint]{Integer types} +\rSec1[support.arith.types]{Arithmetic types} -\rSec2[cstdint.general]{General} +\rSec2[cstdint.syn]{Header \tcode{} synopsis} \pnum -The header -\libheaderref{cstdint} +The header \libheader{cstdint} supplies integer types having specified widths, and macros that specify limits of integer types. -\rSec2[cstdint.syn]{Header \tcode{} synopsis} - \indexheader{cstdint}% \indexlibraryglobal{int8_t}% \indexlibraryglobal{int16_t}% @@ -1997,7 +1993,12 @@ respectively. \end{note} -\rSec1[stdfloat.syn]{Header \tcode{} synopsis} +\rSec2[stdfloat.syn]{Header \tcode{} synopsis} + +\pnum +The header \libheader{stdfloat} defines type aliases for +the optional extended floating-point types that are specified in +\ref{basic.extended.fp}. \indexheader{stdfloat}% \begin{codeblock} diff --git a/source/xrefdelta.tex b/source/xrefdelta.tex index f81f0a2eef..6145e0785c 100644 --- a/source/xrefdelta.tex +++ b/source/xrefdelta.tex @@ -100,6 +100,8 @@ % P1467R9 Extended floating-point types and standard names \movedxref{complex.special}{complex.members} +\movedxref{cstdint}{support.arith.types} +\removedxref{cstdint.general} % LWG3659 Consider ATOMIC_FLAG_INIT undeprecation \removedxref{depr.atomics.flag} From d462173b5afdc8506d85e5395f2be19311895f2d Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Mon, 19 Sep 2022 20:42:44 -0700 Subject: [PATCH 033/257] [mdspan.extents.cons] Correct spelling of "dynamic-extents" --- source/containers.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 6053ad0e0d..9aee43a127 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -18583,11 +18583,11 @@ \item If \tcode{N} equals \tcode{dynamic_rank()}, for all $d$ in the range $[0, \tcode{rank_dynamic()})$, -direct-non-list-initializes \tcode{\exposidnc{dynamic-extent}[$d$]} +direct-non-list-initializes \tcode{\exposidnc{dynamic-extents}[$d$]} with \tcode{as_const(exts[$d$])}. \item Otherwise, for all $d$ in the range $[0, \tcode{rank_dynamic()})$, -direct-non-list-initializes \exposidnc{dynamic-ex\-tent}\tcode{[$d$]} +direct-non-list-initializes \exposidnc{dynamic-ex\-tents}\tcode{[$d$]} with \tcode{as_const(exts[\exposidnc{dynamic-index-inv}($d$)])}. \end{itemize} \end{itemdescr} From 14a10ef0948f4709cd1114c489b8e4b919ba7cbc Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Thu, 22 Sep 2022 05:20:44 +0800 Subject: [PATCH 034/257] [unord.general, container.adaptors.general] Fix list of exposition-only alias templates (#5840) --- source/containers.tex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 9aee43a127..a284282131 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -11105,8 +11105,10 @@ \pnum The exposition-only alias templates -\exposid{iter\--value\--type}, \exposid{iter\--key\--type}, -\exposid{iter\--mapped\--type}, and \exposid{iter\--to\--alloc\--type} +\exposid{iter-value-type}, \exposid{iter-key-type}, +\exposid{iter-mapped-type}, \exposid{iter-to\--alloc-type}, +\exposid{range-key-type}, \exposid{range-mapped-type}, +and \exposid{range-to-alloc-type} defined in \ref{associative.general} may appear in deduction guides for unordered containers. \rSec2[unord.map.syn]{Header \tcode{} synopsis} @@ -13141,7 +13143,8 @@ \pnum The exposition-only alias template \exposid{iter-value-type} defined in \ref{sequences.general} and -the exposition-only alias templates \exposid{iter-key-type} and \exposid{iter-mapped-type} +the exposition-only alias templates \exposid{iter-key-type}, \exposid{iter-mapped-type}, +\exposid{range-key-type}, and \exposid{range-mapped-type} defined in \ref{associative.general} may appear in deduction guides for container adaptors. From aab149233f76df37979d777ffd2b3151c52d48a9 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 22 Sep 2022 10:51:46 +0100 Subject: [PATCH 035/257] [template.bitset] reorder synopsis and member descriptions Group shifts together and use same order for synopsis and detailed descriptions. Also remove the unnecessary "for b[i];" comments explaining what operator[] does, and add a comment introducing the group containing count(), size() etc. --- source/utilities.tex | 159 ++++++++++++++++++++++--------------------- 1 file changed, 80 insertions(+), 79 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 1b1613fdf6..2e23401b69 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -8994,6 +8994,8 @@ constexpr bitset& operator^=(const bitset& rhs) noexcept; constexpr bitset& operator<<=(size_t pos) noexcept; constexpr bitset& operator>>=(size_t pos) noexcept; + constexpr bitset operator<<(size_t pos) const noexcept; + constexpr bitset operator>>(size_t pos) const noexcept; constexpr bitset& set() noexcept; constexpr bitset& set(size_t pos, bool val = true); constexpr bitset& reset() noexcept; @@ -9003,8 +9005,8 @@ constexpr bitset& flip(size_t pos); // element access - constexpr bool operator[](size_t pos) const; // for \tcode{b[i];} - constexpr reference operator[](size_t pos); // for \tcode{b[i];} + constexpr bool operator[](size_t pos) const; + constexpr reference operator[](size_t pos); constexpr unsigned long to_ulong() const; constexpr unsigned long long to_ullong() const; @@ -9014,6 +9016,7 @@ constexpr basic_string to_string(charT zero = charT('0'), charT one = charT('1')) const; + // observers constexpr size_t count() const noexcept; constexpr size_t size() const noexcept; constexpr bool operator==(const bitset& rhs) const noexcept; @@ -9021,8 +9024,6 @@ constexpr bool all() const noexcept; constexpr bool any() const noexcept; constexpr bool none() const noexcept; - constexpr bitset operator<<(size_t pos) const noexcept; - constexpr bitset operator>>(size_t pos) const noexcept; }; // \ref{bitset.hash}, hash support @@ -9282,6 +9283,28 @@ \tcode{*this}. \end{itemdescr} +\indexlibrarymember{operator<<}{bitset}% +\begin{itemdecl} +constexpr bitset operator<<(size_t pos) const noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\returns +\tcode{bitset(*this) <<= pos}. +\end{itemdescr} + +\indexlibrarymember{operator>>}{bitset}% +\begin{itemdecl} +constexpr bitset operator>>(size_t pos) const noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\returns +\tcode{bitset(*this) >>= pos}. +\end{itemdescr} + % Do not use \indexlibrarymember. \indexlibrary{\idxcode{set} (member)!\idxcode{bitset}}% \indexlibrary{\idxcode{bitset}!\idxcode{set}}% @@ -9416,6 +9439,59 @@ \tcode{out_of_range} if \tcode{pos} does not correspond to a valid bit position. \end{itemdescr} +\indexlibrarymember{operator[]}{bitset}% +\begin{itemdecl} +constexpr bool operator[](size_t pos) const; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\expects +\tcode{pos} is valid. + +\pnum +\returns +\tcode{true} if the bit at position \tcode{pos} in \tcode{*this} has the value +one, otherwise \tcode{false}. + +\pnum +\throws +Nothing. +\end{itemdescr} + +\indexlibrarymember{operator[]}{bitset}% +\begin{itemdecl} +constexpr bitset::reference operator[](size_t pos); +\end{itemdecl} + +\begin{itemdescr} +\pnum +\expects +\tcode{pos} is valid. + +\pnum +\returns +An object of type +\tcode{bitset::reference} +such that +\tcode{(*this)[pos] == this->test(pos)}, +and such that +\tcode{(*this)[pos] = val} +is equivalent to +\tcode{this->set(pos, val)}. + +\pnum +\throws +Nothing. + +\pnum +\remarks +For the purpose of determining the presence of a data +race\iref{intro.multithread}, any access or update through the resulting +reference potentially accesses or modifies, respectively, the entire +underlying bitset. +\end{itemdescr} + \indexlibrarymember{to_ulong}{bitset}% \begin{itemdecl} constexpr unsigned long to_ulong() const; @@ -9571,81 +9647,6 @@ \tcode{count() == 0}. \end{itemdescr} -\indexlibrarymember{operator<<}{bitset}% -\begin{itemdecl} -constexpr bitset operator<<(size_t pos) const noexcept; -\end{itemdecl} - -\begin{itemdescr} -\pnum -\returns -\tcode{bitset(*this) <<= pos}. -\end{itemdescr} - -\indexlibrarymember{operator>>}{bitset}% -\begin{itemdecl} -constexpr bitset operator>>(size_t pos) const noexcept; -\end{itemdecl} - -\begin{itemdescr} -\pnum -\returns -\tcode{bitset(*this) >>= pos}. -\end{itemdescr} - -\indexlibrarymember{operator[]}{bitset}% -\begin{itemdecl} -constexpr bool operator[](size_t pos) const; -\end{itemdecl} - -\begin{itemdescr} -\pnum -\expects -\tcode{pos} is valid. - -\pnum -\returns -\tcode{true} if the bit at position \tcode{pos} in \tcode{*this} has the value -one, otherwise \tcode{false}. - -\pnum -\throws -Nothing. -\end{itemdescr} - -\indexlibrarymember{operator[]}{bitset}% -\begin{itemdecl} -constexpr bitset::reference operator[](size_t pos); -\end{itemdecl} - -\begin{itemdescr} -\pnum -\expects -\tcode{pos} is valid. - -\pnum -\returns -An object of type -\tcode{bitset::reference} -such that -\tcode{(*this)[pos] == this->test(pos)}, -and such that -\tcode{(*this)[pos] = val} -is equivalent to -\tcode{this->set(pos, val)}. - -\pnum -\throws -Nothing. - -\pnum -\remarks -For the purpose of determining the presence of a data -race\iref{intro.multithread}, any access or update through the resulting -reference potentially accesses or modifies, respectively, the entire -underlying bitset. -\end{itemdescr} - \rSec2[bitset.hash]{\tcode{bitset} hash support} \indexlibraryglobal{hash_code}% From 177a09bacf5128d8521693119ecbf49e91db6ee4 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sat, 17 Sep 2022 09:32:50 +0200 Subject: [PATCH 036/257] [ranges] Indexing fixes for iterator and sentinel classes Also add automated checks. --- source/ranges.tex | 345 ++++++++++++++++++++---------------------- tools/check-source.sh | 10 ++ 2 files changed, 171 insertions(+), 184 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 3c3af67a5b..94b5d0f0ab 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2929,7 +2929,6 @@ \rSec3[range.iota.iterator]{Class \tcode{iota_view::\exposid{iterator}}} -\indexlibraryglobal{iota_view::iterator}% \begin{codeblock} namespace std::ranges { template<@\libconcept{weakly_incrementable}@ W, @\libconcept{semiregular}@ Bound> @@ -3007,7 +3006,7 @@ Overloads for \tcode{iter_move} and \tcode{iter_swap} are omitted intentionally. \end{note} -\indexlibraryctor{iota_view::iterator} +\indexlibraryctor{iota_view::\exposid{iterator}} \begin{itemdecl} constexpr explicit @\exposid{iterator}@(W value); \end{itemdecl} @@ -3018,7 +3017,7 @@ Initializes \exposid{value_} with \tcode{value}. \end{itemdescr} -\indexlibrarymember{operator*}{iota_view::iterator} +\indexlibrarymember{operator*}{iota_view::\exposid{iterator}} \begin{itemdecl} constexpr W operator*() const noexcept(is_nothrow_copy_constructible_v); \end{itemdecl} @@ -3035,7 +3034,7 @@ \end{note} \end{itemdescr} -\indexlibrarymember{operator++}{iota_view::iterator} +\indexlibrarymember{operator++}{iota_view::\exposid{iterator}} \begin{itemdecl} constexpr @\exposid{iterator}@& operator++(); \end{itemdecl} @@ -3050,7 +3049,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator++}{iota_view::iterator} +\indexlibrarymember{operator++}{iota_view::\exposid{iterator}} \begin{itemdecl} constexpr void operator++(int); \end{itemdecl} @@ -3061,7 +3060,7 @@ Equivalent to \tcode{++*this}. \end{itemdescr} -\indexlibrarymember{operator++}{iota_view::iterator} +\indexlibrarymember{operator++}{iota_view::\exposid{iterator}} \begin{itemdecl} constexpr @\exposid{iterator}@ operator++(int) requires @\libconcept{incrementable}@; \end{itemdecl} @@ -3077,7 +3076,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{iota_view::iterator} +\indexlibrarymember{operator--}{iota_view::\exposid{iterator}} \begin{itemdecl} constexpr @\exposid{iterator}@& operator--() requires @\exposconcept{decrementable}@; \end{itemdecl} @@ -3092,7 +3091,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{iota_view::iterator} +\indexlibrarymember{operator--}{iota_view::\exposid{iterator}} \begin{itemdecl} constexpr @\exposid{iterator}@ operator--(int) requires @\exposconcept{decrementable}@; \end{itemdecl} @@ -3108,7 +3107,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator+=}{iota_view::iterator} +\indexlibrarymember{operator+=}{iota_view::\exposid{iterator}} \begin{itemdecl} constexpr @\exposid{iterator}@& operator+=(difference_type n) requires @\exposconcept{advanceable}@; @@ -3131,7 +3130,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator-=}{iota_view::iterator} +\indexlibrarymember{operator-=}{iota_view::\exposid{iterator}} \begin{itemdecl} constexpr @\exposid{iterator}@& operator-=(difference_type n) requires @\exposconcept{advanceable}@; @@ -3154,7 +3153,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator[]}{iota_view::iterator} +\indexlibrarymember{operator[]}{iota_view::\exposid{iterator}} \begin{itemdecl} constexpr W operator[](difference_type n) const requires @\exposconcept{advanceable}@; @@ -3166,7 +3165,7 @@ Equivalent to: \tcode{return W(\exposid{value_} + n);} \end{itemdescr} -\indexlibrarymember{operator==}{iota_view::iterator} +\indexlibrarymember{operator==}{iota_view::\exposid{iterator}} \begin{itemdecl} friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{equality_comparable}@; @@ -3178,7 +3177,7 @@ Equivalent to: \tcode{return x.\exposid{value_} == y.\exposid{value_};} \end{itemdescr} -\indexlibrarymember{operator<}{iota_view::iterator} +\indexlibrarymember{operator<}{iota_view::\exposid{iterator}} \begin{itemdecl} friend constexpr bool operator<(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{totally_ordered}@; @@ -3190,7 +3189,7 @@ Equivalent to: \tcode{return x.\exposid{value_} < y.\exposid{value_};} \end{itemdescr} -\indexlibrarymember{operator>}{iota_view::iterator} +\indexlibrarymember{operator>}{iota_view::\exposid{iterator}} \begin{itemdecl} friend constexpr bool operator>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{totally_ordered}@; @@ -3202,7 +3201,7 @@ Equivalent to: \tcode{return y < x;} \end{itemdescr} -\indexlibrarymember{operator<=}{iota_view::iterator} +\indexlibrarymember{operator<=}{iota_view::\exposid{iterator}} \begin{itemdecl} friend constexpr bool operator<=(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{totally_ordered}@; @@ -3214,7 +3213,7 @@ Equivalent to: \tcode{return !(y < x);} \end{itemdescr} -\indexlibrarymember{operator>=}{iota_view::iterator} +\indexlibrarymember{operator>=}{iota_view::\exposid{iterator}} \begin{itemdecl} friend constexpr bool operator>=(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{totally_ordered}@; @@ -3226,7 +3225,7 @@ Equivalent to: \tcode{return !(x < y);} \end{itemdescr} -\indexlibrarymember{operator<=>}{iota_view::iterator} +\indexlibrarymember{operator<=>}{iota_view::\exposid{iterator}} \begin{itemdecl} friend constexpr auto operator<=>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{totally_ordered}@ && @\libconcept{three_way_comparable}@; @@ -3238,7 +3237,7 @@ Equivalent to: \tcode{return x.\exposid{value_} <=> y.\exposid{value_};} \end{itemdescr} -\indexlibrarymember{operator+}{iota_view::iterator} +\indexlibrarymember{operator+}{iota_view::\exposid{iterator}} \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator+(@\exposid{iterator}@ i, difference_type n) requires @\exposconcept{advanceable}@; @@ -3254,7 +3253,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator+}{iota_view::iterator} +\indexlibrarymember{operator+}{iota_view::\exposid{iterator}} \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator+(difference_type n, @\exposid{iterator}@ i) requires @\exposconcept{advanceable}@; @@ -3266,7 +3265,7 @@ Equivalent to: \tcode{return i + n;} \end{itemdescr} -\indexlibrarymember{operator-}{iota_view::iterator} +\indexlibrarymember{operator-}{iota_view::\exposid{iterator}} \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator-(@\exposid{iterator}@ i, difference_type n) requires @\exposconcept{advanceable}@; @@ -3282,7 +3281,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator-}{iota_view::iterator} +\indexlibrarymember{operator-}{iota_view::\exposid{iterator}} \begin{itemdecl} friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\exposconcept{advanceable}@; @@ -3309,7 +3308,6 @@ \rSec3[range.iota.sentinel]{Class \tcode{iota_view::\exposid{sentinel}}} -\indexlibraryglobal{iota_view::sentinel}% \begin{codeblock} namespace std::ranges { template<@\libconcept{weakly_incrementable}@ W, @\libconcept{semiregular}@ Bound> @@ -3331,7 +3329,7 @@ } \end{codeblock} -\indexlibraryctor{iota_view::sentinel} +\indexlibraryctor{iota_view::\exposid{sentinel}} \begin{itemdecl} constexpr explicit @\exposid{sentinel}@(Bound bound); \end{itemdecl} @@ -3342,7 +3340,7 @@ Initializes \exposid{bound_} with \tcode{bound}. \end{itemdescr} -\indexlibrarymember{operator==}{iota_view::sentinel} +\indexlibrarymember{operator==}{iota_view::\exposid{sentinel}} \begin{itemdecl} friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{sentinel}@& y); \end{itemdecl} @@ -3588,7 +3586,7 @@ } \end{codeblock} -\indexlibraryctor{repeat_view::iterator}% +\indexlibraryctor{repeat_view::\exposid{iterator}}% \begin{itemdecl} constexpr explicit @\exposid{iterator}@(const W* value, @\exposid{index-type}@ b = @\exposid{index-type}@()); \end{itemdecl} @@ -3604,7 +3602,7 @@ \exposid{current_} with \tcode{b}. \end{itemdescr} -\indexlibrarymember{operator*}{repeat_view::iterator}% +\indexlibrarymember{operator*}{repeat_view::\exposid{iterator}}% \begin{itemdecl} constexpr const W& operator*() const noexcept; \end{itemdecl} @@ -3615,7 +3613,7 @@ Equivalent to: \tcode{return *\exposid{value_};} \end{itemdescr} -\indexlibrarymember{operator++}{repeat_view::iterator}% +\indexlibrarymember{operator++}{repeat_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator++(); \end{itemdecl} @@ -3630,7 +3628,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator++}{repeat_view::iterator}% +\indexlibrarymember{operator++}{repeat_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator++(int); \end{itemdecl} @@ -3646,7 +3644,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{repeat_view::iterator}% +\indexlibrarymember{operator--}{repeat_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator--(); \end{itemdecl} @@ -3666,7 +3664,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{repeat_view::iterator}% +\indexlibrarymember{operator--}{repeat_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator--(int); \end{itemdecl} @@ -3682,7 +3680,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator+=}{repeat_view::iterator}% +\indexlibrarymember{operator+=}{repeat_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator+=(difference_type n); \end{itemdecl} @@ -3702,7 +3700,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator-=}{repeat_view::iterator}% +\indexlibrarymember{operator-=}{repeat_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator-=(difference_type n); \end{itemdecl} @@ -3722,7 +3720,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator[]}{repeat_view::iterator}% +\indexlibrarymember{operator[]}{repeat_view::\exposid{iterator}}% \begin{itemdecl} constexpr const W& operator[](difference_type n) const noexcept; \end{itemdecl} @@ -3733,7 +3731,7 @@ Equivalent to: \tcode{return *(*this + n);} \end{itemdescr} -\indexlibrarymember{operator==}{repeat_view::iterator}% +\indexlibrarymember{operator==}{repeat_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y); \end{itemdecl} @@ -3744,7 +3742,7 @@ Equivalent to: \tcode{return x.\exposid{current_} == y.\exposid{current_};}. \end{itemdescr} -\indexlibrarymember{operator<=>}{repeat_view::iterator}% +\indexlibrarymember{operator<=>}{repeat_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr auto operator<=>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y); \end{itemdecl} @@ -3755,7 +3753,7 @@ Equivalent to: \tcode{return x.\exposid{current_} <=> y.\exposid{current_};}. \end{itemdescr} -\indexlibrarymember{operator+}{repeat_view::iterator}% +\indexlibrarymember{operator+}{repeat_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator+(@\exposid{iterator}@ i, difference_type n); friend constexpr @\exposid{iterator}@ operator+(difference_type n, @\exposid{iterator}@ i); @@ -3771,7 +3769,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator-}{repeat_view::iterator}% +\indexlibrarymember{operator-}{repeat_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator-(@\exposid{iterator}@ i, difference_type n); \end{itemdecl} @@ -3786,7 +3784,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator-}{repeat_view::iterator}% +\indexlibrarymember{operator-}{repeat_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y); \end{itemdecl} @@ -3888,7 +3886,6 @@ \rSec3[range.istream.iterator]{Class \tcode{basic_istream_view::\exposid{iterator}}} -\indexlibraryglobal{basic_istream_view::iterator}% \begin{codeblock} namespace std::ranges { template<@\libconcept{movable}@ Val, class CharT, class Traits> @@ -3921,7 +3918,7 @@ } \end{codeblock} -\indexlibraryctor{basic_istream_view::iterator}% +\indexlibraryctor{basic_istream_view::\exposid{iterator}}% \begin{itemdecl} constexpr explicit @\exposid{iterator}@(basic_istream_view& parent) noexcept; \end{itemdecl} @@ -3932,7 +3929,7 @@ Initializes \exposid{parent_} with \tcode{addressof(parent)}. \end{itemdescr} -\indexlibrarymember{operator++}{basic_istream_view::iterator}% +\indexlibrarymember{operator++}{basic_istream_view::\exposid{iterator}}% \begin{itemdecl} @\exposid{iterator}@& operator++(); \end{itemdecl} @@ -3947,7 +3944,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator++}{basic_istream_view::iterator}% +\indexlibrarymember{operator++}{basic_istream_view::\exposid{iterator}}% \begin{itemdecl} void operator++(int); \end{itemdecl} @@ -3958,7 +3955,7 @@ Equivalent to \tcode{++*this}. \end{itemdescr} -\indexlibrarymember{operator*}{basic_istream_view::iterator}% +\indexlibrarymember{operator*}{basic_istream_view::\exposid{iterator}}% \begin{itemdecl} Val& operator*() const; \end{itemdecl} @@ -3969,7 +3966,7 @@ Equivalent to: \tcode{return \exposid{parent_}->\exposid{value_};} \end{itemdescr} -\indexlibrarymember{operator==}{basic_istream_view::iterator}% +\indexlibrarymember{operator==}{basic_istream_view::\exposid{iterator}}% \begin{itemdecl} friend bool operator==(const @\exposid{iterator}@& x, default_sentinel_t); \end{itemdecl} @@ -4719,7 +4716,7 @@ \item Otherwise, \tcode{iterator_category} denotes \tcode{C}. \end{itemize} -\indexlibraryctor{filter_view::iterator}% +\indexlibraryctor{filter_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@(filter_view& parent, iterator_t current); \end{itemdecl} @@ -4731,7 +4728,7 @@ \exposid{parent_} with \tcode{addressof(parent)}. \end{itemdescr} -\indexlibrarymember{base}{filter_view::iterator}% +\indexlibrarymember{base}{filter_view::\exposid{iterator}}% \begin{itemdecl} constexpr const iterator_t& base() const & noexcept; \end{itemdecl} @@ -4742,7 +4739,7 @@ Equivalent to: \tcode{return \exposid{current_};} \end{itemdescr} -\indexlibrarymember{base}{filter_view::iterator}% +\indexlibrarymember{base}{filter_view::\exposid{iterator}}% \begin{itemdecl} constexpr iterator_t base() &&; \end{itemdecl} @@ -4753,7 +4750,7 @@ Equivalent to: \tcode{return std::move(\exposid{current_});} \end{itemdescr} -\indexlibrarymember{operator*}{filter_view::iterator}% +\indexlibrarymember{operator*}{filter_view::\exposid{iterator}}% \begin{itemdecl} constexpr range_reference_t operator*() const; \end{itemdecl} @@ -4764,7 +4761,7 @@ Equivalent to: \tcode{return *\exposid{current_};} \end{itemdescr} -\indexlibrarymember{operator->}{filter_view::iterator}% +\indexlibrarymember{operator->}{filter_view::\exposid{iterator}}% \begin{itemdecl} constexpr iterator_t operator->() const requires @\exposconcept{has-arrow}@> && @\libconcept{copyable}@>; @@ -4776,7 +4773,7 @@ Equivalent to: \tcode{return \exposid{current_};} \end{itemdescr} -\indexlibrarymember{operator++}{filter_view::iterator}% +\indexlibrarymember{operator++}{filter_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator++(); \end{itemdecl} @@ -4792,7 +4789,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator++}{filter_view::iterator}% +\indexlibrarymember{operator++}{filter_view::\exposid{iterator}}% \begin{itemdecl} constexpr void operator++(int); \end{itemdecl} @@ -4803,7 +4800,7 @@ Equivalent to \tcode{++*this}. \end{itemdescr} -\indexlibrarymember{operator++}{filter_view::iterator}% +\indexlibrarymember{operator++}{filter_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator++(int) requires @\libconcept{forward_range}@; \end{itemdecl} @@ -4819,7 +4816,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{filter_view::iterator}% +\indexlibrarymember{operator--}{filter_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator--() requires @\libconcept{bidirectional_range}@; \end{itemdecl} @@ -4836,7 +4833,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{filter_view::iterator}% +\indexlibrarymember{operator--}{filter_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator--(int) requires @\libconcept{bidirectional_range}@; \end{itemdecl} @@ -4852,7 +4849,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator==}{filter_view::iterator}% +\indexlibrarymember{operator==}{filter_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{equality_comparable}@>; @@ -4864,7 +4861,7 @@ Equivalent to: \tcode{return x.\exposid{current_} == y.\exposid{current_};} \end{itemdescr} -\indexlibrarymember{iter_move}{filter_view::iterator}% +\indexlibrarymember{iter_move}{filter_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr range_rvalue_reference_t iter_move(const @\exposid{iterator}@& i) noexcept(noexcept(ranges::iter_move(i.@\exposid{current_}@))); @@ -4876,7 +4873,7 @@ Equivalent to: \tcode{return ranges::iter_move(i.\exposid{current_});} \end{itemdescr} -\indexlibrarymember{iter_swap}{filter_view::iterator}% +\indexlibrarymember{iter_swap}{filter_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr void iter_swap(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) noexcept(noexcept(ranges::iter_swap(x.@\exposid{current_}@, y.@\exposid{current_}@))) @@ -4911,7 +4908,7 @@ } \end{codeblock} -\indexlibraryctor{filter_view::sentinel}% +\indexlibraryctor{filter_view::\exposid{sentinel}}% \begin{itemdecl} constexpr explicit @\exposid{sentinel}@(filter_view& parent); \end{itemdecl} @@ -4922,7 +4919,7 @@ Initializes \exposid{end_} with \tcode{ranges::end(parent.\exposid{base_})}. \end{itemdescr} -\indexlibrarymember{base}{filter_view::sentinel}% +\indexlibrarymember{base}{filter_view::\exposid{sentinel}}% \begin{itemdecl} constexpr sentinel_t base() const; \end{itemdecl} @@ -4933,7 +4930,7 @@ Equivalent to: \tcode{return \exposid{end_};} \end{itemdescr} -\indexlibrarymember{operator==}{filter_view::sentinel}% +\indexlibrarymember{operator==}{filter_view::\exposid{sentinel}}% \begin{itemdecl} friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{sentinel}@& y); \end{itemdecl} @@ -5128,7 +5125,6 @@ \rSec3[range.transform.iterator]{Class template \tcode{transform_view::\exposid{iterator}}} -\indexlibraryglobal{transform_view::iterator}% \begin{codeblock} namespace std::ranges { template<@\libconcept{input_range}@ V, @\libconcept{move_constructible}@ F> @@ -5247,7 +5243,7 @@ Otherwise, \tcode{iterator_category} denotes \tcode{input_iterator_tag}. \end{itemize} -\indexlibrarymember{iterator}{transform_view::iterator} +\indexlibrarymember{iterator}{transform_view::\exposid{iterator}} \begin{itemdecl} constexpr @\exposid{iterator}@(@\exposid{Parent}@& parent, iterator_t<@\exposid{Base}@> current); \end{itemdecl} @@ -5259,7 +5255,7 @@ \exposid{parent_} with \tcode{addressof(parent)}. \end{itemdescr} -\indexlibraryctor{transform_view::iterator}% +\indexlibraryctor{transform_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@(@\exposid{iterator}@ i) requires Const && @\libconcept{convertible_to}@, iterator_t<@\exposid{Base}@>>; @@ -5272,7 +5268,7 @@ \exposid{parent_} with \tcode{i.\exposid{parent_}}. \end{itemdescr} -\indexlibrarymember{base}{transform_view::iterator}% +\indexlibrarymember{base}{transform_view::\exposid{iterator}}% \begin{itemdecl} constexpr const iterator_t<@\exposid{Base}@>& base() const & noexcept; \end{itemdecl} @@ -5283,7 +5279,7 @@ Equivalent to: \tcode{return \exposid{current_};} \end{itemdescr} -\indexlibrarymember{base}{transform_view::iterator}% +\indexlibrarymember{base}{transform_view::\exposid{iterator}}% \begin{itemdecl} constexpr iterator_t<@\exposid{Base}@> base() &&; \end{itemdecl} @@ -5294,7 +5290,7 @@ Equivalent to: \tcode{return std::move(\exposid{current_});} \end{itemdescr} -\indexlibrarymember{operator++}{transform_view::iterator}% +\indexlibrarymember{operator++}{transform_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator++(); \end{itemdecl} @@ -5309,7 +5305,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator++}{transform_view::iterator}% +\indexlibrarymember{operator++}{transform_view::\exposid{iterator}}% \begin{itemdecl} constexpr void operator++(int); \end{itemdecl} @@ -5320,7 +5316,7 @@ Equivalent to \tcode{++\exposid{current_}}. \end{itemdescr} -\indexlibrarymember{operator++}{transform_view::iterator}% +\indexlibrarymember{operator++}{transform_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator++(int) requires @\libconcept{forward_range}@<@\exposid{Base}@>; \end{itemdecl} @@ -5336,7 +5332,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{transform_view::iterator}% +\indexlibrarymember{operator--}{transform_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator--() requires @\libconcept{bidirectional_range}@<@\exposid{Base}@>; \end{itemdecl} @@ -5351,7 +5347,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{transform_view::iterator}% +\indexlibrarymember{operator--}{transform_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator--(int) requires @\libconcept{bidirectional_range}@<@\exposid{Base}@>; \end{itemdecl} @@ -5367,7 +5363,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator+=}{transform_view::iterator}% +\indexlibrarymember{operator+=}{transform_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator+=(difference_type n) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -5383,7 +5379,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator-=}{transform_view::iterator}% +\indexlibrarymember{operator-=}{transform_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator-=(difference_type n) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -5399,7 +5395,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator==}{transform_view::iterator}% +\indexlibrarymember{operator==}{transform_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{equality_comparable}@>; @@ -5411,7 +5407,7 @@ Equivalent to: \tcode{return x.\exposid{current_} == y.\exposid{current_};} \end{itemdescr} -\indexlibrarymember{operator<}{transform_view::iterator}% +\indexlibrarymember{operator<}{transform_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator<(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -5423,7 +5419,7 @@ Equivalent to: \tcode{return x.\exposid{current_} < y.\exposid{current_};} \end{itemdescr} -\indexlibrarymember{operator>}{transform_view::iterator}% +\indexlibrarymember{operator>}{transform_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -5435,7 +5431,7 @@ Equivalent to: \tcode{return y < x;} \end{itemdescr} -\indexlibrarymember{operator<=}{transform_view::iterator}% +\indexlibrarymember{operator<=}{transform_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator<=(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -5447,7 +5443,7 @@ Equivalent to: \tcode{return !(y < x);} \end{itemdescr} -\indexlibrarymember{operator>=}{transform_view::iterator}% +\indexlibrarymember{operator>=}{transform_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator>=(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -5459,7 +5455,7 @@ Equivalent to: \tcode{return !(x < y);} \end{itemdescr} -\indexlibrarymember{operator<=>}{transform_view::iterator}% +\indexlibrarymember{operator<=>}{transform_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr auto operator<=>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@> && @\libconcept{three_way_comparable}@>; @@ -5471,7 +5467,7 @@ Equivalent to: \tcode{return x.\exposid{current_} <=> y.\exposid{current_};} \end{itemdescr} -\indexlibrarymember{operator+}{transform_view::iterator}% +\indexlibrarymember{operator+}{transform_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator+(@\exposid{iterator}@ i, difference_type n) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -5485,7 +5481,7 @@ Equivalent to: \tcode{return \exposid{iterator}\{*i.\exposid{parent_}, i.\exposid{current_} + n\};} \end{itemdescr} -\indexlibrarymember{operator-}{transform_view::iterator}% +\indexlibrarymember{operator-}{transform_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator-(@\exposid{iterator}@ i, difference_type n) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -5497,7 +5493,7 @@ Equivalent to: \tcode{return \exposid{iterator}\{*i.\exposid{parent_}, i.\exposid{current_} - n\};} \end{itemdescr} -\indexlibrarymember{operator-}{transform_view::iterator}% +\indexlibrarymember{operator-}{transform_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{sized_sentinel_for}@, iterator_t<@\exposid{Base}@>>; @@ -5512,7 +5508,6 @@ \rSec3[range.transform.sentinel]{Class template \tcode{transform_view::\exposid{sentinel}}} -\indexlibraryglobal{transform_view::sentinel}% \begin{codeblock} namespace std::ranges { template<@\libconcept{input_range}@ V, @\libconcept{move_constructible}@ F> @@ -5550,7 +5545,7 @@ } \end{codeblock} -\indexlibraryctor{transform_view::sentinel}% +\indexlibraryctor{transform_view::\exposid{sentinel}}% \begin{itemdecl} constexpr explicit @\exposid{sentinel}@(sentinel_t<@\exposid{Base}@> end); \end{itemdecl} @@ -5561,7 +5556,7 @@ Initializes \exposid{end_} with \tcode{end}. \end{itemdescr} -\indexlibraryctor{transform_view::sentinel}% +\indexlibraryctor{transform_view::\exposid{sentinel}}% \begin{itemdecl} constexpr @\exposid{sentinel}@(@\exposid{sentinel}@ i) requires Const && @\libconcept{convertible_to}@, sentinel_t<@\exposid{Base}@>>; @@ -5573,7 +5568,7 @@ Initializes \exposid{end_} with \tcode{std::move(i.\exposid{end_})}. \end{itemdescr} -\indexlibrarymember{base}{transform_view::sentinel} +\indexlibrarymember{base}{transform_view::\exposid{sentinel}} \begin{itemdecl} constexpr sentinel_t<@\exposid{Base}@> base() const; \end{itemdecl} @@ -5584,7 +5579,7 @@ Equivalent to: \tcode{return \exposid{end_};} \end{itemdescr} -\indexlibrarymember{operator==}{transform_view::sentinel} +\indexlibrarymember{operator==}{transform_view::\exposid{sentinel}} \begin{itemdecl} template requires @\libconcept{sentinel_for}@, iterator_t<@\exposid{maybe-const}@>> @@ -5597,7 +5592,7 @@ Equivalent to: \tcode{return x.\exposid{current_} == y.\exposid{end_};} \end{itemdescr} -\indexlibrarymember{operator-}{transform_view::sentinel}% +\indexlibrarymember{operator-}{transform_view::\exposid{sentinel}}% \begin{itemdecl} template requires @\libconcept{sized_sentinel_for}@, iterator_t<@\exposid{maybe-const}@>> @@ -5611,7 +5606,7 @@ Equivalent to: \tcode{return x.\exposid{current_} - y.\exposid{end_};} \end{itemdescr} -\indexlibrarymember{operator-}{transform_view::sentinel}% +\indexlibrarymember{operator-}{transform_view::\exposid{sentinel}}% \begin{itemdecl} template requires @\libconcept{sized_sentinel_for}@, iterator_t<@\exposid{maybe-const}@>> @@ -5818,7 +5813,6 @@ \rSec3[range.take.sentinel]{Class template \tcode{take_view::\exposid{sentinel}}} -\indexlibraryglobal{take_view::sentinel}% \begin{codeblock} namespace std::ranges { template<@\libconcept{view}@ V> @@ -5846,7 +5840,7 @@ } \end{codeblock} -\indexlibraryctor{take_view::sentinel}% +\indexlibraryctor{take_view::\exposid{sentinel}}% \begin{itemdecl} constexpr explicit @\exposid{sentinel}@(sentinel_t<@\exposid{Base}@> end); \end{itemdecl} @@ -5857,7 +5851,7 @@ Initializes \exposid{end_} with \tcode{end}. \end{itemdescr} -\indexlibraryctor{take_view::sentinel}% +\indexlibraryctor{take_view::\exposid{sentinel}}% \begin{itemdecl} constexpr @\exposid{sentinel}@(@\exposid{sentinel}@ s) requires Const && @\libconcept{convertible_to}@, sentinel_t<@\exposid{Base}@>>; @@ -5869,7 +5863,7 @@ Initializes \exposid{end_} with \tcode{std::move(s.\exposid{end_})}. \end{itemdescr} -\indexlibrarymember{base}{take_view::sentinel}% +\indexlibrarymember{base}{take_view::\exposid{sentinel}}% \begin{itemdecl} constexpr sentinel_t<@\exposid{Base}@> base() const; \end{itemdecl} @@ -5880,7 +5874,7 @@ Equivalent to: \tcode{return \exposid{end_};} \end{itemdescr} -\indexlibrarymember{operator==}{take_view::sentinel}% +\indexlibrarymember{operator==}{take_view::\exposid{sentinel}}% \begin{itemdecl} friend constexpr bool operator==(const @\exposid{CI}@& y, const @\exposid{sentinel}@& x); @@ -6003,7 +5997,6 @@ \rSec3[range.take.while.sentinel]{Class template \tcode{take_while_view::\exposid{sentinel}}} -\indexlibraryglobal{take_while_view::sentinel}% \begin{codeblock} namespace std::ranges { template<@\libconcept{view}@ V, class Pred> @@ -6034,7 +6027,7 @@ } \end{codeblock} -\indexlibraryctor{take_while_view::sentinel}% +\indexlibraryctor{take_while_view::\exposid{sentinel}}% \begin{itemdecl} constexpr explicit @\exposid{sentinel}@(sentinel_t<@\exposid{Base}@> end, const Pred* pred); \end{itemdecl} @@ -6045,7 +6038,7 @@ Initializes \exposid{end_} with \tcode{end} and \exposid{pred_} with \tcode{pred}. \end{itemdescr} -\indexlibraryctor{take_while_view::sentinel}% +\indexlibraryctor{take_while_view::\exposid{sentinel}}% \begin{itemdecl} constexpr @\exposid{sentinel}@(@\exposid{sentinel}@ s) requires Const && @\libconcept{convertible_to}@, sentinel_t<@\exposid{Base}@>>; @@ -6058,7 +6051,7 @@ \exposid{pred_} with \tcode{s.\exposid{pred_}}. \end{itemdescr} -\indexlibrarymember{operator==}{take_while_view::sentinel}% +\indexlibrarymember{operator==}{take_while_view::\exposid{sentinel}}% \begin{itemdecl} friend constexpr bool operator==(const iterator_t<@\exposid{Base}@>& x, const @\exposid{sentinel}@& y); @@ -6481,7 +6474,6 @@ \rSec3[range.join.iterator]{Class template \tcode{join_view::\exposid{iterator}}} -\indexlibraryglobal{join_view::iterator}% \begin{codeblock} namespace std::ranges { template<@\libconcept{input_range}@ V> @@ -6633,7 +6625,7 @@ \end{codeblock} \end{itemdescr} -\indexlibraryctor{join_view::iterator}% +\indexlibraryctor{join_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@(@\exposid{Parent}@& parent, @\exposid{OuterIter}@ outer); \end{itemdecl} @@ -6645,7 +6637,7 @@ \exposid{parent_} with \tcode{addressof(parent)}; then calls \tcode{\exposid{satisfy}()}. \end{itemdescr} -\indexlibraryctor{join_view::iterator}% +\indexlibraryctor{join_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@(@\exposid{iterator}@ i) requires Const && @@ -6661,7 +6653,7 @@ \exposid{parent_} with \tcode{i.\exposid{parent_}}. \end{itemdescr} -\indexlibrarymember{operator->}{join_view::iterator}% +\indexlibrarymember{operator->}{join_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{InnerIter}@ operator->() const requires @\exposconcept{has-arrow}@<@\exposid{InnerIter}@> && @\libconcept{copyable}@<@\exposid{InnerIter}@>; @@ -6673,7 +6665,7 @@ Equivalent to \tcode{return \exposid{inner_};} \end{itemdescr} -\indexlibrarymember{operator++}{join_view::iterator}% +\indexlibrarymember{operator++}{join_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator++(); \end{itemdecl} @@ -6699,7 +6691,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator++}{join_view::iterator}% +\indexlibrarymember{operator++}{join_view::\exposid{iterator}}% \begin{itemdecl} constexpr void operator++(int); \end{itemdecl} @@ -6710,7 +6702,7 @@ Equivalent to: \tcode{++*this}. \end{itemdescr} -\indexlibrarymember{operator++}{join_view::iterator}% +\indexlibrarymember{operator++}{join_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator++(int) requires @\exposid{ref-is-glvalue}@ && @\libconcept{forward_range}@<@\exposid{Base}@> && @@ -6728,7 +6720,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{join_view::iterator}% +\indexlibrarymember{operator--}{join_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator--() requires @\exposid{ref-is-glvalue}@ && @\libconcept{bidirectional_range}@<@\exposid{Base}@> && @@ -6750,7 +6742,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{join_view::iterator}% +\indexlibrarymember{operator--}{join_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator--(int) requires @\exposid{ref-is-glvalue}@ && @\libconcept{bidirectional_range}@<@\exposid{Base}@> && @@ -6769,7 +6761,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator==}{join_view::iterator}% +\indexlibrarymember{operator==}{join_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\exposid{ref-is-glvalue}@ && @\libconcept{equality_comparable}@> && @@ -6783,7 +6775,7 @@ \tcode{return x.\exposid{outer_} == y.\exposid{outer_} \&\& x.\exposid{inner_} == y.\exposid{inner_};} \end{itemdescr} -\indexlibrarymember{iter_swap}{join_view::iterator}% +\indexlibrarymember{iter_swap}{join_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr void iter_swap(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) noexcept(noexcept(ranges::iter_swap(x.@\exposid{inner_}@, y.@\exposid{inner_}@))) @@ -6798,7 +6790,6 @@ \rSec3[range.join.sentinel]{Class template \tcode{join_view::\exposid{sentinel}}} -\indexlibraryglobal{join_view::sentinel}% \begin{codeblock} namespace std::ranges { template<@\libconcept{input_range}@ V> @@ -6824,7 +6815,7 @@ } \end{codeblock} -\indexlibraryctor{join_view::sentinel}% +\indexlibraryctor{join_view::\exposid{sentinel}}% \begin{itemdecl} constexpr explicit @\exposid{sentinel}@(@\exposid{Parent}@& parent); \end{itemdecl} @@ -6835,7 +6826,7 @@ Initializes \exposid{end_} with \tcode{ranges::end(parent.\exposid{base_})}. \end{itemdescr} -\indexlibraryctor{join_view::sentinel}% +\indexlibraryctor{join_view::\exposid{sentinel}}% \begin{itemdecl} constexpr @\exposid{sentinel}@(@\exposid{sentinel}@ s) requires Const && @\libconcept{convertible_to}@, sentinel_t<@\exposid{Base}@>>; @@ -6847,7 +6838,7 @@ Initializes \exposid{end_} with \tcode{std::move(s.\exposid{end_})}. \end{itemdescr} -\indexlibrarymember{operator==}{join_view::sentinel}%3431 +\indexlibrarymember{operator==}{join_view::\exposid{sentinel}}%3431 \begin{itemdecl} template @@ -8838,7 +8829,6 @@ \rSec3[range.elements.iterator]{Class template \tcode{elements_view::\exposid{iterator}}} -\indexlibraryglobal{elements_view::iterator}% \begin{codeblock} namespace std::ranges { template<@\libconcept{input_range}@ V, size_t N> @@ -8946,7 +8936,6 @@ Otherwise, \tcode{iterator_category} denotes \tcode{C}. \end{itemize} -\indexlibrarymember{\exposid{get-element}}{elements_view::iterator}% \begin{itemdecl} static constexpr decltype(auto) @\exposid{get-element}@(const iterator_t<@\exposid{Base}@>& i); \end{itemdecl} @@ -8965,7 +8954,7 @@ \end{codeblock} \end{itemdescr} -\indexlibraryctor{elements_view::iterator}% +\indexlibraryctor{elements_view::\exposid{iterator}}% \begin{itemdecl} constexpr explicit @\exposid{iterator}@(iterator_t<@\exposid{Base}@> current); \end{itemdecl} @@ -8976,7 +8965,7 @@ Initializes \exposid{current_} with \tcode{std::move(current)}. \end{itemdescr} -\indexlibraryctor{elements_view::iterator}% +\indexlibraryctor{elements_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@(@\exposid{iterator}@ i) requires Const && @\libconcept{convertible_to}@, iterator_t<@\exposid{Base}@>>; @@ -8988,7 +8977,7 @@ Initializes \exposid{current_} with \tcode{std::move(i.\exposid{current_})}. \end{itemdescr} -\indexlibrarymember{base}{elements_view::iterator}% +\indexlibrarymember{base}{elements_view::\exposid{iterator}}% \begin{itemdecl} constexpr const iterator_t<@\exposid{Base}@>& base() const & noexcept; \end{itemdecl} @@ -8999,7 +8988,7 @@ Equivalent to: \tcode{return \exposid{current_};} \end{itemdescr} -\indexlibrarymember{base}{elements_view::iterator}% +\indexlibrarymember{base}{elements_view::\exposid{iterator}}% \begin{itemdecl} constexpr iterator_t<@\exposid{Base}@> base() &&; \end{itemdecl} @@ -9010,7 +8999,7 @@ Equivalent to: \tcode{return std::move(\exposid{current_});} \end{itemdescr} -\indexlibrarymember{operator++}{elements_view::iterator}% +\indexlibrarymember{operator++}{elements_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator++(); \end{itemdecl} @@ -9025,7 +9014,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator++}{elements_view::iterator}% +\indexlibrarymember{operator++}{elements_view::\exposid{iterator}}% \begin{itemdecl} constexpr void operator++(int); \end{itemdecl} @@ -9036,7 +9025,7 @@ Equivalent to: \tcode{++\exposid{current_}}. \end{itemdescr} -\indexlibrarymember{operator++}{elements_view::iterator}% +\indexlibrarymember{operator++}{elements_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator++(int) requires @\libconcept{forward_range}@<@\exposid{Base}@>; \end{itemdecl} @@ -9052,7 +9041,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{elements_view::iterator}% +\indexlibrarymember{operator--}{elements_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator--() requires @\libconcept{bidirectional_range}@<@\exposid{Base}@>; \end{itemdecl} @@ -9067,7 +9056,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{elements_view::iterator}% +\indexlibrarymember{operator--}{elements_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator--(int) requires @\libconcept{bidirectional_range}@<@\exposid{Base}@>; \end{itemdecl} @@ -9083,7 +9072,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator+=}{elements_view::iterator}% +\indexlibrarymember{operator+=}{elements_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator+=(difference_type n) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -9099,7 +9088,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator-=}{elements_view::iterator}% +\indexlibrarymember{operator-=}{elements_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator-=(difference_type n) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -9115,7 +9104,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator==}{elements_view::iterator}% +\indexlibrarymember{operator==}{elements_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{equality_comparable}@<@\exposid{Base}@>; @@ -9127,7 +9116,7 @@ Equivalent to: \tcode{return x.\exposid{current_} == y.\exposid{current_};} \end{itemdescr} -\indexlibrarymember{operator<}{elements_view::iterator}% +\indexlibrarymember{operator<}{elements_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator<(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -9139,7 +9128,7 @@ Equivalent to: \tcode{return x.\exposid{current_} < y.\exposid{current_};} \end{itemdescr} -\indexlibrarymember{operator>}{elements_view::iterator}% +\indexlibrarymember{operator>}{elements_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -9151,7 +9140,7 @@ Equivalent to: \tcode{return y < x;} \end{itemdescr} -\indexlibrarymember{operator<=}{elements_view::iterator}% +\indexlibrarymember{operator<=}{elements_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator<=(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -9163,7 +9152,7 @@ Equivalent to: \tcode{return !(y < x);} \end{itemdescr} -\indexlibrarymember{operator>=}{elements_view::iterator}% +\indexlibrarymember{operator>=}{elements_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator>=(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -9175,7 +9164,7 @@ Equivalent to: \tcode{return !(x < y);} \end{itemdescr} -\indexlibrarymember{operator<=>}{elements_view::iterator}% +\indexlibrarymember{operator<=>}{elements_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr auto operator<=>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@> && @\libconcept{three_way_comparable}@>; @@ -9187,7 +9176,7 @@ Equivalent to: \tcode{return x.\exposid{current_} <=> y.\exposid{current_};} \end{itemdescr} -\indexlibrarymember{operator+}{elements_view::iterator}% +\indexlibrarymember{operator+}{elements_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator+(const @\exposid{iterator}@& x, difference_type y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -9199,7 +9188,7 @@ Equivalent to: \tcode{return \exposid{iterator}\{x\} += y;} \end{itemdescr} -\indexlibrarymember{operator+}{elements_view::iterator}% +\indexlibrarymember{operator+}{elements_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator+(difference_type x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -9211,7 +9200,7 @@ Equivalent to: \tcode{return y + x;} \end{itemdescr} -\indexlibrarymember{operator-}{elements_view::iterator}% +\indexlibrarymember{operator-}{elements_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator-(const @\exposid{iterator}@& x, difference_type y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -9223,7 +9212,7 @@ Equivalent to: \tcode{return \exposid{iterator}\{x\} -= y;} \end{itemdescr} -\indexlibrarymember{operator-}{elements_view::iterator}% +\indexlibrarymember{operator-}{elements_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{sized_sentinel_for}@, iterator_t<@\exposid{Base}@>>; @@ -9237,7 +9226,6 @@ \rSec3[range.elements.sentinel]{Class template \tcode{elements_view::\exposid{sentinel}}} -\indexlibraryglobal{elements_view::sentinel}% \begin{codeblock} namespace std::ranges { template<@\libconcept{input_range}@ V, size_t N> @@ -9274,7 +9262,7 @@ } \end{codeblock} -\indexlibraryctor{elements_view::sentinel}% +\indexlibraryctor{elements_view::\exposid{sentinel}}% \begin{itemdecl} constexpr explicit @\exposid{sentinel}@(sentinel_t<@\exposid{Base}@> end); \end{itemdecl} @@ -9285,7 +9273,7 @@ Initializes \exposid{end_} with \tcode{end}. \end{itemdescr} -\indexlibraryctor{elements_view::sentinel}% +\indexlibraryctor{elements_view::\exposid{sentinel}}% \begin{itemdecl} constexpr @\exposid{sentinel}@(@\exposid{sentinel}@ other) requires Const && @\libconcept{convertible_to}@, sentinel_t<@\exposid{Base}@>>; @@ -9297,7 +9285,7 @@ Initializes \exposid{end_} with \tcode{std::move(other.\exposid{end_})}. \end{itemdescr} -\indexlibrarymember{base}{elements_view::sentinel}% +\indexlibrarymember{base}{elements_view::\exposid{sentinel}}% \begin{itemdecl} constexpr sentinel_t<@\exposid{Base}@> base() const; \end{itemdecl} @@ -9308,7 +9296,7 @@ Equivalent to: \tcode{return \exposid{end_};} \end{itemdescr} -\indexlibrarymember{operator==}{elements_view::sentinel}% +\indexlibrarymember{operator==}{elements_view::\exposid{sentinel}}% \begin{itemdecl} template requires @\libconcept{sentinel_for}@, iterator_t<@\exposid{maybe-const}@>> @@ -9321,7 +9309,7 @@ Equivalent to: \tcode{return x.\exposid{current_} == y.\exposid{end_};} \end{itemdescr} -\indexlibrarymember{operator-}{elements_view::sentinel}% +\indexlibrarymember{operator-}{elements_view::\exposid{sentinel}}% \begin{itemdecl} template requires @\libconcept{sized_sentinel_for}@, iterator_t<@\exposid{maybe-const}@>> @@ -9335,7 +9323,7 @@ Equivalent to: \tcode{return x.\exposid{current_} - y.\exposid{end_};} \end{itemdescr} -\indexlibrarymember{operator-}{elements_view::sentinel}% +\indexlibrarymember{operator-}{elements_view::\exposid{sentinel}}% \begin{itemdecl} template requires @\libconcept{sized_sentinel_for}@, iterator_t<@\exposid{maybe-const}@>> @@ -9491,7 +9479,6 @@ \rSec3[range.zip.iterator]{Class template \tcode{zip_view::\exposid{iterator}}} -\indexlibraryglobal{zip_view::iterator}% \begin{codeblock} namespace std::ranges { template @@ -9872,7 +9859,6 @@ \rSec3[range.zip.sentinel]{Class template \tcode{zip_view::\exposid{sentinel}}} -\indexlibraryglobal{zip_view::sentinel}% \begin{codeblock} namespace std::ranges { template<@\libconcept{input_range}@... Views> @@ -10116,7 +10102,6 @@ \rSec3[range.zip.transform.iterator]{Class template \tcode{zip_transform_view::\exposid{iterator}}} -\indexlibraryglobal{zip_transform_view::iterator}% \begin{codeblock} namespace std::ranges { template<@\libconcept{move_constructible}@ F, @\libconcept{input_range}@... Views> @@ -10428,7 +10413,6 @@ \rSec3[range.zip.transform.sentinel]{Class template \tcode{zip_transform_view::\exposid{sentinel}}} -\indexlibraryglobal{zip_transform_view::sentinel}% \begin{codeblock} namespace std::ranges { template<@\libconcept{move_constructible}@ F, @\libconcept{input_range}@... Views> @@ -10637,7 +10621,6 @@ \rSec3[range.adjacent.iterator]{Class template \tcode{adjacent_view::\exposid{iterator}}} -\indexlibraryglobal{adjacent_view::iterator}% \begin{codeblock} namespace std::ranges { template<@\libconcept{forward_range}@ V, size_t N> @@ -11053,7 +11036,6 @@ \rSec3[range.adjacent.sentinel]{Class template \tcode{adjacent_view::\exposid{sentinel}}} -\indexlibraryglobal{adjacent_view::sentinel}% \begin{codeblock} namespace std::ranges { template<@\libconcept{forward_range}@ V, size_t N> @@ -11272,7 +11254,6 @@ \rSec3[range.adjacent.transform.iterator]{Class template \tcode{adjacent_transform_view::\exposid{iterator}}} -\indexlibraryglobal{adjacent_transform_view::iterator}% \begin{codeblock} namespace std::ranges { template<@\libconcept{forward_range}@ V, @\libconcept{move_constructible}@ F, size_t N> @@ -11575,7 +11556,6 @@ \rSec3[range.adjacent.transform.sentinel]{Class template \tcode{adjacent_transform_view::\exposid{sentinel}}} -\indexlibraryglobal{adjacent_transform_view::sentinel}% \begin{codeblock} namespace std::ranges { template<@\libconcept{forward_range}@ V, @\libconcept{move_constructible}@ F, size_t N> @@ -12224,7 +12204,6 @@ \rSec3[range.chunk.fwd.iter]{Class template \tcode{chunk_view::\exposid{iterator}} for forward ranges} -\indexlibraryglobal{chunk_view::iterator}% \begin{codeblock} namespace std::ranges { template<@\libconcept{view}@ V> @@ -12824,7 +12803,6 @@ \rSec3[range.slide.iterator]{Class template \tcode{slide_view::\exposid{iterator}}} -\indexlibraryglobal{slide_view::iterator}% \begin{codeblock} namespace std::ranges { template<@\libconcept{forward_range}@ V> @@ -13207,7 +13185,6 @@ \rSec3[range.slide.sentinel]{Class \tcode{slide_view::\exposid{sentinel}}} -\indexlibraryglobal{chunk_view::sentinel}% \begin{codeblock} namespace std::ranges { template<@\libconcept{forward_range}@ V> @@ -13862,7 +13839,7 @@ Otherwise, \tcode{iterator_category} denotes \tcode{C}. \end{itemize} -\indexlibraryctor{stride_view::iterator}% +\indexlibraryctor{stride_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@(@\exposid{Parent}@* parent, iterator_t<@\exposid{Base}@> current, range_difference_t<@\exposid{Base}@> missing = 0); @@ -13877,7 +13854,7 @@ \exposid{missing_} with \tcode{missing}. \end{itemdescr} -\indexlibraryctor{stride_view::iterator}% +\indexlibraryctor{stride_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@(@\exposid{iterator}@ i) requires Const && @\libconcept{convertible_to}@, iterator_t<@\exposid{Base}@>> @@ -13893,7 +13870,7 @@ \exposid{missing_} with \tcode{i.\exposid{missing_}}. \end{itemdescr} -\indexlibrarymember{base}{stride_view::iterator}% +\indexlibrarymember{base}{stride_view::\exposid{iterator}}% \begin{itemdecl} constexpr iterator_t<@\exposid{Base}@> base() &&; \end{itemdecl} @@ -13904,7 +13881,7 @@ \tcode{std::move(\exposid{current_})}. \end{itemdescr} -\indexlibrarymember{base}{stride_view::iterator}% +\indexlibrarymember{base}{stride_view::\exposid{iterator}}% \begin{itemdecl} constexpr const iterator_t<@\exposid{Base}@>& base() const & noexcept; \end{itemdecl} @@ -13915,7 +13892,7 @@ \exposid{current_}. \end{itemdescr} -\indexlibrarymember{operator++}{stride_view::iterator}% +\indexlibrarymember{operator++}{stride_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator++(); \end{itemdecl} @@ -13934,7 +13911,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator++}{stride_view::iterator}% +\indexlibrarymember{operator++}{stride_view::\exposid{iterator}}% \begin{itemdecl} constexpr void operator++(int); \end{itemdecl} @@ -13945,7 +13922,7 @@ Equivalent to: \tcode{++*this;} \end{itemdescr} -\indexlibrarymember{operator++}{stride_view::iterator}% +\indexlibrarymember{operator++}{stride_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator++(int) requires @\libconcept{forward_range}@<@\exposid{Base}@>; \end{itemdecl} @@ -13961,7 +13938,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{stride_view::iterator}% +\indexlibrarymember{operator--}{stride_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator--() requires @\libconcept{bidirectional_range}@<@\exposid{Base}@>; \end{itemdecl} @@ -13977,7 +13954,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator--}{stride_view::iterator}% +\indexlibrarymember{operator--}{stride_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@ operator--(int) requires @\libconcept{bidirectional_range}@<@\exposid{Base}@>; \end{itemdecl} @@ -13993,7 +13970,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator+=}{stride_view::iterator}% +\indexlibrarymember{operator+=}{stride_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator+=(difference_type n) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; \end{itemdecl} @@ -14022,7 +13999,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator-=}{stride_view::iterator}% +\indexlibrarymember{operator-=}{stride_view::\exposid{iterator}}% \begin{itemdecl} constexpr @\exposid{iterator}@& operator-=(difference_type x) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -14034,7 +14011,7 @@ Equivalent to: \tcode{return *this += -x;} \end{itemdescr} -\indexlibrarymember{operator==}{stride_view::iterator}% +\indexlibrarymember{operator==}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator==(const @\exposid{iterator}@& x, default_sentinel_t); \end{itemdecl} @@ -14045,7 +14022,7 @@ \tcode{x.\exposid{current_} == x.\exposid{end_}}. \end{itemdescr} -\indexlibrarymember{operator==}{stride_view::iterator}% +\indexlibrarymember{operator==}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{equality_comparable}@>; @@ -14057,7 +14034,7 @@ \tcode{x.\exposid{current_} == y.\exposid{current_}}. \end{itemdescr} -\indexlibrarymember{operator<}{stride_view::iterator}% +\indexlibrarymember{operator<}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator<(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -14069,7 +14046,7 @@ \tcode{x.\exposid{current_} < y.\exposid{current_}}. \end{itemdescr} -\indexlibrarymember{operator>}{stride_view::iterator}% +\indexlibrarymember{operator>}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -14081,7 +14058,7 @@ Equivalent to: \tcode{return y < x;} \end{itemdescr} -\indexlibrarymember{operator<=}{stride_view::iterator}% +\indexlibrarymember{operator<=}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator<=(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -14093,7 +14070,7 @@ Equivalent to: \tcode{return !(y < x);} \end{itemdescr} -\indexlibrarymember{operator>=}{stride_view::iterator}% +\indexlibrarymember{operator>=}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr bool operator>=(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -14105,7 +14082,7 @@ Equivalent to: \tcode{return !(x < y);} \end{itemdescr} -\indexlibrarymember{operator<=>}{stride_view::iterator}% +\indexlibrarymember{operator<=>}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr auto operator<=>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{random_access_range}@<@\exposid{Base}@> && @\libconcept{three_way_comparable}@>; @@ -14117,7 +14094,7 @@ \tcode{x.\exposid{current_} <=> y.\exposid{current_}}. \end{itemdescr} -\indexlibrarymember{operator+}{stride_view::iterator}% +\indexlibrarymember{operator+}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator+(const @\exposid{iterator}@& i, difference_type n) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -14136,7 +14113,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator-}{stride_view::iterator}% +\indexlibrarymember{operator-}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr @\exposid{iterator}@ operator-(const @\exposid{iterator}@& i, difference_type n) requires @\libconcept{random_access_range}@<@\exposid{Base}@>; @@ -14153,7 +14130,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{operator-}{stride_view::iterator}% +\indexlibrarymember{operator-}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\libconcept{sized_sentinel_for}@, iterator_t<@\exposid{Base}@>>; @@ -14174,7 +14151,7 @@ \end{itemize} \end{itemdescr} -\indexlibrarymember{operator-}{stride_view::iterator}% +\indexlibrarymember{operator-}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr difference_type operator-(default_sentinel_t y, const @\exposid{iterator}@& x) requires @\libconcept{sized_sentinel_for}@, iterator_t<@\exposid{Base}@>>; @@ -14186,7 +14163,7 @@ \tcode{\exposid{div-ceil}(x.\exposid{end_} - x.\exposid{current_}, x.\exposid{stride_})}. \end{itemdescr} -\indexlibrarymember{operator-}{stride_view::iterator}% +\indexlibrarymember{operator-}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr difference_type operator-(const @\exposid{iterator}@& x, default_sentinel_t y) requires @\libconcept{sized_sentinel_for}@, iterator_t<@\exposid{Base}@>>; @@ -14198,7 +14175,7 @@ Equivalent to: \tcode{return -(y - x);} \end{itemdescr} -\indexlibrarymember{iter_move}{stride_view::iterator}% +\indexlibrarymember{iter_move}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr range_rvalue_reference_t<@\exposid{Base}@> iter_move(const @\exposid{iterator}@& i) noexcept(noexcept(ranges::iter_move(i.@\exposid{current_}@))); @@ -14210,7 +14187,7 @@ Equivalent to: \tcode{return ranges::iter_move(i.\exposid{current_});} \end{itemdescr} -\indexlibrarymember{iter_swap}{stride_view::iterator}% +\indexlibrarymember{iter_swap}{stride_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr void iter_swap(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) noexcept(noexcept(ranges::iter_swap(x.@\exposid{current_}@, y.@\exposid{current_}@))) @@ -15543,7 +15520,7 @@ } \end{codeblock} -\indexlibraryctor{generator::iterator}% +\indexlibraryctor{generator::\exposid{iterator}}% \begin{itemdecl} @\exposid{iterator}@(@\exposid{iterator}@&& other) noexcept; \end{itemdecl} @@ -15555,7 +15532,7 @@ with \tcode{exchange(other.\exposid{coroutine_}, \{\})}. \end{itemdescr} -\indexlibrarymember{operator=}{generator::iterator}% +\indexlibrarymember{operator=}{generator::\exposid{iterator}}% \begin{itemdecl} @\exposid{iterator}@& operator=(@\exposid{iterator}@&& other) noexcept; \end{itemdecl} @@ -15571,7 +15548,7 @@ \tcode{*this}. \end{itemdescr} -\indexlibrarymember{operator*}{generator::iterator}% +\indexlibrarymember{operator*}{generator::\exposid{iterator}}% \begin{itemdecl} @\exposid{reference}@ operator*() const noexcept(is_nothrow_copy_constructible_v<@\exposid{reference}@>); \end{itemdecl} @@ -15590,7 +15567,7 @@ \tcode{return static_cast<\exposid{reference}>(*p.\exposid{value_});} \end{itemdescr} -\indexlibrarymember{operator++}{generator::iterator}% +\indexlibrarymember{operator++}{generator::\exposid{iterator}}% \begin{itemdecl} @\exposid{iterator}@& operator++(); \end{itemdecl} @@ -15610,7 +15587,7 @@ \tcode{*this}. \end{itemdescr} -\indexlibrarymember{operator++}{generator::iterator}% +\indexlibrarymember{operator++}{generator::\exposid{iterator}}% \begin{itemdecl} void operator++(int); \end{itemdecl} @@ -15621,7 +15598,7 @@ Equivalent to \tcode{++*this}. \end{itemdescr} -\indexlibrarymember{operator==}{generator::iterator}% +\indexlibrarymember{operator==}{generator::\exposid{iterator}}% \begin{itemdecl} friend bool operator==(@\exposid{iterator}@ i, default_sentinel_t); \end{itemdecl} diff --git a/tools/check-source.sh b/tools/check-source.sh index eaa42679cb..cabde9e6d1 100755 --- a/tools/check-source.sh +++ b/tools/check-source.sh @@ -185,6 +185,16 @@ done | grep -n '\\logop{[^}]*[^andor}][^}]*}' $texfiles | fail 'bad argument for \\logop' || failed=1 +# Bad indexing for ::iterator and ::sentinel exposition-only classes +grep -Hn '\\indexlibrary\(ctor\|member\).*::\(iterator\|sentinel\)}.*' ranges.tex | + fail 'use \\exposid for iterator/sentinel member indexing' || failed=1 +# Fixup: sed -i '/indexlibrary\(member\|ctor\)/s/::\(iterator\|sentinel\)/::\\exposid{\1}/' ranges.tex + +# Do not index the exposition-only ::iterator and ::sentinel class names +grep -Hn '\\indexlibraryglobal.*::\(iterator\|sentinel\)}.*' ranges.tex | + fail 'do not index exposition-only ::iterator and ::sentinel class names' ranges.tex || failed=1 +# Fixup: sed -i '/indexlibraryglobal.*::\(iterator\|sentinel\)}.*/d' ranges.tex + # Hanging paragraphs for f in $texfiles; do sed -n '/^\\rSec/{=;p;};/^\\pnum/{s/^.*$/x/;=;p;}' $f | From 63e4a76f780c925a13efeb06955252d7c37ed4ef Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Thu, 22 Sep 2022 09:30:14 +0800 Subject: [PATCH 037/257] [range.as.const.overview] Remove unnecessary ranges namespace qualification --- source/ranges.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index 94b5d0f0ab..8ea511f38e 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -8638,7 +8638,7 @@ \pnum \begin{example} \begin{codeblock} -template +template<@\libconcept{constant_range}@ R> void cant_touch_this(R&&); vector hammer = {'m', 'c'}; From 179436adbe60c277fa6512352ee27e26f192bf2b Mon Sep 17 00:00:00 2001 From: Alisdair Meredith Date: Fri, 23 Sep 2022 12:45:09 -0400 Subject: [PATCH 038/257] [utility.arg.requirements] Present identifiers as itemization (#5856) Lists providing the key for names used throughout a subclause are difficult to follow when buried as a single sentence in a paragraph. This change updates the key to tables 29-36 in [utility.arg.requirements] to a bulleted list following the examples set elsewhere. Each key is now consistently introduced with the word "denotes", following the precedent set by similar bullet lists. It is not at all coincidental that this also resolves pagination issues at the end of the page, so that the floating tables to not float into the middle of a sentence in the following section. --- source/lib-intro.tex | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index c564e23ead..c4f5707fd6 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1590,16 +1590,25 @@ The template definitions in the \Cpp{} standard library refer to various named requirements whose details are set out in Tables~\ref{tab:cpp17.equalitycomparable}--\ref{tab:cpp17.destructible}. -In these tables, \tcode{T} is an object or reference type to be -supplied by a \Cpp{} program instantiating a template; +In these tables, +\begin{itemize} +\item +\tcode{T} denotes an object or reference type to be +supplied by a \Cpp{} program instantiating a template, +\item \tcode{a}, \tcode{b}, and -\tcode{c} are values of type (possibly \keyword{const}) \tcode{T}; -\tcode{s} and \tcode{t} are modifiable lvalues of type \tcode{T}; -\tcode{u} denotes an identifier; -\tcode{rv} is an rvalue of type \tcode{T}; -and \tcode{v} is an lvalue of type (possibly \keyword{const}) \tcode{T} or an rvalue of -type \tcode{const T}. +\tcode{c} denote values of type (possibly \keyword{const}) \tcode{T}, +\item +\tcode{s} and \tcode{t} denote modifiable lvalues of type \tcode{T}, +\item +\tcode{u} denotes an identifier, +\item +\tcode{rv} denotes an rvalue of type \tcode{T}, and +\item +\tcode{v} denotes an lvalue of type (possibly \keyword{const}) \tcode{T} or an +rvalue of type \tcode{const T}. +\end{itemize} \pnum In general, a default constructor is not required. Certain container class From dd9676941ca62a74ef600b76604041b4a97f5008 Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Sat, 24 Sep 2022 23:58:13 +0800 Subject: [PATCH 039/257] [ranges.cartesian.iterator] Rename stable label "ranges.*" to "range.*" (#5866) --- source/ranges.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 8ea511f38e..23eea6b2d3 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -14292,7 +14292,7 @@ class cartesian_product_view : public view_interface> { private: tuple @\exposid{bases_}@; // \expos - // \ref{ranges.cartesian.iterator}, class template \tcode{cartesian_product_view::\exposid{iterator}} + // \ref{range.cartesian.iterator}, class template \tcode{cartesian_product_view::\exposid{iterator}} template class @\exposid{iterator}@; // \expos public: constexpr cartesian_product_view() = default; @@ -14432,7 +14432,7 @@ $p$. \end{itemdescr} -\rSec3[ranges.cartesian.iterator]{Class template \tcode{cartesian_product_view::\exposid{iterator}}} +\rSec3[range.cartesian.iterator]{Class template \tcode{cartesian_product_view::\exposid{iterator}}} \begin{codeblock} namespace std::ranges { From 0f690b2468334c34471df067c5c0d3c95f211a5a Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Sun, 25 Sep 2022 00:00:24 +0800 Subject: [PATCH 040/257] [ranges.elementsof] Rename stable label "ranges.*" to "range.*" (#5867) --- source/ranges.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 23eea6b2d3..2f183916c4 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -155,7 +155,7 @@ // \ref{range.dangling}, dangling iterator handling struct dangling; // freestanding - // \ref{ranges.elementsof}, class template \tcode{elements_of} + // \ref{range.elementsof}, class template \tcode{elements_of} template<@\libconcept{range}@ R, class Allocator = allocator> struct elements_of; @@ -2191,7 +2191,7 @@ denote \tcode{dangling}. \end{itemize} -\rSec2[ranges.elementsof]{Class template \tcode{elements_of}} +\rSec2[range.elementsof]{Class template \tcode{elements_of}} Specializations of \tcode{elements_of} encapsulate a range and act as a tag in overload sets to disambiguate From 24d54e30506a62ef41cf4bd0132fbdba45bb6dda Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 27 Sep 2022 11:56:32 +0100 Subject: [PATCH 041/257] [futures.task.members] Add missing explicit to packaged_task ctor --- source/threads.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/threads.tex b/source/threads.tex index f630d28dce..a10ed79bf8 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -11314,7 +11314,7 @@ \indexlibraryctor{packaged_task}% \begin{itemdecl} template - packaged_task(F&& f); + explicit packaged_task(F&& f); \end{itemdecl} \begin{itemdescr} From 842424bd228b79876437a1a9393f20f00033476a Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:39:59 +0800 Subject: [PATCH 042/257] [futures.task.members] Correct capitalization --- source/threads.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/threads.tex b/source/threads.tex index a10ed79bf8..8ae392e2a5 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -11562,7 +11562,7 @@ \throws \begin{itemize} \item \tcode{bad_alloc} if memory for the new shared state cannot be allocated. -\item any exception thrown by the move constructor of the task stored in the shared +\item Any exception thrown by the move constructor of the task stored in the shared state. \item \tcode{future_error} with an error condition of \tcode{no_state} if \tcode{*this} has no shared state. From d3ddc0906638bb30b5a3ce0f4033148e9a8ed1ff Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Thu, 29 Sep 2022 15:49:06 +0800 Subject: [PATCH 043/257] [container.rev.reqmts] Correct capitalization --- source/containers.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index a284282131..d4c2f28dd3 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -761,18 +761,18 @@ \begin{itemize} \item -if an exception is thrown by an +If an exception is thrown by an \tcode{insert()} or \tcode{emplace()} function while inserting a single element, that function has no effects. \item -if an exception is thrown by a +If an exception is thrown by a \tcode{push_back()}, \tcode{push_front()}, \tcode{emplace_back()}, or \tcode{emplace_front()} function, that function has no effects. \item -no +No \tcode{erase()}, \tcode{clear()}, \tcode{pop_back()} @@ -780,14 +780,14 @@ \tcode{pop_front()} function throws an exception. \item -no copy constructor or assignment operator of a returned iterator +No copy constructor or assignment operator of a returned iterator throws an exception. \item -no +No \tcode{swap()} function throws an exception. \item -no +No \tcode{swap()} function invalidates any references, pointers, or iterators referring to the elements From 5b225ea61a5100889bc5dfe48b6ffa9fbdd8a7a7 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Thu, 29 Sep 2022 13:57:25 -0700 Subject: [PATCH 044/257] [ios.overview] Remove unconventional empty line (#5874) --- source/iostreams.tex | 1 - 1 file changed, 1 deletion(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index 851476a378..fc56636633 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -1846,7 +1846,6 @@ void move(basic_ios&& rhs); void swap(basic_ios& rhs) noexcept; void set_rdbuf(basic_streambuf* sb); - }; } \end{codeblock} From 4f1dcd9e8a4b90c7da91e44a68f1613c967ffd17 Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Mon, 3 Oct 2022 23:02:26 +0800 Subject: [PATCH 045/257] [func.wrap.move.general] Fix formatting of "cv" (#5880) --- source/utilities.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index 2e23401b69..abfdbabe88 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -12357,7 +12357,7 @@ there is a placeholder \placeholder{inv-quals} defined as follows: \begin{itemize} \item -If \placeholder{ref} is empty, let \placeholder{inv-quals} be \tcode{\cv{}\&}, +If \placeholder{ref} is empty, let \placeholder{inv-quals} be \cv{}\tcode{\&}, \item otherwise, let \placeholder{inv-quals} be \cv{} \placeholder{ref}. \end{itemize} From a7f17181ef5b59ad728b421a83975209406fa037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kr=C3=BCgler?= Date: Mon, 3 Oct 2022 17:59:20 +0200 Subject: [PATCH 046/257] [sequence.reqmts] Use "lvalues of type T are swappable" (#5878) --- source/containers.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index d4c2f28dd3..b55fb2ce71 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -1547,7 +1547,7 @@ \oldconcept{MoveInsertable} into \tcode{X}, \oldconcept{MoveConstructible}, \oldconcept{MoveAssignable}, and -swappable\iref{swappable.requirements}. +lvalues of type \tcode{T} are swappable\iref{swappable.requirements}. Neither \tcode{i} nor \tcode{j} are iterators into \tcode{a}. \pnum @@ -1581,7 +1581,7 @@ \oldconcept{MoveInsertable} into \tcode{X}, \oldconcept{MoveConstructible}, \oldconcept{MoveAssignable}, and -swappable\iref{swappable.requirements}. +lvalues of type \tcode{T} are swappable\iref{swappable.requirements}. \tcode{rg} and \tcode{a} do not overlap. \pnum From dd6c7f4012489325bdd65a40cd121b3d25008b0e Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Tue, 4 Oct 2022 04:41:26 +0800 Subject: [PATCH 047/257] [associative.reqmts.general] Fix typo in namespace name (#5881) --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index b55fb2ce71..35df5c97ae 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -2906,7 +2906,7 @@ \expects \tcode{value_type} is \oldconcept{EmplaceConstructible} into \tcode{X} -from \tcode{*range::begin(rg)}. +from \tcode{*ranges::begin(rg)}. \pnum \effects From 42c7b3fb3a3cb11bc1af418cfdd395ecf314aa43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 4 Oct 2022 13:08:17 +0100 Subject: [PATCH 048/257] [intro.defs] Update hyperlink according to SC22 requirements --- source/intro.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/intro.tex b/source/intro.tex index cce294040a..8040b7b21f 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -127,7 +127,7 @@ at the following addresses: \begin{itemize} \item ISO Online browsing platform: available at \url{https://www.iso.org/obp} -\item IEC Electropedia: available at \url{http://www.electropedia.org} +\item IEC Electropedia: available at \url{https://www.electropedia.org/} \end{itemize} \pnum From 05019b35890b79374fac180a9a9ff9e7cf8d7595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 4 Oct 2022 15:19:01 +0100 Subject: [PATCH 049/257] Foreword placeholder --- source/front.tex | 2 ++ source/preface.tex | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 source/preface.tex diff --git a/source/front.tex b/source/front.tex index ef9189eb80..5396b6397d 100644 --- a/source/front.tex +++ b/source/front.tex @@ -28,3 +28,5 @@ \let\index\oindex \setcounter{tocdepth}{5} + +\input{preface} diff --git a/source/preface.tex b/source/preface.tex new file mode 100644 index 0000000000..1e11dd524f --- /dev/null +++ b/source/preface.tex @@ -0,0 +1,4 @@ +%!TEX root = std.tex +\chapter{Foreword} + +[This page is intentionally left blank.] From b0fab58d4f2b12defdaf7c3ddfb2ddcd1f30e1b5 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 5 Oct 2022 11:27:23 +0100 Subject: [PATCH 050/257] [temp.local] Fix typo in "inject-class-name" (#5889) --- source/templates.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/templates.tex b/source/templates.tex index 873ad16891..8b647c0dbf 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -4534,7 +4534,7 @@ enclosed in \tcode{<>}. \pnum -When the inject-class-name of a class template specialization or +When the injected-class-name of a class template specialization or partial specialization is used as a \grammarterm{type-name}, it is equivalent to the \grammarterm{template-name} followed by the \grammarterm{template-argument}{s} From f6c5d4512d4b32d63d66669555ab976b315d439c Mon Sep 17 00:00:00 2001 From: mordante Date: Mon, 10 Oct 2022 17:50:51 +0200 Subject: [PATCH 051/257] [format.string.escaped] Fix example of invalid code unit (#5890) Example 5 should only have one invalid code unit. The second code unit is a valid code point. This issue was already in the paper P2286R8 "Formatting Ranges". --- source/utilities.tex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index abfdbabe88..c89bdcc2e4 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15405,8 +15405,7 @@ // The following examples assume use of the UTF-8 encoding string s4 = format("[{:?}]", string("\0 \n \t \x02 \x1b", 9)); // \tcode{s4} has value: \tcode{["\textbackslash u\{0\} \textbackslash n \textbackslash t \textbackslash u\{2\} \textbackslash u\{1b\}"]} -string s5 = format("[{:?}]", "\xc3\x28"); // invalid UTF-8 - // \tcode{s5} has value: \tcode{["\textbackslash x\{c3\}\textbackslash x\{28\}"]} +string s5 = format("[{:?}]", "\xc3\x28"); // invalid UTF-8, \tcode{s5} has value: \tcode{["\textbackslash x\{c3\}("]} \end{codeblock} \end{example} From 5f26c516a659cdf3f0ea007cf6c90c690cccc3b6 Mon Sep 17 00:00:00 2001 From: Eelis van der Weegen Date: Tue, 11 Oct 2022 04:36:08 +0200 Subject: [PATCH 052/257] [bibliography] Remove stray closing parenthesis. --- source/back.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/back.tex b/source/back.tex index dda5569dc8..c33bb8ee91 100644 --- a/source/back.tex +++ b/source/back.tex @@ -51,7 +51,7 @@ \chapter{Bibliography} \item P.J. Plauger, \doccite{The Draft Standard \Cpp{} Library}. - Prentice-Hall, ISBN 0-13-117003-1, copyright \copyright 1995 P.J. Plauger) + Prentice-Hall, ISBN 0-13-117003-1, copyright \copyright 1995 P.J. Plauger \end{itemize} The arithmetic specification described in ISO/IEC 10967-1:2012 is From 6c51392a3d1c3c928ef1c20c19e8efe6efed7dc1 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 19 Oct 2022 22:29:09 +0200 Subject: [PATCH 053/257] [intro.defs] Move the definition of "multibyte character" to library This address the US-2 NB comment as per the direction voted on by SG-16. No use of "multibyte character" remains before [multibyte.strings]. --- source/intro.tex | 5 ----- source/lib-intro.tex | 6 ++++++ source/xrefprev | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/intro.tex b/source/intro.tex index 8040b7b21f..977966c5b3 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -422,11 +422,6 @@ \indexdefn{construction!move}% direct-initialization of an object of some type with an rvalue of the same type -\indexdefn{character!multibyte}% -\definition{multibyte character}{defns.multibyte} -sequence of one or more bytes representing -the code unit sequence for an encoded character of the execution character set - \indexdefn{library call!non-constant}% \definition{non-constant library call}{defns.nonconst.libcall} invocation of a library function that, diff --git a/source/lib-intro.tex b/source/lib-intro.tex index c4f5707fd6..f8f7ee7823 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -790,6 +790,12 @@ \rSec5[multibyte.strings]{Multibyte strings} +\pnum +A \defnx{multibyte character}{character!multibyte} is +a sequence of one or more bytes representing the +code unit sequence for an encoded character of the +execution character set. + \indextext{string!null-terminated multibyte|see{\ntmbs{}}}% \pnum A \defnx{null-terminated multibyte string}{NTMBS@\ntmbs{}}, diff --git a/source/xrefprev b/source/xrefprev index 60227e5598..bfc3b4452f 100644 --- a/source/xrefprev +++ b/source/xrefprev @@ -31,7 +31,6 @@ \glossaryentry{defns.modifier@ {\memgloterm{defns.modifier}}{\memglodesc{(\ref {defns.modifier})}} {\memgloref{}}|memjustarg}{5} \glossaryentry{defns.move.assign@ {\memgloterm{defns.move.assign}}{\memglodesc{(\ref {defns.move.assign})}} {\memgloref{}}|memjustarg}{5} \glossaryentry{defns.move.constr@ {\memgloterm{defns.move.constr}}{\memglodesc{(\ref {defns.move.constr})}} {\memgloref{}}|memjustarg}{5} -\glossaryentry{defns.multibyte@ {\memgloterm{defns.multibyte}}{\memglodesc{(\ref {defns.multibyte})}} {\memgloref{}}|memjustarg}{5} \glossaryentry{defns.ntcts@ {\memgloterm{defns.ntcts}}{\memglodesc{(\ref {defns.ntcts})}} {\memgloref{}}|memjustarg}{5} \glossaryentry{defns.observer@ {\memgloterm{defns.observer}}{\memglodesc{(\ref {defns.observer})}} {\memgloref{}}|memjustarg}{5} \glossaryentry{defns.parameter@ {\memgloterm{defns.parameter}}{\memglodesc{(\ref {defns.parameter})}} {\memgloref{}}|memjustarg}{6} From 33e56641d63c5993d288082cf264a733464ff75c Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Tue, 25 Oct 2022 17:48:03 -0400 Subject: [PATCH 054/257] [stack.syn, queue.syn] Add xref comments to class synopses (#5913) --- source/containers.tex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/containers.tex b/source/containers.tex index 35df5c97ae..1ff85c6de6 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -13168,6 +13168,7 @@ #include // see \ref{initializer.list.syn} namespace std { + // \ref{queue}, class template \tcode{queue} template> class queue; template @@ -13191,6 +13192,7 @@ template struct uses_allocator, Alloc>; + // \ref{priority.queue}, class template \tcode{priority_queue} template, class Compare = less> class priority_queue; @@ -13211,6 +13213,7 @@ #include // see \ref{initializer.list.syn} namespace std { + // \ref{stack}, class template \tcode{stack} template> class stack; template From 90aa7729b9a926622581354284ecf294a56e410b Mon Sep 17 00:00:00 2001 From: Will Hawkins <8715530+hawkinsw@users.noreply.github.com> Date: Tue, 1 Nov 2022 04:37:52 -0400 Subject: [PATCH 055/257] [range.dangling] Replace "tag type" with just "type" (#5922) The extra word "tag" was not adding any value and was potentially, confusing; e.g. the "dangling" type is not like, say, an iterator tag that would be used for overload resolution. --- source/ranges.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 2f183916c4..6e2da00885 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2138,7 +2138,7 @@ \rSec2[range.dangling]{Dangling iterator handling} \pnum -The tag type \tcode{dangling} is used together with the template aliases +The type \tcode{dangling} is used together with the template aliases \tcode{borrowed_iterator_t} and \tcode{borrowed_subrange_t}. When an algorithm that typically returns an iterator into, or a subrange of, a range argument @@ -2146,7 +2146,7 @@ that does not model \libconcept{borrowed_range}\iref{range.range}, the return value possibly refers to a range whose lifetime has ended. In such cases, -the tag type \tcode{dangling} is returned instead of an iterator or subrange. +the type \tcode{dangling} is returned instead of an iterator or subrange. \indexlibraryglobal{dangling}% \begin{codeblock} namespace std::ranges { From c6adb7a69c8595fd8a2e4003b19a433cba1a4cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Sat, 5 Nov 2022 06:52:02 -0400 Subject: [PATCH 056/257] [temp.res.general] Format name in code font (#5935) --- source/templates.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/templates.tex b/source/templates.tex index 8b647c0dbf..d997d3b524 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -4213,7 +4213,7 @@ struct D : B { T get() { return operator T(); } // \grammarterm{conversion-function-id} is dependent }; -int f(D d) { return d.get(); } // OK, lookup finds A::operator int +int f(D d) { return d.get(); } // OK, lookup finds \tcode{A::operator int} \end{codeblock} \end{example} \begin{example} From fd998c52af2dc6b9c73098fdbd5a22444a358448 Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Tue, 1 Nov 2022 10:45:53 -0400 Subject: [PATCH 057/257] [flat.set] [flat.multiset] Use value_type, not key_type For consistency with the other `set`, `unordered_set` containers. `key_type` is a synonym for `value_type`, and there's no reason the flat containers need to depart from existing practice here. --- source/containers.tex | 57 ++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 1ff85c6de6..3f47ecb8c5 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -16402,23 +16402,23 @@ template flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Allocator& a); - flat_set(initializer_list il, const key_compare& comp = key_compare()) + flat_set(initializer_list il, const key_compare& comp = key_compare()) : flat_set(il.begin(), il.end(), comp) { } template - flat_set(initializer_list il, const key_compare& comp, const Allocator& a); + flat_set(initializer_list il, const key_compare& comp, const Allocator& a); template - flat_set(initializer_list il, const Allocator& a); + flat_set(initializer_list il, const Allocator& a); - flat_set(sorted_unique_t s, initializer_list il, + flat_set(sorted_unique_t s, initializer_list il, const key_compare& comp = key_compare()) : flat_set(s, il.begin(), il.end(), comp) { } template - flat_set(sorted_unique_t, initializer_list il, + flat_set(sorted_unique_t, initializer_list il, const key_compare& comp, const Allocator& a); template - flat_set(sorted_unique_t, initializer_list il, const Allocator& a); + flat_set(sorted_unique_t, initializer_list il, const Allocator& a); - flat_set& operator=(initializer_list); + flat_set& operator=(initializer_list); // iterators iterator begin() noexcept; @@ -16464,9 +16464,9 @@ template<@\exposconcept{container-compatible-range}@ R> void insert_range(R&& rg); - void insert(initializer_list il) + void insert(initializer_list il) { insert(il.begin(), il.end()); } - void insert(sorted_unique_t s, initializer_list il) + void insert(sorted_unique_t s, initializer_list il) { insert(s, il.begin(), il.end()); } container_type extract() &&; @@ -16643,14 +16643,14 @@ template flat_set(sorted_unique_t, InputIterator first, InputIterator last, const Allocator& a); template - flat_set(initializer_list il, const key_compare& comp, const Allocator& a); + flat_set(initializer_list il, const key_compare& comp, const Allocator& a); template - flat_set(initializer_list il, const Allocator& a); + flat_set(initializer_list il, const Allocator& a); template - flat_set(sorted_unique_t, initializer_list il, + flat_set(sorted_unique_t, initializer_list il, const key_compare& comp, const Allocator& a); template - flat_set(sorted_unique_t, initializer_list il, const Allocator& a); + flat_set(sorted_unique_t, initializer_list il, const Allocator& a); \end{itemdecl} \begin{itemdescr} @@ -17004,23 +17004,24 @@ flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, const Allocator& a); - flat_multiset(initializer_list il, const key_compare& comp = key_compare()) + flat_multiset(initializer_list il, const key_compare& comp = key_compare()) : flat_multiset(il.begin(), il.end(), comp) { } template - flat_multiset(initializer_list il, const key_compare& comp, const Allocator& a); + flat_multiset(initializer_list il, const key_compare& comp, + const Allocator& a); template - flat_multiset(initializer_list il, const Allocator& a); + flat_multiset(initializer_list il, const Allocator& a); - flat_multiset(sorted_equivalent_t s, initializer_list il, + flat_multiset(sorted_equivalent_t s, initializer_list il, const key_compare& comp = key_compare()) : flat_multiset(s, il.begin(), il.end(), comp) { } template - flat_multiset(sorted_equivalent_t, initializer_list il, + flat_multiset(sorted_equivalent_t, initializer_list il, const key_compare& comp, const Allocator& a); template - flat_multiset(sorted_equivalent_t, initializer_list il, const Allocator& a); + flat_multiset(sorted_equivalent_t, initializer_list il, const Allocator& a); - flat_multiset& operator=(initializer_list); + flat_multiset& operator=(initializer_list); // iterators iterator begin() noexcept; @@ -17064,9 +17065,9 @@ template<@\exposconcept{container-compatible-range}@ R> void insert_range(R&& rg); - void insert(initializer_list il) + void insert(initializer_list il) { insert(il.begin(), il.end()); } - void insert(sorted_equivalent_t s, initializer_list il) + void insert(sorted_equivalent_t s, initializer_list il) { insert(s, il.begin(), il.end()); } container_type extract() &&; @@ -17243,14 +17244,14 @@ template flat_multiset(sorted_equivalent_t, InputIterator first, InputIterator last, const Allocator& a); template - flat_multiset(initializer_list il, const key_compare& comp, const Allocator& a); + flat_multiset(initializer_list il, const key_compare& comp, const Allocator& a); template - flat_multiset(initializer_list il, const Allocator& a); + flat_multiset(initializer_list il, const Allocator& a); template - flat_multiset(sorted_equivalent_t, initializer_list il, + flat_multiset(sorted_equivalent_t, initializer_list il, const key_compare& comp, const Allocator& a); template - flat_multiset(sorted_equivalent_t, initializer_list il, const Allocator& a); + flat_multiset(sorted_equivalent_t, initializer_list il, const Allocator& a); \end{itemdecl} \begin{itemdescr} @@ -17275,11 +17276,11 @@ \begin{itemdescr} \pnum \constraints -\tcode{is_constructible_v} is \tcode{true}. +\tcode{is_constructible_v} is \tcode{true}. \pnum \effects -First, initializes an object \tcode{t} of type \tcode{key_type} +First, initializes an object \tcode{t} of type \tcode{value_type} with \tcode{std::forward(args)...}, then inserts \tcode{t} as if by: \begin{codeblock} From 48ecaaec300de4a8176c116408cac915142166ce Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Mon, 7 Nov 2022 14:02:40 -0500 Subject: [PATCH 058/257] [flat.multiset.modifiers] Fix typo in "multiset" (#5927) --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index 3f47ecb8c5..398a327ac4 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -17293,7 +17293,7 @@ An iterator that points to the inserted element. \end{itemdescr} -\indexlibrarymember{insert}{flat_mulitset}% +\indexlibrarymember{insert}{flat_multiset}% \begin{itemdecl} template void insert(InputIterator first, InputIterator last); From 45d9a5ba5aee1e3c4da8938e12376b36a7147d63 Mon Sep 17 00:00:00 2001 From: Eric41293 Date: Mon, 7 Nov 2022 11:11:58 -0800 Subject: [PATCH 059/257] [climits.syn] Correct note about types of macros (#5926) This note was added apparently as a response to LWG 416. However, there may have been a misunderstanding of the C standard, and in fact only the macros for `{signed,unsigned,} char` and `{signed,unsigned} int` have a different type. --- source/support.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/support.tex b/source/support.tex index e5ecee3876..3ac4e30d69 100644 --- a/source/support.tex +++ b/source/support.tex @@ -1744,8 +1744,9 @@ The header \libheader{climits} defines all macros the same as the C standard library header \libheader{limits.h}. \begin{note} -The types of the constants defined by macros in \libheader{climits} are not -required to match the types to which the macros refer. +Except for \tcode{CHAR_BIT} and \tcode{MB_LEN_MAX}, a macro referring to +an integer type \tcode{T} defines a constant whose type is the promoted +type of \tcode{T}\iref{conv.prom}. \end{note} \xrefc{5.2.4.2.1} From f41cd00273e6ee7ff1a29446b21f230c28bf1a9f Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 7 Nov 2022 20:59:54 +0000 Subject: [PATCH 060/257] [time.clock.system.nonmembers, time.zone.zonedtime.nonmembers] Add to STATICALLY-WIDEN (#5934) --- source/time.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/time.tex b/source/time.tex index 2263d4b7cc..a02108c039 100644 --- a/source/time.tex +++ b/source/time.tex @@ -2717,7 +2717,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), tp); +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T}"), tp); \end{codeblock} \pnum @@ -10100,7 +10100,7 @@ \effects Equivalent to: \begin{codeblock} -return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T %Z}"), t); +return os << format(os.getloc(), @\placeholder{STATICALLY-WIDEN}@("{:L%F %T %Z}"), t); \end{codeblock} \end{itemdescr} From 16620f45148d77143c9a473ab26b7d5ce8734bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Wed, 26 Oct 2022 09:03:32 -0400 Subject: [PATCH 061/257] [flat.set.modifiers] Add missing \exposid --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index 398a327ac4..5488a8fa15 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -16789,7 +16789,7 @@ \effects Equivalent to: \begin{codeblock} -ranges::swap(compare, y.compare); +ranges::swap(@\exposid{compare}@, y.@\exposid{compare}@); ranges::swap(@\exposid{c}@, y.@\exposid{c}@); \end{codeblock} \end{itemdescr} From ef7d0e234722d2ef8b4ec069b6f929dc083d8dc7 Mon Sep 17 00:00:00 2001 From: Ed Catmur Date: Tue, 20 Sep 2022 18:12:45 +0100 Subject: [PATCH 062/257] [meta, thread] Add or amend references to func.{require,invoke} --- source/meta.tex | 4 ++-- source/threads.tex | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source/meta.tex b/source/meta.tex index 11f69c16e7..a42cb62c0d 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -1471,7 +1471,7 @@ \indexlibraryglobal{is_invocable}% \tcode{template}\br \tcode{struct is_invocable;} & - The expression \tcode{\placeholdernc{INVOKE}(declval(), declval()...)} + The expression \tcode{\placeholdernc{INVOKE}(declval(), declval()...)}\iref{func.require} is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand} & \tcode{Fn} and all types in the template parameter pack \tcode{ArgTypes} shall be complete types, \cv{}~\keyword{void}, or @@ -1900,7 +1900,7 @@ \tcode{class... ArgTypes>}\br \tcode{struct invoke_result;} & - If the expression \tcode{\placeholdernc{INVOKE}(declval(), declval()...)} + If the expression \tcode{\placeholdernc{INVOKE}(declval(), declval()...)}\iref{func.require} is well-formed when treated as an unevaluated operand\iref{term.unevaluated.operand}, the member typedef \tcode{type} denotes the type \tcode{decltype(\placeholdernc{INVOKE}(declval(), declval()...))}; diff --git a/source/threads.tex b/source/threads.tex index 8ae392e2a5..2179d57ae6 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -1338,7 +1338,8 @@ \effects The new thread of execution executes \begin{codeblock} -invoke(auto(std::forward(f)), auto(std::forward(args))...) +invoke(auto(std::forward(f)), // for \tcode{invoke}, see \ref{func.invoke} + auto(std::forward(args))...) \end{codeblock} with the values produced by \tcode{auto} being materialized\iref{conv.rval} in the constructing thread. @@ -1669,7 +1670,7 @@ Initializes \tcode{ssource}. The new thread of execution executes \begin{codeblock} -invoke(auto(std::forward(f)), get_stop_token(), +invoke(auto(std::forward(f)), get_stop_token(), // for \tcode{invoke}, see \ref{func.invoke} auto(std::forward(args))...) \end{codeblock} if that expression is well-formed, @@ -8096,7 +8097,7 @@ is an \term{active} execution. An active execution calls \tcode{\placeholdernc{INVOKE}(\brk{}% std::forward(func), -std::forward(args)...)}. If such a call to \tcode{func} +std::forward(args)...)}\iref{func.require}. If such a call to \tcode{func} throws an exception the execution is \term{exceptional}, otherwise it is \term{returning}. An exceptional execution propagates the exception to the caller of \tcode{call_once}. Among all executions of \tcode{call_once} for any given @@ -11115,7 +11116,7 @@ \begin{itemize} \item If \tcode{launch::async} is set in \tcode{policy}, calls -\tcode{invoke(auto(std::forward(f)), auto(std::for\-ward(args))...)}\iref{func.require,thread.thread.constr} +\tcode{invoke(auto(std::forward(f)), auto(std::for\-ward(args))...)}\iref{func.invoke,thread.thread.constr} as if in a new thread of execution represented by a \tcode{thread} object with the values produced by \tcode{auto} being materialized\iref{conv.rval} in the thread that called \tcode{async}. From e66269302b5b551af64c644215e6c6f40dc475fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Mon, 7 Nov 2022 23:39:37 +0000 Subject: [PATCH 063/257] [func.require] Add main index entry for INVOKE --- source/utilities.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/utilities.tex b/source/utilities.tex index c89bdcc2e4..92c7a8147d 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -10009,6 +10009,7 @@ \rSec2[func.require]{Requirements} \pnum +\indextext{invoke@\tcode{\placeholder{INVOKE}}}% \indexlibrary{invoke@\tcode{\placeholder{INVOKE}}}% Define \tcode{\placeholdernc{INVOKE}(f, t$_1$, t$_2$, $\dotsc$, t$_N$)} as follows: \begin{itemize} From 0d5c9b9310b2f6c6c4259665e1e680936babdc3d Mon Sep 17 00:00:00 2001 From: Eric41293 Date: Mon, 7 Nov 2022 15:54:55 -0800 Subject: [PATCH 064/257] [meta.type.synop] Capitalize NTTP name (#5921) --- source/meta.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/meta.tex b/source/meta.tex index a42cb62c0d..70921fee78 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -352,10 +352,10 @@ using @\libglobal{remove_cvref_t}@ = typename remove_cvref::type; template using @\libglobal{decay_t}@ = typename decay::type; - template - using @\libglobal{enable_if_t}@ = typename enable_if::type; - template - using @\libglobal{conditional_t}@ = typename conditional::type; + template + using @\libglobal{enable_if_t}@ = typename enable_if::type; + template + using @\libglobal{conditional_t}@ = typename conditional::type; template using @\libglobal{common_type_t}@ = typename common_type::type; template From af8015c275b46a1a07cd93a6b8b4eed4adbb1817 Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Fri, 9 Sep 2022 01:59:38 +0800 Subject: [PATCH 065/257] [ranges] Add \libconcept for "view" in adaptor Overview subclauses --- source/ranges.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 6e2da00885..6d03214306 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -9975,7 +9975,7 @@ produces a \libconcept{view} whose $M^\text{th}$ element is the result of applying the invocable object -to the $M^\text{th}$ elements of all views. +to the $M^\text{th}$ elements of all \libconcept{view}s. \pnum \indexlibrarymember{zip_transform}{views}% @@ -10506,8 +10506,8 @@ produces a \libconcept{view} whose $M^\text{th}$ element is a tuple of references to the $M^\text{th}$ through $(M + N - 1)^\text{th}$ elements of -the original view. -If the original view has fewer than $N$ elements, the resulting view is empty. +the original \libconcept{view}. +If the original \libconcept{view} has fewer than $N$ elements, the resulting \libconcept{view} is empty. \pnum \indexlibrarymember{adjacent}{views}% @@ -11137,8 +11137,8 @@ a \libconcept{view} and produces a \libconcept{view} whose $M^\text{th}$ element is the result of applying the invocable object to the $M^\text{th}$ through $(M + N - 1)^\text{th}$ elements -of the original view. -If the original view has fewer than $N$ elements, the resulting view is empty. +of the original \libconcept{view}. +If the original \libconcept{view} has fewer than $N$ elements, the resulting \libconcept{view} is empty. \pnum \indexlibrarymember{adjacent_transform}{views}% @@ -14208,7 +14208,7 @@ \indexlibraryglobal{cartesian_product_view}% \pnum \tcode{cartesian_product_view} takes any non-zero number of ranges $n$ and -produces a view of tuples calculated by +produces a \libconcept{view} of tuples calculated by the $n$-ary cartesian product of the provided ranges. \pnum From 440095af3d065e463732f61d79c80ed606a08412 Mon Sep 17 00:00:00 2001 From: hewillk Date: Sun, 18 Sep 2022 01:39:31 +0800 Subject: [PATCH 066/257] [ranges] Use plain font for "view" when it does not refer to a concept (#5819) --- source/ranges.tex | 142 +++++++++++++++++++++++----------------------- 1 file changed, 70 insertions(+), 72 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 6d03214306..acd633f132 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1476,7 +1476,7 @@ \pnum \begin{example} -Examples of \libconcept{view}s are: +Examples of views are: \begin{itemize} \item A \libconcept{range} type that wraps a pair of iterators. @@ -1606,7 +1606,7 @@ \pnum The \libconcept{viewable_range} concept specifies the requirements of a -\libconcept{range} type that can be converted to a \libconcept{view} safely. +\libconcept{range} type that can be converted to a view safely. \begin{itemdecl} template @@ -1663,7 +1663,7 @@ \pnum The class template \tcode{view_interface} is a helper for defining -\libconcept{view}-like types that offer a container-like interface. It is +view-like types that offer a container-like interface. It is parameterized with the type that is derived from it. \indexlibraryglobal{view_interface}% @@ -2444,7 +2444,7 @@ \pnum Subclause \ref{range.factories} defines \term{range factories}, -which are utilities to create a \libconcept{view}. +which are utilities to create a view. \pnum Range factories are declared in namespace \tcode{std::ranges::views}. @@ -2454,7 +2454,7 @@ \rSec3[range.empty.overview]{Overview} \pnum -\tcode{empty_view} produces a \libconcept{view} of no elements of +\tcode{empty_view} produces a view of no elements of a particular type. \pnum @@ -2489,7 +2489,7 @@ \rSec3[range.single.overview]{Overview} \pnum -\tcode{single_view} produces a \libconcept{view} that contains +\tcode{single_view} produces a view that contains exactly one element of a specified value. \pnum @@ -3983,7 +3983,7 @@ \pnum Subclause \ref{range.adaptors} defines \term{range adaptors}, which are utilities that transform a -\libconcept{range} into a \libconcept{view} with custom behaviors. These +\libconcept{range} into a view with custom behaviors. These adaptors can be chained to create pipelines of range transformations that evaluate lazily as the resulting view is iterated. @@ -4080,8 +4080,7 @@ \pnum A \term{range adaptor object} is a customization point object\iref{customization.point.object} -that accepts a \libconcept{viewable_range} as its first argument and returns a -\libconcept{view}. +that accepts a \libconcept{viewable_range} as its first argument and returns a view. \pnum If a range adaptor object accepts only one argument, @@ -4286,7 +4285,7 @@ \pnum \indexlibrarymember{all}{views}% -\tcode{views::all} returns a \libconcept{view} that includes all elements of +\tcode{views::all} returns a view that includes all elements of its \libconcept{range} argument. \pnum @@ -4306,7 +4305,7 @@ \rSec3[range.ref.view]{Class template \tcode{ref_view}} \pnum -\tcode{ref_view} is a \libconcept{view} of the elements of some other \libconcept{range}. +\tcode{ref_view} is a view of the elements of some other \libconcept{range}. \indexlibraryglobal{ref_view}% \begin{codeblock} namespace std::ranges { @@ -4432,7 +4431,7 @@ \rSec3[range.as.rvalue.overview]{Overview} \pnum -\tcode{as_rvalue_view} presents a \libconcept{view} of an underlying sequence +\tcode{as_rvalue_view} presents a view of an underlying sequence with the same behavior as the underlying sequence except that its elements are rvalues. Some generic algorithms can be called with a \tcode{as_rvalue_view} @@ -4522,7 +4521,7 @@ \rSec3[range.filter.overview]{Overview} \pnum -\tcode{filter_view} presents a \libconcept{view} of the elements +\tcode{filter_view} presents a view of the elements of an underlying sequence that satisfy a predicate. \pnum @@ -4947,7 +4946,7 @@ \pnum \tcode{transform_view} presents -a \libconcept{view} of an underlying sequence after +a view of an underlying sequence after applying a transformation function to each element. \pnum @@ -5625,9 +5624,9 @@ \rSec3[range.take.overview]{Overview} \pnum -\tcode{take_view} produces a \libconcept{view} of the first $N$ elements -from another \libconcept{view}, or all the elements if the adapted -\libconcept{view} contains fewer than $N$. +\tcode{take_view} produces a view of the first $N$ elements +from another view, or all the elements if the adapted +view contains fewer than $N$. \pnum \indexlibrarymember{take}{views}% @@ -5895,8 +5894,8 @@ \rSec3[range.take.while.overview]{Overview} \pnum -Given a unary predicate \tcode{pred} and a \libconcept{view} \tcode{r}, -\tcode{take_while_view} produces a \libconcept{view} +Given a unary predicate \tcode{pred} and a view \tcode{r}, +\tcode{take_while_view} produces a view of the range \range{ranges::be\-gin(r)}{ranges::find_if_not(r, pred)}. \indexlibraryglobal{take_while}% @@ -6073,9 +6072,9 @@ \rSec3[range.drop.overview]{Overview} \pnum -\tcode{drop_view} produces a \libconcept{view} -excluding the first $N$ elements from another \libconcept{view}, or -an empty range if the adapted \libconcept{view} contains fewer than $N$ elements. +\tcode{drop_view} produces a view +excluding the first $N$ elements from another view, or +an empty range if the adapted view contains fewer than $N$ elements. \pnum \indexlibrarymember{drop}{views}% @@ -6255,8 +6254,8 @@ \rSec3[range.drop.while.overview]{Overview} \pnum -Given a unary predicate \tcode{pred} and a \libconcept{view} \tcode{r}, -\tcode{drop_while_view} produces a \libconcept{view} +Given a unary predicate \tcode{pred} and a view \tcode{r}, +\tcode{drop_while_view} produces a view of the range \range{ranges::find_if_not(r, pred)}{ranges::end(r)}. \pnum @@ -6369,8 +6368,7 @@ \rSec3[range.join.overview]{Overview} \pnum -\tcode{join_view} flattens a \libconcept{view} of ranges into a -\libconcept{view}. +\tcode{join_view} flattens a view of ranges into a view. \pnum \indexlibrarymember{join}{views}% @@ -6857,11 +6855,11 @@ \rSec3[range.join.with.overview]{Overview} \pnum -\tcode{join_with_view} takes a \libconcept{view} and a delimiter, and -flattens the \libconcept{view}, +\tcode{join_with_view} takes a view and a delimiter, and +flattens the view, inserting every element of the delimiter -in between elements of the \libconcept{view}. -The delimiter can be a single element or a \libconcept{view} of elements. +in between elements of the view. +The delimiter can be a single element or a view of elements. \pnum \indexlibrarymember{join_with}{views}% @@ -7440,9 +7438,9 @@ \rSec3[range.lazy.split.overview]{Overview} \pnum -\tcode{lazy_split_view} takes a \libconcept{view} and a delimiter, and splits -the \libconcept{view} into subranges on the delimiter. The delimiter can be -a single element or a \libconcept{view} of elements. +\tcode{lazy_split_view} takes a view and a delimiter, and splits +the view into subranges on the delimiter. The delimiter can be +a single element or a view of elements. \pnum \indexlibrarymember{lazy_split}{views}% @@ -8002,9 +8000,9 @@ \rSec3[range.split.overview]{Overview} \pnum -\tcode{split_view} takes a \libconcept{view} and a delimiter, and -splits the \libconcept{view} into \tcode{subrange}s on the delimiter. -The delimiter can be a single element or a \libconcept{view} of elements. +\tcode{split_view} takes a view and a delimiter, and +splits the view into \tcode{subrange}s on the delimiter. +The delimiter can be a single element or a view of elements. \pnum The name \tcode{views::split} denotes @@ -8301,7 +8299,7 @@ \pnum \indextext{range!counted}% -A counted view presents a \libconcept{view} of the elements +A counted view presents a view of the elements of the counted range\iref{iterator.requirements.general} \countedrange{i}{n} for an iterator \tcode{i} and non-negative integer \tcode{n}. @@ -8343,8 +8341,8 @@ \rSec3[range.common.overview]{Overview} \pnum -\tcode{common_view} takes a \libconcept{view} which has different types for -its iterator and sentinel and turns it into a \libconcept{view} of the same +\tcode{common_view} takes a view which has different types for +its iterator and sentinel and turns it into a view of the same elements with an iterator and sentinel of the same type. \pnum @@ -8462,8 +8460,8 @@ \rSec3[range.reverse.overview]{Overview} \pnum -\tcode{reverse_view} takes a bidirectional \libconcept{view} and produces -another \libconcept{view} that iterates the same elements in reverse order. +\tcode{reverse_view} takes a bidirectional view and produces +another view that iterates the same elements in reverse order. \pnum \indexlibrarymember{reverse}{views}% @@ -8606,7 +8604,7 @@ \rSec3[range.as.const.overview]{Overview} \pnum -\tcode{as_const_view} presents a \libconcept{view} of an underlying sequence as constant. +\tcode{as_const_view} presents a view of an underlying sequence as constant. That is, the elements of an \tcode{as_const_view} cannot be modified. \pnum @@ -8694,9 +8692,9 @@ \pnum \tcode{elements_view} takes -a \libconcept{view} of tuple-like values and a \tcode{size_t}, and -produces a \libconcept{view} with a value-type of the $N^\text{th}$ element -of the adapted \libconcept{view}'s value-type. +a view of tuple-like values and a \tcode{size_t}, and +produces a view with a value-type of the $N^\text{th}$ element +of the adapted view's value-type. \pnum \indexlibrarymember{elements}{views}% @@ -9343,8 +9341,8 @@ \pnum \indexlibraryglobal{zip_view}% -\tcode{zip_view} takes any number of \libconcept{view}s and -produces a \libconcept{view} of tuples of references +\tcode{zip_view} takes any number of views and +produces a view of tuples of references to the corresponding elements of the constituent views. \pnum @@ -9971,11 +9969,11 @@ \pnum \indexlibraryglobal{zip_transform_view}% \tcode{zip_transform_view} takes an invocable object and -any number of \libconcept{view}s and -produces a \libconcept{view} +any number of views and +produces a view whose $M^\text{th}$ element is the result of applying the invocable object -to the $M^\text{th}$ elements of all \libconcept{view}s. +to the $M^\text{th}$ elements of all views. \pnum \indexlibrarymember{zip_transform}{views}% @@ -10502,12 +10500,12 @@ \pnum \indexlibraryglobal{adjacent_view}% -\tcode{adjacent_view} takes a \libconcept{view} and -produces a \libconcept{view} whose $M^\text{th}$ element is +\tcode{adjacent_view} takes a view and +produces a view whose $M^\text{th}$ element is a tuple of references to the $M^\text{th}$ through $(M + N - 1)^\text{th}$ elements of -the original \libconcept{view}. -If the original \libconcept{view} has fewer than $N$ elements, the resulting \libconcept{view} is empty. +the original view. +If the original view has fewer than $N$ elements, the resulting view is empty. \pnum \indexlibrarymember{adjacent}{views}% @@ -11134,11 +11132,11 @@ \pnum \indexlibraryglobal{adjacent_transform_view}% \tcode{adjacent_transform_view} takes an invocable object and -a \libconcept{view} and produces a \libconcept{view} +a view and produces a view whose $M^\text{th}$ element is the result of applying the invocable object to the $M^\text{th}$ through $(M + N - 1)^\text{th}$ elements -of the original \libconcept{view}. -If the original \libconcept{view} has fewer than $N$ elements, the resulting \libconcept{view} is empty. +of the original view. +If the original view has fewer than $N$ elements, the resulting view is empty. \pnum \indexlibrarymember{adjacent_transform}{views}% @@ -11645,11 +11643,11 @@ \rSec3[range.chunk.overview]{Overview} \pnum -\tcode{chunk_view} takes a \libconcept{view} and a number $N$ and -produces a range of \libconcept{view}s +\tcode{chunk_view} takes a view and a number $N$ and +produces a range of views that are $N$-sized non-overlapping successive chunks of -the elements of the original \libconcept{view}, in order. -The last \libconcept{view} in the range can have fewer than $N$ elements. +the elements of the original view, in order. +The last view in the range can have fewer than $N$ elements. \pnum \indexlibrarymember{chunk}{views}% @@ -12609,14 +12607,14 @@ \rSec3[range.slide.overview]{Overview} \pnum -\tcode{slide_view} takes a \libconcept{view} and a number $N$ and -produces a \libconcept{view} -whose $M^\text{th}$ element is a \libconcept{view} over +\tcode{slide_view} takes a view and a number $N$ and +produces a view +whose $M^\text{th}$ element is a view over the $M^\text{th}$ through $(M + N - 1)^\text{th}$ elements -of the original \libconcept{view}. -If the original \libconcept{view} has fewer than $N$ elements, -the resulting \libconcept{view} is empty. +of the original view. +If the original view has fewer than $N$ elements, +the resulting view is empty. \pnum \indexlibrarymember{slide}{views}% @@ -13264,8 +13262,8 @@ \rSec3[range.chunk.by.overview]{Overview} \pnum -\tcode{chunk_by_view} takes a \libconcept{view} and a predicate, and -splits the \libconcept{view} into \tcode{subrange}s +\tcode{chunk_by_view} takes a view and a predicate, and +splits the view into \tcode{subrange}s between each pair of adjacent elements for which the predicate returns \tcode{false}. @@ -13593,7 +13591,7 @@ \rSec3[range.stride.overview]{Overview} \pnum -\tcode{stride_view} presents a \libconcept{view} of an underlying sequence, +\tcode{stride_view} presents a view of an underlying sequence, advancing over $n$ elements at a time, as opposed to the usual single-step succession. @@ -14208,7 +14206,7 @@ \indexlibraryglobal{cartesian_product_view}% \pnum \tcode{cartesian_product_view} takes any non-zero number of ranges $n$ and -produces a \libconcept{view} of tuples calculated by +produces a view of tuples calculated by the $n$-ary cartesian product of the provided ranges. \pnum @@ -14967,7 +14965,7 @@ \pnum Class template \tcode{generator} presents -a \libconcept{view} of the elements yielded by the evaluation of a coroutine. +a view of the elements yielded by the evaluation of a coroutine. \pnum A \tcode{generator} generates a sequence of elements by From a8b9fe2b7651b2acd773eb4e2f1bb088c783f3c9 Mon Sep 17 00:00:00 2001 From: hewillk Date: Mon, 26 Sep 2022 01:17:42 +0800 Subject: [PATCH 067/257] [ranges] Use plain font for "range" when it does not refer to a concept (#5819) --- source/ranges.tex | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index acd633f132..c4d39caa78 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1303,7 +1303,7 @@ \pnum \begin{note} Equality preservation of both \tcode{ranges::begin} and -\tcode{ranges::end} enables passing a \libconcept{range} whose iterator +\tcode{ranges::end} enables passing a range whose iterator type models \libconcept{forward_iterator} to multiple algorithms and making multiple passes over the range by repeated calls to \tcode{ranges::begin} and \tcode{ranges::end}. @@ -3983,7 +3983,7 @@ \pnum Subclause \ref{range.adaptors} defines \term{range adaptors}, which are utilities that transform a -\libconcept{range} into a view with custom behaviors. These +range into a view with custom behaviors. These adaptors can be chained to create pipelines of range transformations that evaluate lazily as the resulting view is iterated. @@ -4012,7 +4012,7 @@ \pnum A \term{range adaptor closure object} is a unary function object that accepts -a \libconcept{range} argument. For +a range argument. For a range adaptor closure object \tcode{C} and an expression \tcode{R} such that \tcode{decltype((R))} models \libconcept{range}, the following expressions are equivalent: @@ -4045,7 +4045,7 @@ Given an object \tcode{t} of type \tcode{T}, where \begin{itemize} \item -\tcode{t} is a unary function object that accepts a \libconcept{range} argument, +\tcode{t} is a unary function object that accepts a range argument, \item \tcode{T} models \tcode{\libconcept{derived_from}>}, \item @@ -4286,7 +4286,7 @@ \pnum \indexlibrarymember{all}{views}% \tcode{views::all} returns a view that includes all elements of -its \libconcept{range} argument. +its range argument. \pnum The name \tcode{views::all} denotes a @@ -4305,7 +4305,7 @@ \rSec3[range.ref.view]{Class template \tcode{ref_view}} \pnum -\tcode{ref_view} is a view of the elements of some other \libconcept{range}. +\tcode{ref_view} is a view of the elements of some other range. \indexlibraryglobal{ref_view}% \begin{codeblock} namespace std::ranges { @@ -4370,7 +4370,7 @@ \pnum \tcode{owning_view} is a move-only view -of the elements of some other \libconcept{range}. +of the elements of some other range. \begin{codeblock} namespace std::ranges { template<@\libconcept{range}@ R> From 0959b5c200a6f2b543e2d656850917b8d788767c Mon Sep 17 00:00:00 2001 From: Hui <65944694+huixie90@users.noreply.github.com> Date: Tue, 8 Nov 2022 00:49:15 +0000 Subject: [PATCH 068/257] [range.drop.while.overview] Use string_view rather than string literal (#5897) The string literal would have been treated as a `const char*`, which is not a range. --- source/ranges.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index c4d39caa78..f0108ede6c 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -6269,7 +6269,7 @@ \pnum \begin{example} \begin{codeblock} -constexpr auto source = " \t \t \t hello there"; +constexpr auto source = " \t \t \t hello there"sv; auto is_invisible = [](const auto x) { return x == ' ' || x == '\t'; }; auto skip_ws = views::drop_while(source, is_invisible); for (auto c : skip_ws) { From 720c3ae24a68fda02a6372eda13ec3f9c6a1a39b Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 8 Nov 2022 02:01:34 +0000 Subject: [PATCH 069/257] [time.format] Use basic_ostringstream instead of ostringstream (#5932) --- source/time.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/time.tex b/source/time.tex index a02108c039..1f97197252 100644 --- a/source/time.tex +++ b/source/time.tex @@ -10787,7 +10787,7 @@ \pnum If the \fmtgrammarterm{chrono-specs} is omitted, the chrono object is formatted -as if by streaming it to \tcode{std::ostringstream os} +as if by streaming it to \tcode{basic_ostring\-stream os} with the formatting locale imbued and copying \tcode{os.str()} through the output iterator of the context with additional padding and adjustments as specified by the format specifiers. From 033924f7dfbd74eeb11153895353e5f3462ff03c Mon Sep 17 00:00:00 2001 From: Alisdair Meredith Date: Mon, 7 Nov 2022 16:04:48 -1000 Subject: [PATCH 070/257] [index] Remove stale index entry for removed term (#5873) The notion of a "basic source character set" was removed by P2314R4. --- source/lex.tex | 1 - 1 file changed, 1 deletion(-) diff --git a/source/lex.tex b/source/lex.tex index 0f33bfda64..df7f34c44a 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -66,7 +66,6 @@ \begin{enumerate} \item \indextext{character!source file}% -\indextext{character set!basic source}% An implementation shall support input files that are a sequence of UTF-8 code units (UTF-8 files). It may also support From 8739d316f2a55c633963b26b748681ff16498887 Mon Sep 17 00:00:00 2001 From: Marc Mutz <94039187+marcmutz@users.noreply.github.com> Date: Tue, 8 Nov 2022 03:05:45 +0100 Subject: [PATCH 071/257] [meta.const.eval] Add is_constant_evaluated to index of library names (#5898) Previously, only its feature-test macro was listed there. --- source/meta.tex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/meta.tex b/source/meta.tex index 70921fee78..20ea757642 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -2359,6 +2359,8 @@ \end{note} \rSec2[meta.const.eval]{Constant evaluation context} + +\indexlibraryglobal{is_constant_evaluated}% \begin{itemdecl} constexpr bool is_constant_evaluated() noexcept; \end{itemdecl} From 4c442cf93f03a44ec1f6a93875043a3aca7c5b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Mon, 7 Nov 2022 23:38:36 -0400 Subject: [PATCH 072/257] [class.union.general] Attach example to its note (#5882) --- source/classes.tex | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/classes.tex b/source/classes.tex index 18b57e45fa..1332a352bb 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -3150,12 +3150,8 @@ or destructor\iref{class.dtor}, the corresponding member function of the union must be user-provided or it will be implicitly deleted\iref{dcl.fct.def.delete} for the union. -\end{note} - -\pnum \begin{example} Consider the following union: - \begin{codeblock} union U { int i; @@ -3163,7 +3159,6 @@ std::string s; }; \end{codeblock} - Since \tcode{std::string}\iref{string.classes} declares non-trivial versions of all of the special member functions, \tcode{U} will have an implicitly deleted default constructor, copy/move constructor, @@ -3171,6 +3166,7 @@ To use \tcode{U}, some or all of these member functions must be user-provided. \end{example} +\end{note} \pnum When the left operand of an assignment operator From 65c494b9a4a5a4fab500733441c04e50a787d318 Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Tue, 8 Nov 2022 15:51:21 +0800 Subject: [PATCH 073/257] [mdspan.extents.expo] Remove redundant "// exposition only" (#5907) --- source/containers.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 5488a8fa15..3dba328c87 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -18360,7 +18360,7 @@ \rSec3[mdspan.extents.expo]{Exposition-only helpers} \begin{itemdecl} -static constexpr rank_type @\exposid{dynamic-index}@(rank_type i) noexcept; // \expos +static constexpr rank_type @\exposid{dynamic-index}@(rank_type i) noexcept; \end{itemdecl} \begin{itemdescr} @@ -18374,7 +18374,7 @@ \end{itemdescr} \begin{itemdecl} -static constexpr rank_type @\exposid{dynamic-index-inv}@(rank_type i) noexcept; // \expos +static constexpr rank_type @\exposid{dynamic-index-inv}@(rank_type i) noexcept; \end{itemdecl} \begin{itemdescr} @@ -18389,7 +18389,7 @@ \end{itemdescr} \begin{itemdecl} -constexpr size_t @\exposid{fwd-prod-of-extents}@(rank_type i) const noexcept; // \expos +constexpr size_t @\exposid{fwd-prod-of-extents}@(rank_type i) const noexcept; \end{itemdecl} \begin{itemdescr} @@ -18405,7 +18405,7 @@ \end{itemdescr} \begin{itemdecl} -constexpr size_t @\exposid{rev-prod-of-extents}@(rank_type i) const noexcept; // \expos +constexpr size_t @\exposid{rev-prod-of-extents}@(rank_type i) const noexcept; \end{itemdecl} \begin{itemdescr} @@ -18423,7 +18423,7 @@ \begin{itemdecl} template - static constexpr auto @\exposid{index-cast}@(OtherIndexType&& i) noexcept; // \expos + static constexpr auto @\exposid{index-cast}@(OtherIndexType&& i) noexcept; \end{itemdecl} \begin{itemdescr} From b766881dda1d0201d98710b11efda3491a84b4f2 Mon Sep 17 00:00:00 2001 From: languagelawyer <38548419+languagelawyer@users.noreply.github.com> Date: Tue, 8 Nov 2022 13:15:07 +0500 Subject: [PATCH 074/257] [dcl.init.list] Specify the type of the prvalue (#5919) --- source/declarations.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 52b5847d64..585876b6b7 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -5809,11 +5809,11 @@ \end{example} \item Otherwise, if \tcode{T} is a reference type, a prvalue is generated. -The prvalue initializes its result object by copy-list-initialization. +The prvalue initializes its result object by copy-list-initialization from the initializer list. The prvalue is then used to direct-initialize the reference. -The type of the temporary is the type referenced by \tcode{T}, +The type of the prvalue is the type referenced by \tcode{T}, unless \tcode{T} is ``reference to array of unknown bound of \tcode{U}'', -in which case the type of the temporary is +in which case the type of the prvalue is the type of \tcode{x} in the declaration \tcode{U x[] $H$}, where $H$ is the initializer list. \begin{note} From 34caddcf0d8655f630ebaefbb7dc86719faef7aa Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Thu, 27 Oct 2022 13:15:18 +0800 Subject: [PATCH 075/257] [views.span] Add \exposid for `data_` and `size_` --- source/containers.tex | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 3dba328c87..4f8ac5a8df 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -17587,8 +17587,8 @@ constexpr const_reverse_iterator crend() const noexcept { return rend(); } private: - pointer data_; // \expos - size_type size_; // \expos + pointer @\exposid{data_}@; // \expos + size_type @\exposid{size_}@; // \expos }; template @@ -17661,8 +17661,8 @@ \pnum \effects -Initializes \tcode{data_} with \tcode{to_address(first)} and -\tcode{size_} with \tcode{count}. +Initializes \tcode{\exposid{data_}} with \tcode{to_address(first)} and +\tcode{\exposid{size_}} with \tcode{count}. \pnum \throws @@ -17704,8 +17704,8 @@ \pnum \effects -Initializes \tcode{data_} with \tcode{to_address(first)} and -\tcode{size_} with \tcode{last - first}. +Initializes \tcode{\exposid{data_}} with \tcode{to_address(first)} and +\tcode{\exposid{size_}} with \tcode{last - first}. \pnum \throws @@ -17782,8 +17782,8 @@ \pnum \effects -Initializes \tcode{data_} with \tcode{ranges::data(r)} and -\tcode{size_} with \tcode{ranges::size(r)}. +Initializes \tcode{\exposid{data_}} with \tcode{ranges::data(r)} and +\tcode{\exposid{size_}} with \tcode{ranges::size(r)}. \pnum \throws @@ -18021,7 +18021,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return size_;} +Equivalent to: \tcode{return \exposid{size_};} \end{itemdescr} \indexlibrarymember{span}{size_bytes}% @@ -18101,7 +18101,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return data_;} +Equivalent to: \tcode{return \exposid{data_};} \end{itemdescr} \rSec3[span.iterators]{Iterator support} From 6e035b52e28e95211a39ffb552851499432b2c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Tue, 8 Nov 2022 15:30:29 -0400 Subject: [PATCH 076/257] [ratio.ratio] Use symbol "sgn" for the signum function (#5925) --- source/meta.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/meta.tex b/source/meta.tex index 20ea757642..5010351af6 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -2500,7 +2500,7 @@ \tcode{N} and \tcode{D}: \begin{itemize} -\item \tcode{num} shall have the value \tcode{sign(N) * sign(D) * abs(N) / gcd}. +\item \tcode{num} shall have the value \tcode{$\operatorname{sgn}(\tcode{N})$ * $\operatorname{sgn}(\tcode{D})$ * abs(N) / gcd}. \item \tcode{den} shall have the value \tcode{abs(D) / gcd}. \end{itemize} From 89269f8e548b993b239f2c0f5ecc071ee7f54c9a Mon Sep 17 00:00:00 2001 From: Blackteahamburger Date: Wed, 9 Nov 2022 04:12:59 +0800 Subject: [PATCH 077/257] [dcl.link] Add missing restriction to language linkage application (#5892) A language linkage specification should only apply to entities that do in fact have language linkage. --- source/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/declarations.tex b/source/declarations.tex index 585876b6b7..96f5fc8e91 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -8124,7 +8124,7 @@ In a \grammarterm{linkage-specification}, the specified language linkage applies to the function types of all function declarators and -to all functions and variables. +to all functions and variables whose names have external linkage. \begin{example} \begin{codeblock} extern "C" // \tcode{f1} and its function type have C language linkage; From ea77b2fa83ddac0c52c1b505ff666328a2a8f558 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Wed, 9 Nov 2022 00:34:26 +0100 Subject: [PATCH 078/257] [temp.deduct.general] Fix typo in comment in example --- source/templates.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/templates.tex b/source/templates.tex index d997d3b524..cc347017a9 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -7302,7 +7302,7 @@ \begin{example} \begin{codeblock} template int f(int); -int i2 = f(0); // can't conv \tcode{1} to \tcode{int*} +int i2 = f(0); // can't convert \tcode{1} to \tcode{int*} \end{codeblock} \end{example} From cb7be30f1eaef85f3e055a1f3e861c660101f8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Thu, 10 Nov 2022 01:54:30 +0000 Subject: [PATCH 079/257] [new.syn] Remove extraneous spaces The spaces had been used as "cute spaces" to align `void* x` with `void y`, but the erstwhile aligned partners have since been augmented with `[[nodiscard]]`, which throws off the alignment and removes the justification for the extra spaces. --- source/support.tex | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/source/support.tex b/source/support.tex index 3ac4e30d69..da003c4df7 100644 --- a/source/support.tex +++ b/source/support.tex @@ -2287,12 +2287,12 @@ [[nodiscard]] void* operator new(std::size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept; -void operator delete(void* ptr) noexcept; -void operator delete(void* ptr, std::size_t size) noexcept; -void operator delete(void* ptr, std::align_val_t alignment) noexcept; -void operator delete(void* ptr, std::size_t size, std::align_val_t alignment) noexcept; -void operator delete(void* ptr, const std::nothrow_t&) noexcept; -void operator delete(void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept; +void operator delete(void* ptr) noexcept; +void operator delete(void* ptr, std::size_t size) noexcept; +void operator delete(void* ptr, std::align_val_t alignment) noexcept; +void operator delete(void* ptr, std::size_t size, std::align_val_t alignment) noexcept; +void operator delete(void* ptr, const std::nothrow_t&) noexcept; +void operator delete(void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept; [[nodiscard]] void* operator new[](std::size_t size); [[nodiscard]] void* operator new[](std::size_t size, std::align_val_t alignment); @@ -2300,17 +2300,17 @@ [[nodiscard]] void* operator new[](std::size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept; -void operator delete[](void* ptr) noexcept; -void operator delete[](void* ptr, std::size_t size) noexcept; -void operator delete[](void* ptr, std::align_val_t alignment) noexcept; -void operator delete[](void* ptr, std::size_t size, std::align_val_t alignment) noexcept; -void operator delete[](void* ptr, const std::nothrow_t&) noexcept; -void operator delete[](void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept; +void operator delete[](void* ptr) noexcept; +void operator delete[](void* ptr, std::size_t size) noexcept; +void operator delete[](void* ptr, std::align_val_t alignment) noexcept; +void operator delete[](void* ptr, std::size_t size, std::align_val_t alignment) noexcept; +void operator delete[](void* ptr, const std::nothrow_t&) noexcept; +void operator delete[](void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept; [[nodiscard]] void* operator new (std::size_t size, void* ptr) noexcept; [[nodiscard]] void* operator new[](std::size_t size, void* ptr) noexcept; -void operator delete (void* ptr, void*) noexcept; -void operator delete[](void* ptr, void*) noexcept; +void operator delete (void* ptr, void*) noexcept; +void operator delete[](void* ptr, void*) noexcept; \end{codeblock} \rSec2[new.delete]{Storage allocation and deallocation} From 0c196ec375993000547e8913abb4c4ce703144cb Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Thu, 10 Nov 2022 15:32:56 +0100 Subject: [PATCH 080/257] [temp.deduct.conv] Remove misleading paragraph break --- source/templates.tex | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/templates.tex b/source/templates.tex index cc347017a9..1c261623bc 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -7750,8 +7750,6 @@ Any cv-qualifiers in \tcode{A} that can be restored by a qualification conversion. \end{itemize} - -\pnum These attributes are ignored only if type deduction would otherwise fail. If ignoring them allows more than one possible deduced From 31a7d142bf37603b3798e381a84beb8519f3265d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Sat, 12 Nov 2022 00:37:36 +0000 Subject: [PATCH 081/257] [macros, containers] Make \indexlibrarymisc more reusable, add expos version No visual difference. --- source/containers.tex | 8 ++++---- source/macros.tex | 14 ++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 4f8ac5a8df..86c0eafa90 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -94,7 +94,7 @@ % Local command to index names as members of all containers. \newcommand{\indexcont}[1]{% -\indexlibrarymisc{#1}{containers}% +\indexlibrarymisc{\idxcode{#1}}{containers}% \indexlibrarymemberx{array}{#1}% \indexlibrarymemberx{deque}{#1}% \indexlibrarymemberx{forward_list}{#1}% @@ -627,7 +627,7 @@ % Local command to index names as members of all containers. \renewcommand{\indexcont}[1]{% -\indexlibrarymisc{#1}{reversible containers}% +\indexlibrarymisc{\idxcode{#1}}{reversible containers}% \indexlibrarymemberx{array}{#1}% \indexlibrarymemberx{deque}{#1}% \indexlibrarymemberx{list}{#1}% @@ -976,7 +976,7 @@ % Local command to index names as members of all containers. \renewcommand{\indexcont}[1]{% -\indexlibrarymisc{#1}{allocator-aware containers}% +\indexlibrarymisc{\idxcode{#1}}{allocator-aware containers}% \indexlibrarymemberx{deque}{#1}% \indexlibrarymemberx{forward_list}{#1}% \indexlibrarymemberx{list}{#1}% @@ -1312,7 +1312,7 @@ % Local command to index names as members of all containers. \renewcommand{\indexcont}[1]{% -\indexlibrarymisc{#1}{sequence containers}% +\indexlibrarymisc{\idxcode{#1}}{sequence containers}% \indexlibrarymemberx{deque}{#1}% \indexlibrarymemberx{forward_list}{#1}% \indexlibrarymemberx{list}{#1}% diff --git a/source/macros.tex b/source/macros.tex index 295267bf98..9f2e6d15a8 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -191,15 +191,17 @@ \newcommand{\idxxname}[1]{__#1@\xname{#1}} % library index entries -\newcommand{\indexlibrarymisc}[2]{\indexlibrary{\idxcode{#1}!#2}} \newcommand{\indexlibraryglobal}[1]{\indexlibrary{\idxcode{#1}}} -\newcommand{\indexlibraryctor}[1]{\indexlibrarymisc{#1}{constructor}} -\newcommand{\indexlibrarydtor}[1]{\indexlibrarymisc{#1}{destructor}} +\newcommand{\indexlibrarymisc}[2]{\indexlibrary{#1!#2}} +\newcommand{\indexlibraryctor} [1]{\indexlibrarymisc{\idxcode{#1}}{constructor}} +\newcommand{\indexlibrarydtor} [1]{\indexlibrarymisc{\idxcode{#1}}{destructor}} +\newcommand{\indexlibraryzombie}[1]{\indexlibrarymisc{\idxcode{#1}}{zombie}} % class member library index -\newcommand{\indexlibrarymemberx}[2]{\indexlibrarymisc{#1}{\idxcode{#2}}} -\newcommand{\indexlibrarymember}[2]{\indexlibrarymemberx{#1}{#2}\indexlibrarymemberx{#2}{#1}} -\newcommand{\indexlibraryzombie}[1]{\indexlibrarymisc{#1}{zombie}} +\newcommand{\indexlibraryboth}[2]{\indexlibrarymisc{#1}{#2}\indexlibrarymisc{#2}{#1}} +\newcommand{\indexlibrarymember}[2]{\indexlibraryboth{\idxcode{#1}}{\idxcode{#2}}} +\newcommand{\indexlibrarymemberexpos}[2]{\indexlibraryboth{\idxcode{#1}}{#2@\exposid{#2}}} +\newcommand{\indexlibrarymemberx}[2]{\indexlibrarymisc{\idxcode{#1}}{\idxcode{#2}}} \newcommand{\libglobal}[1]{\indexlibraryglobal{#1}#1} \newcommand{\libmember}[2]{\indexlibrarymember{#1}{#2}#1} From 3bf3ba0a9f317d382a1875bb168e95112632ae68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Sat, 12 Nov 2022 01:24:42 +0000 Subject: [PATCH 082/257] [vector.bool.pspc] Collate exposition-only index entry correctly --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index 86c0eafa90..c9931a9299 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -9304,7 +9304,7 @@ The specialization is enabled\iref{unord.hash}. \end{itemdescr} -\indexlibraryglobal{\exposid{is-vector-bool-reference}}% +\indexlibrary{is-vector-bool-reference@\exposid{is-vector-bool-reference}}% \begin{itemdecl} template inline constexpr bool @\exposid{is-vector-bool-reference}@ = @\seebelow@; From 42a9919a5c918291ddd082a78ab757cfef4ce2a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Sat, 12 Nov 2022 01:30:07 +0000 Subject: [PATCH 083/257] [format] Collate exposition-only index entries correctly --- source/utilities.tex | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 92c7a8147d..58c9880756 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15998,7 +15998,7 @@ \rSec3[format.range.fmtdef]{Class template \exposid{range-default-formatter}} -\indexlibraryglobal{\exposid{range-default-formatter}}% +\indexlibrary{range-default-formatter@\exposid{range-default-formatter}}% \begin{codeblock} namespace std { template @@ -16024,7 +16024,7 @@ } \end{codeblock} -\indexlibrarymember{set_separator}{\exposid{range-default-formatter}}% +\indexlibrarymemberexpos{set_separator}{range-default-formatter}% \begin{itemdecl} constexpr void set_separator(basic_string_view sep); \end{itemdecl} @@ -16035,7 +16035,7 @@ Equivalent to: \tcode{\exposid{underlying_}.set_separator(sep);} \end{itemdescr} -\indexlibrarymember{set_brackets}{\exposid{range-default-formatter}}% +\indexlibrarymemberexpos{set_brackets}{range-default-formatter}% \begin{itemdecl} constexpr void set_brackets(basic_string_view opening, basic_string_view closing); \end{itemdecl} @@ -16046,7 +16046,7 @@ Equivalent to: \tcode{\exposid{underlying_}.set_brackets(opening, closing);} \end{itemdescr} -\indexlibrarymember{parse}{\exposid{range-default-formatter}}% +\indexlibrarymemberexpos{parse}{range-default-formatter}% \begin{itemdecl} template constexpr typename ParseContext::iterator @@ -16059,7 +16059,7 @@ Equivalent to: \tcode{return \exposid{underlying_}.parse(ctx);} \end{itemdescr} -\indexlibrarymember{format}{\exposid{range-default-formatter}}% +\indexlibrarymemberexpos{format}{range-default-formatter}% \begin{itemdecl} template typename FormatContext::iterator @@ -16074,7 +16074,7 @@ \rSec3[format.range.fmtmap]{Specialization of \exposid{range-default-formatter} for maps} -\indexlibraryglobal{\exposid{range-default-formatter}}% +\indexlibrary{range-default-formatter@\exposid{range-default-formatter}}% \begin{codeblock} namespace std { template @@ -16098,7 +16098,7 @@ } \end{codeblock} -\indexlibraryctor{\exposid{range-default-formatter}}% +\indexlibrarymisc{range-default-formatter@\exposid{range-default-formatter}}{constructor}% \begin{itemdecl} constexpr @\exposid{range-default-formatter}@(); \end{itemdecl} @@ -16125,7 +16125,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{parse}{\exposid{range-default-formatter}}% +\indexlibrarymemberexpos{parse}{range-default-formatter}% \begin{itemdecl} template constexpr typename ParseContext::iterator @@ -16138,7 +16138,7 @@ Equivalent to: \tcode{return \exposid{underlying_}.parse(ctx);} \end{itemdescr} -\indexlibrarymember{format}{\exposid{range-default-formatter}}% +\indexlibrarymemberexpos{format}{range-default-formatter}% \begin{itemdecl} template typename FormatContext::iterator @@ -16153,7 +16153,7 @@ \rSec3[format.range.fmtset]{Specialization of \exposid{range-default-formatter} for sets} -\indexlibraryglobal{\exposid{range-default-formatter}}% +\indexlibrary{range-default-formatter@\exposid{range-default-formatter}}% \begin{codeblock} namespace std { template @@ -16177,7 +16177,7 @@ } \end{codeblock} -\indexlibraryctor{\exposid{range-default-formatter}}% +\indexlibrarymisc{range-default-formatter@\exposid{range-default-formatter}}{constructor}% \begin{itemdecl} constexpr @\exposid{range-default-formatter}@(); \end{itemdecl} @@ -16191,7 +16191,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{parse}{\exposid{range-default-formatter}}% +\indexlibrarymemberexpos{parse}{range-default-formatter}% \begin{itemdecl} template constexpr typename ParseContext::iterator @@ -16204,7 +16204,7 @@ Equivalent to: \tcode{return \exposid{underlying_}.parse(ctx);} \end{itemdescr} -\indexlibrarymember{format}{\exposid{range-default-formatter}}% +\indexlibrarymemberexpos{format}{range-default-formatter}% \begin{itemdecl} template typename FormatContext::iterator @@ -16219,7 +16219,7 @@ \rSec3[format.range.fmtstr]{Specialization of \exposid{range-default-formatter} for strings} -\indexlibraryglobal{\exposid{range-default-formatter}}% +\indexlibrary{range-default-formatter@\exposid{range-default-formatter}}% \begin{codeblock} namespace std { template @@ -16245,7 +16245,7 @@ \tcode{\libconcept{same_as}>, charT>} is \tcode{true}. -\indexlibrarymember{parse}{\exposid{range-default-formatter}}% +\indexlibrarymemberexpos{parse}{range-default-formatter}% \begin{itemdecl} template constexpr typename ParseContext::iterator @@ -16265,7 +16265,7 @@ \end{codeblock} \end{itemdescr} -\indexlibrarymember{format}{\exposid{range-default-formatter}}% +\indexlibrarymemberexpos{format}{range-default-formatter}% \begin{itemdecl} template typename FormatContext::iterator From 0cd0c33f648d1304160e6dcb1856affd71b3ebbb Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Fri, 11 Nov 2022 18:35:53 -0800 Subject: [PATCH 084/257] [mdspan.extents.cons] "constexpr" should precede "explicit" In library function declarations, the `constexpr` specifier always precedes the `explicit` specifier per our standing style guide. --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index c9931a9299..9edd326aa4 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -18497,7 +18497,7 @@ \indexlibraryctor{extents}% \begin{itemdecl} template - explicit constexpr extents(OtherIndexTypes... exts) noexcept; + constexpr explicit extents(OtherIndexTypes... exts) noexcept; \end{itemdecl} \begin{itemdescr} From 4cac06ba19071d2d9679ebac3dd0fb04e8c6c31f Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Fri, 11 Nov 2022 22:01:58 -0800 Subject: [PATCH 085/257] [check] Add checks for "explicit constexpr" and "constexpr static" in the library Per our style guide, `constexpr` should precede `explicit` and `static` should precede `constexpr` in declarations. Nevertheless, the persnickety `explicit constexpr` seems to frequently sneak into the library wording. --- tools/check-source.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/check-source.sh b/tools/check-source.sh index cabde9e6d1..415f6221d3 100755 --- a/tools/check-source.sh +++ b/tools/check-source.sh @@ -116,6 +116,14 @@ grep -Hne '^\\\(change\|rationale\|effect\|difficulty\|howwide\)\s.\+$' compatib grep -ne 'template\s\+<' $texlib | fail 'space between "template" and "<"' || failed=1 +# In library declarations, constexpr should not follow explicit +grep -ne '\bexplicit\b.*\bconstexpr\b' $texlib | + fail 'explicit constexpr' || failed=1 + +# In library declarations, static should not follow constexpr +grep -ne '\bconstexpr\b.*\bstatic\b' $texlib | grep -ve '\bconstexpr\b.*\bnon-static\b' | + fail 'constexpr static' || failed=1 + # "Class" heading without namespace for f in $texlib; do sed -n '/rSec[0-9].*{Class/,/\\end{codeblock}/{/\\begin{example}/,/\\end{example}/b;/\\begin{codeblock}/,/\(^namespace\)\|\(\\end{codeblock}\)/{s/template<[^>]*>//;/\(class\|struct\)[A-Za-z0-9_: ]*{/{=;p;};};}' $f | From 608c152dbae69d335d7238cdd5d178e048e2a1fd Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Mon, 14 Nov 2022 10:48:18 -0800 Subject: [PATCH 086/257] [vector.bool.pspc] Replace `constexpr static` with `static constexpr` As preferred by our style guide. --- source/containers.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 9edd326aa4..c30d2091e5 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -9238,7 +9238,7 @@ constexpr iterator erase(const_iterator position); constexpr iterator erase(const_iterator first, const_iterator last); constexpr void swap(vector&); - constexpr static void swap(reference x, reference y) noexcept; + static constexpr void swap(reference x, reference y) noexcept; constexpr void flip() noexcept; // flips all bits constexpr void clear() noexcept; }; @@ -9279,7 +9279,7 @@ \indexlibrarymember{swap}{vector}% \begin{itemdecl} -constexpr static void swap(reference x, reference y) noexcept; +static constexpr void swap(reference x, reference y) noexcept; \end{itemdecl} \begin{itemdescr} From d829eac310981e688a15b28622a2f048d23eed65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Thu, 10 Nov 2022 07:43:32 +0000 Subject: [PATCH 087/257] [class.inhctor.init] Fix explanation of "error:" in example The correct explanation is that classes `B1` and `D1` do not have default constructors, not that they have deleted default constructors. Fixes NB CA 062 (C++23 CD). --- source/classes.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/classes.tex b/source/classes.tex index 1332a352bb..cedcaf76ef 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -5875,7 +5875,7 @@ D1 d(2, 3, 4); // OK, \tcode{B1} is initialized by calling \tcode{B1(2, 3, 4)}, // then \tcode{d.x} is default-initialized (no initialization is performed), // then \tcode{d.y} is initialized by calling \tcode{get()} - D1 e; // error: \tcode{D1} has a deleted default constructor + D1 e; // error: \tcode{D1} has no default constructor } struct D2 : B2 { @@ -5883,7 +5883,7 @@ B1 b; }; -D2 f(1.0); // error: \tcode{B1} has a deleted default constructor +D2 f(1.0); // error: \tcode{B1} has no default constructor struct W { W(int); }; struct X : virtual W { using W::W; X() = delete; }; From 6a1c5050c21ac26fcb2b5b187a0de867713568dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 8 Nov 2022 23:35:00 +0000 Subject: [PATCH 088/257] [diff.cpp20.library] Add missing new headers Fixes NB FR 008 (C++23 CD). --- source/compatibility.tex | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/compatibility.tex b/source/compatibility.tex index 21cd9c51eb..5ec53298b8 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -128,9 +128,13 @@ \effect The following \Cpp{} headers are new: \libheaderref{expected}, -\libheaderref{stdatomic.h}, -\libheaderref{spanstream}, and -\libheaderref{stacktrace}. +\libheaderrefx{flat_map}{flat.map.syn}, +\libheaderrefx{flat_set}{flat.set.syn}, +\libheaderref{generator}, +\libheaderref{print}, +\libheaderref{spanstream}, +\libheaderref{stacktrace}, and +\libheaderref{stdatomic.h}. Valid \CppXX{} code that \tcode{\#include}{s} headers with these names may be invalid in this revision of \Cpp{}. From b2fa70faa783827cd38b819409e94da2523333f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 9 Nov 2022 18:50:56 +0000 Subject: [PATCH 089/257] [views] Subclauses for contiguous and multidimensional access This organises the material for and into separate subclauses, rather than having all constituent parts being siblings in the same subclause. Even though we now have some subclauses six levels deep, this seems like an improvement. As a drive-by, this allows us to move a subclause on a non-member span helper function up one level, where it is more appropriate. Fixes NB FR 027 (C++23 CD). --- source/containers.tex | 151 +++++++++++++++++++++--------------------- 1 file changed, 77 insertions(+), 74 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index c30d2091e5..b758582035 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -17469,7 +17469,9 @@ The header \libheader{mdspan} defines the class template \tcode{mdspan} and other facilities for interacting with these multidimensional views. -\rSec2[span.syn]{Header \tcode{} synopsis}% +\rSec2[views.contiguous]{Contiguous access} + +\rSec3[span.syn]{Header \tcode{} synopsis}% \indexheader{span}% \begin{codeblock} @@ -17497,9 +17499,9 @@ } \end{codeblock} -\rSec2[views.span]{Class template \tcode{span}} +\rSec3[views.span]{Class template \tcode{span}} -\rSec3[span.overview]{Overview} +\rSec4[span.overview]{Overview} \pnum \indexlibraryglobal{span}% @@ -17612,7 +17614,7 @@ \tcode{ElementType} is required to be a complete object type that is not an abstract class type. -\rSec3[span.cons]{Constructors, copy, and assignment} +\rSec4[span.cons]{Constructors, copy, and assignment} \indexlibraryctor{span}% \begin{itemdecl} @@ -17852,7 +17854,7 @@ \tcode{size() == other.size() \&\& data() == other.data()}. \end{itemdescr} -\rSec3[span.deduct]{Deduction guides} +\rSec4[span.deduct]{Deduction guides} \indexlibrary{\idxcode{span}!deduction guide}% \begin{itemdecl} @@ -17878,7 +17880,7 @@ \tcode{R} satisfies \tcode{ranges::\libconcept{contiguous_range}}. \end{itemdescr} -\rSec3[span.sub]{Subviews} +\rSec4[span.sub]{Subviews} \indexlibrarymember{span}{first}% \begin{itemdecl} @@ -18011,7 +18013,7 @@ \end{codeblock} \end{itemdescr} -\rSec3[span.obs]{Observers} +\rSec4[span.obs]{Observers} \indexlibrarymember{span}{size}% \begin{itemdecl} @@ -18046,7 +18048,7 @@ Equivalent to: \tcode{return size() == 0;} \end{itemdescr} -\rSec3[span.elem]{Element access} +\rSec4[span.elem]{Element access} \indexlibrary{\idxcode{operator[]}!\idxcode{span}}% \begin{itemdecl} @@ -18104,7 +18106,7 @@ Equivalent to: \tcode{return \exposid{data_};} \end{itemdescr} -\rSec3[span.iterators]{Iterator support} +\rSec4[span.iterators]{Iterator support} \indexlibrarymember{iterator}{span}% \begin{itemdecl} @@ -18174,7 +18176,6 @@ Equivalent to: \tcode{return reverse_iterator(begin());} \end{itemdescr} - \rSec3[span.objectrep]{Views of object representation} \indexlibraryglobal{as_bytes}% @@ -18209,36 +18210,9 @@ where \tcode{R} is the return type. \end{itemdescr} -\rSec2[mdspan.syn]{Header \tcode{} synopsis} - -\indexheader{mdspan}% -\begin{codeblock} -namespace std { - // \ref{mdspan.extents}, class template \tcode{extents} - template - class extents; - - // \ref{mdspan.extents.dextents}, alias template \tcode{dextents} - template - using dextents = @\seebelow@; - - // \ref{mdspan.layout}, layout mapping - struct layout_left; - struct layout_right; - struct layout_stride; - - // \ref{mdspan.accessor.default}, class template \tcode{default_accessor} - template - class default_accessor; - - // \ref{mdspan.mdspan}, class template \tcode{mdspan} - template> - class mdspan; -} -\end{codeblock} +\rSec2[views.multidim]{Multidimensional access} -\rSec2[mdspan.overview]{Overview} +\rSec3[mdspan.overview]{Overview} \pnum A \defnadj{multidimensional}{index space} is @@ -18269,9 +18243,38 @@ in the interval $[L_i, U_i)$ of $S$. \end{itemize} -\rSec2[mdspan.extents]{Class template \tcode{extents}} +\rSec3[mdspan.syn]{Header \tcode{} synopsis} + +\indexheader{mdspan}% +\begin{codeblock} +namespace std { + // \ref{mdspan.extents}, class template \tcode{extents} + template + class extents; + + // \ref{mdspan.extents.dextents}, alias template \tcode{dextents} + template + using dextents = @\seebelow@; + + // \ref{mdspan.layout}, layout mapping + struct layout_left; + struct layout_right; + struct layout_stride; + + // \ref{mdspan.accessor.default}, class template \tcode{default_accessor} + template + class default_accessor; + + // \ref{mdspan.mdspan}, class template \tcode{mdspan} + template> + class mdspan; +} +\end{codeblock} + +\rSec3[mdspan.extents]{Class template \tcode{extents}} -\rSec3[mdspan.extents.overview]{Overview} +\rSec4[mdspan.extents.overview]{Overview} The class template \tcode{extents} represents a multidimensional index space of rank equal to \tcode{sizeof...(Extents)}. @@ -18357,7 +18360,7 @@ The $r^\text{th}$ interval of the multidimensional index space represented by an \tcode{extents} object is $[0, D_r)$. -\rSec3[mdspan.extents.expo]{Exposition-only helpers} +\rSec4[mdspan.extents.expo]{Exposition-only helpers} \begin{itemdecl} static constexpr rank_type @\exposid{dynamic-index}@(rank_type i) noexcept; @@ -18445,7 +18448,7 @@ \end{note} \end{itemdescr} -\rSec3[mdspan.extents.cons]{Constructors} +\rSec4[mdspan.extents.cons]{Constructors} \indexlibraryctor{extents}% \begin{itemdecl} @@ -18615,7 +18618,7 @@ The deduced type is \tcode{dextents}. \end{itemdescr} -\rSec3[mdspan.extents.obs]{Observers of the multidimensional index space} +\rSec4[mdspan.extents.obs]{Observers of the multidimensional index space} \indexlibrarymember{static_extent}{extents}% \begin{itemdecl} @@ -18647,7 +18650,7 @@ $D_\tcode{i}$. \end{itemdescr} -\rSec3[mdspan.extents.cmp]{Comparison operators} +\rSec4[mdspan.extents.cmp]{Comparison operators} \indexlibrarymember{operator==}{extents}% \begin{itemdecl} @@ -18665,7 +18668,7 @@ otherwise \tcode{false}. \end{itemdescr} -\rSec3[mdspan.extents.dextents]{Alias template \tcode{dextents}} +\rSec4[mdspan.extents.dextents]{Alias template \tcode{dextents}} \indexlibraryglobal{dextents}% \begin{itemdecl} @@ -18681,9 +18684,9 @@ \tcode{E::index_type} denotes \tcode{IndexType}. \end{itemdescr} -\rSec2[mdspan.layout]{Layout mapping} +\rSec3[mdspan.layout]{Layout mapping} -\rSec3[mdspan.layout.general]{General} +\rSec4[mdspan.layout.general]{General} \pnum In subclauses \ref{mdspan.layout.reqmts} and \ref{mdspan.layout.policy.reqmts}: @@ -18721,7 +18724,7 @@ is_same_v, Mapping>; \end{codeblock} -\rSec3[mdspan.layout.reqmts]{Requirements} +\rSec4[mdspan.layout.reqmts]{Requirements} \pnum A type \tcode{M} meets the \defn{layout mapping} requirements if @@ -18986,7 +18989,7 @@ \end{note} \end{itemdescr} -\rSec3[mdspan.layout.policy.reqmts]{Layout mapping policy requirements} +\rSec4[mdspan.layout.policy.reqmts]{Layout mapping policy requirements} \pnum A type \tcode{MP} meets the \defn{layout mapping policy} requirements @@ -18997,7 +19000,7 @@ denotes the type \tcode{MP} and the \grammarterm{qualified-id} \tcode{X::extents_type} denotes \tcode{E}. -\rSec3[mdspan.layout.policy.overview]{Layout mapping policies} +\rSec4[mdspan.layout.policy.overview]{Layout mapping policies} \begin{codeblock} namespace std { @@ -19020,9 +19023,9 @@ Each of \tcode{layout_left}, \tcode{layout_right}, and \tcode{layout_stride} meets the layout mapping policy requirements and is a trivial type. -\rSec3[mdspan.layout.left]{Class template \tcode{layout_left::mapping}} +\rSec4[mdspan.layout.left]{Class template \tcode{layout_left::mapping}} -\rSec4[mdspan.layout.left.overview]{Overview} +\rSec5[mdspan.layout.left.overview]{Overview} \pnum \tcode{layout_left} provides a layout mapping @@ -19091,7 +19094,7 @@ \tcode{layout_left::mapping} is a trivially copyable type that models \libconcept{regular} for each \tcode{E}. -\rSec4[mdspan.layout.left.cons]{Constructors} +\rSec5[mdspan.layout.left.cons]{Constructors} \indexlibraryctor{layout_left::mapping}% \begin{itemdecl} @@ -19188,7 +19191,7 @@ Direct-non-list-initializes \exposid{extents_} with \tcode{other.extents()}. \end{itemdescr} -\rSec4[mdspan.layout.left.obs]{Observers} +\rSec5[mdspan.layout.left.obs]{Observers} \indexlibrarymember{required_span_size}{layout_left::mapping}% \begin{itemdecl} @@ -19272,9 +19275,9 @@ Equivalent to: \tcode{return x.extents() == y.extents();} \end{itemdescr} -\rSec3[mdspan.layout.right]{Class template \tcode{layout_right::mapping}} +\rSec4[mdspan.layout.right]{Class template \tcode{layout_right::mapping}} -\rSec4[mdspan.layout.right.overview]{Overview} +\rSec5[mdspan.layout.right.overview]{Overview} \pnum \tcode{layout_right} provides a layout mapping @@ -19343,7 +19346,7 @@ \tcode{layout_right::mapping} is a trivially copyable type that models \libconcept{regular} for each \tcode{E}. -\rSec4[mdspan.layout.right.cons]{Constructors} +\rSec5[mdspan.layout.right.cons]{Constructors} \indexlibraryctor{layout_right::mapping}% \begin{itemdecl} @@ -19440,7 +19443,7 @@ Direct-non-list-initializes \exposid{extents_} with \tcode{other.extents()}. \end{itemdescr} -\rSec4[mdspan.layout.right.obs]{Observers} +\rSec5[mdspan.layout.right.obs]{Observers} \indexlibrarymember{required_span_size}{layout_right::mapping}% \begin{itemdecl} @@ -19524,9 +19527,9 @@ Equivalent to: \tcode{return x.extents() == y.extents();} \end{itemdescr} -\rSec3[mdspan.layout.stride]{Class template \tcode{layout_stride::mapping}} +\rSec4[mdspan.layout.stride]{Class template \tcode{layout_stride::mapping}} -\rSec4[mdspan.layout.stride.overview]{Overview} +\rSec5[mdspan.layout.stride.overview]{Overview} \pnum \tcode{layout_stride} provides a layout mapping @@ -19597,7 +19600,7 @@ \tcode{layout_stride::mapping} is a trivially copyable type that models \libconcept{regular} for each \tcode{E}. -\rSec4[mdspan.layout.stride.expo]{Exposition-only helpers} +\rSec5[mdspan.layout.stride.expo]{Exposition-only helpers} \pnum Let \tcode{\exposid{REQUIRED-SPAN-SIZE}(e, strides)} be: @@ -19658,7 +19661,7 @@ have a return type of \tcode{bool}. \end{note} -\rSec4[mdspan.layout.stride.cons]{Constructors} +\rSec5[mdspan.layout.stride.cons]{Constructors} \indexlibraryctor{layout_stride::mapping}% \begin{itemdecl} @@ -19761,7 +19764,7 @@ \end{codeblock} \end{itemdescr} -\rSec4[mdspan.layout.stride.obs]{Observers} +\rSec5[mdspan.layout.stride.obs]{Observers} \indexlibrarymember{required_span_size}{layout_stride::mapping}% \begin{itemdecl} @@ -19864,9 +19867,9 @@ Otherwise, \tcode{false}. \end{itemdescr} -\rSec2[mdspan.accessor]{Accessor policy} +\rSec3[mdspan.accessor]{Accessor policy} -\rSec3[mdspan.accessor.general]{General} +\rSec4[mdspan.accessor.general]{General} \pnum An \defn{accessor policy} defines types and operations by which @@ -19896,7 +19899,7 @@ \tcode{n}, \tcode{i}, and \tcode{j} each denote values of type \tcode{size_t}. \end{itemize} -\rSec3[mdspan.accessor.reqmts]{Requirements} +\rSec4[mdspan.accessor.reqmts]{Requirements} \pnum A type \tcode{A} meets the accessor policy requirements if @@ -20025,9 +20028,9 @@ The expression is equality-preserving. \end{itemdescr} -\rSec3[mdspan.accessor.default]{Class template \tcode{default_accessor}} +\rSec4[mdspan.accessor.default]{Class template \tcode{default_accessor}} -\rSec4[mdspan.accessor.default.overview]{Overview} +\rSec5[mdspan.accessor.default.overview]{Overview} \begin{codeblock} namespace std { @@ -20064,7 +20067,7 @@ an object of type \tcode{default_accessor} if and only if \range{p}{p + $n$} is a valid range. -\rSec4[mdspan.accessor.default.members]{Members} +\rSec5[mdspan.accessor.default.members]{Members} \indexlibraryctor{default_accessor}% \begin{itemdecl} @@ -20101,9 +20104,9 @@ Equivalent to: \tcode{return p + i;} \end{itemdescr} -\rSec2[mdspan.mdspan]{Class template \tcode{mdspan}} +\rSec3[mdspan.mdspan]{Class template \tcode{mdspan}} -\rSec3[mdspan.mdspan.overview]{Overview} +\rSec4[mdspan.mdspan.overview]{Overview} \pnum \tcode{mdspan} is a view of a multidimensional array of elements. @@ -20272,7 +20275,7 @@ its \tcode{accessor_type}, \tcode{mapping_type}, and \tcode{data_handle_type} are trivially copyable types. -\rSec3[mdspan.mdspan.cons]{Constructors} +\rSec4[mdspan.mdspan.cons]{Constructors} \indexlibraryctor{mdspan}% \begin{itemdecl} @@ -20543,7 +20546,7 @@ \end{codeblock} \end{itemdescr} -\rSec3[mdspan.mdspan.members]{Members} +\rSec4[mdspan.mdspan.members]{Members} \indexlibrarymember{operator[]}{mdspan}% \begin{itemdecl} From e0bab4b7f2d8afe5d3939aa49fe6de4fd5e638c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Thu, 10 Nov 2022 02:16:11 +0000 Subject: [PATCH 090/257] [concepts index] Describe exposition-only concepts Fixes NB GB 136 (C++23 CD). --- source/back.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/back.tex b/source/back.tex index c33bb8ee91..f937f2c514 100644 --- a/source/back.tex +++ b/source/back.tex @@ -119,7 +119,8 @@ \chapter{Bibliography} \clearpage \renewcommand{\preindexhook}{The bold page number for each entry is the page where the concept is defined. -Other page numbers refer to pages where the concept is mentioned in the general text.\\} +Other page numbers refer to pages where the concept is mentioned in the general text. +Concepts whose name appears in \exposid{italics} are for exposition only.\\} { \raggedright \printindex[conceptindex] From 9512e41e30cf24a8e93e8c8568ff1b5c14398cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Fri, 11 Nov 2022 19:31:11 +0000 Subject: [PATCH 091/257] [general, library index] Describe exposition-only entities Partially fixes NB GB 137 (C++23 CD). --- source/back.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/back.tex b/source/back.tex index f937f2c514..b55a47f7cf 100644 --- a/source/back.tex +++ b/source/back.tex @@ -87,6 +87,7 @@ \chapter{Bibliography} \clearpage \renewcommand{\leftmark}{\indexname} +\renewcommand{\preindexhook}{Constructions whose name appears in \exposid{monospaced italics} are for exposition only.\\} { \raggedright \printindex[generalindex] @@ -110,7 +111,7 @@ \chapter{Bibliography} } \clearpage -\renewcommand{\preindexhook}{} +\renewcommand{\preindexhook}{Constructions whose name appears in \exposid{italics} are for exposition only.\\} { \raggedright \printindex[libraryindex] From 0783dde32073b02b369c7c3893f4f496a83e3658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Fri, 11 Nov 2022 19:33:33 +0000 Subject: [PATCH 092/257] [func.wrap.move.ctor] Move private expos member to general index The private, exposition-only data member is not useful in the library index. However, there seems no reason to not show it in the general index, so we move the index entry from the library index to the general index. Partially fixes NB GB 137 (C++23 CD). --- source/utilities.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index 58c9880756..30f814b68d 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -12424,7 +12424,7 @@ \rSec4[func.wrap.move.ctor]{Constructors, assignment, and destructor} -\indexlibrarymember{\exposid{is-callable-from}}{move_only_function}% +\indextext{move_only_function::is-callable-from@\tcode{move_only_function::\exposid{is-callable-from}}}% \begin{itemdecl} template static constexpr bool @\exposid{is-callable-from}@ = @\seebelow@; From 3e825f144f2aa8668c9a1a94066b43799e08a6e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 8 Nov 2022 21:31:30 +0000 Subject: [PATCH 093/257] [basic.scope.scope] Fix indentation in example Fixes NB US 034 (C++23 CD). --- source/basic.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/basic.tex b/source/basic.tex index f95469332f..092b9a2f86 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -939,7 +939,7 @@ \begin{example} \begin{codeblock} struct A { -friend void f(); // \#1 + friend void f(); // \#1 }; struct B { friend void f() {} // corresponds to, and defines, \#1 From 92de5996625efcb070f99681acd2e39efc206ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 8 Nov 2022 23:24:35 +0000 Subject: [PATCH 094/257] [unord.req.general] Fix garbled end of sentence This was an editorial mistake introduced by the transformation of the requirement tables into regular paragraphs. Fixes NB US 100 (C++23 CD). --- source/containers.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index b758582035..474f7ecae1 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -4796,7 +4796,7 @@ \pnum \effects Inserts a \tcode{value_type} object \tcode{t} -constructed with \tcode{std::forward(args)...} and +constructed with \tcode{std::forward(args)...}. \pnum \returns From 24e046896029a11f2cb78fd6db21482fb0d4be66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 8 Nov 2022 21:02:31 +0000 Subject: [PATCH 095/257] [coro.generator.promise] Use "equivalent to `throw`, ..." Our style guide says that "equivalent to " is the appropriate style for an expression of type `void`, which is the case for `throw`. This avoids the awkward situation of having "equivalent to: `throws;`" appear in the middle of a paragraph without proper terminal punctuation. Fixes NB US 119 (C++23 CD). --- source/ranges.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index f0108ede6c..c0a4734013 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -15420,8 +15420,8 @@ If the handle referring to the coroutine whose promise object is \tcode{*this} is the sole element of \tcode{*x.\exposid{active_}}, -equivalent to: \tcode{throw;} -Otherwise, assigns \tcode{current_exception()} to \exposid{except_}. +equivalent to \tcode{throw}, +otherwise, assigns \tcode{current_exception()} to \exposid{except_}. \end{itemdescr} \indexlibrarymember{operator new}{generator::promise_type}% From 3f47d2565f26a9144e8076641ee55bf7be79f896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 8 Nov 2022 21:27:56 +0000 Subject: [PATCH 096/257] [coro.generator.promise] Remove unused name "x" Fixes NB US 120 (C++23 CD). --- source/ranges.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index c0a4734013..f676751720 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -15313,7 +15313,7 @@ A handle referring to the coroutine whose promise object is \tcode{*this} is at the top of \tcode{*\exposid{active_}} -of some \tcode{generator} object \tcode{x}. +of some \tcode{generator} object. \pnum \returns From fb0df97e7d7c2c75bbdf7164c33b0796024ff6d3 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 17 Nov 2022 08:44:05 +0000 Subject: [PATCH 097/257] [atomics] Replace integral and floating-point placeholders (#5939) Fixes NB GB 129 (C++23 CD). --- source/threads.tex | 537 +++++++++++++++++++++++---------------------- 1 file changed, 275 insertions(+), 262 deletions(-) diff --git a/source/threads.tex b/source/threads.tex index 2179d57ae6..55dbadb167 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -2819,8 +2819,8 @@ \indexlibrarymember{required_alignment}{atomic_ref}% \indexlibrarymember{required_alignment}{atomic_ref}% -\indexlibrarymember{required_alignment}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{required_alignment}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{required_alignment}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{required_alignment}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} static constexpr size_t required_alignment; \end{itemdecl} @@ -2845,8 +2845,8 @@ \indexlibrarymember{is_always_lock_free}{atomic_ref}% \indexlibrarymember{is_always_lock_free}{atomic_ref}% -\indexlibrarymember{is_always_lock_free}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{is_always_lock_free}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{is_always_lock_free}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{is_always_lock_free}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} static constexpr bool is_always_lock_free; \end{itemdecl} @@ -2860,8 +2860,8 @@ \indexlibrarymember{is_lock_free}{atomic_ref}% \indexlibrarymember{is_lock_free}{atomic_ref}% -\indexlibrarymember{is_lock_free}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{is_lock_free}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{is_lock_free}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{is_lock_free}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} bool is_lock_free() const noexcept; \end{itemdecl} @@ -2876,8 +2876,8 @@ \indexlibraryctor{atomic_ref}% \indexlibraryctor{atomic_ref}% -\indexlibrary{\idxcode{atomic_ref<\placeholder{integral}>}!constructor}% -\indexlibrary{\idxcode{atomic_ref<\placeholder{floating-point}>}!constructor}% +\indexlibrary{\idxcode{atomic_ref<\placeholder{integral-type}>}!constructor}% +\indexlibrary{\idxcode{atomic_ref<\placeholder{floating-point-type}>}!constructor}% \begin{itemdecl} atomic_ref(T& obj); \end{itemdecl} @@ -2898,8 +2898,8 @@ \indexlibraryctor{atomic_ref}% \indexlibraryctor{atomic_ref}% -\indexlibrary{\idxcode{atomic_ref<\placeholder{integral}>}!constructor}% -\indexlibrary{\idxcode{atomic_ref<\placeholder{floating-point}>}!constructor}% +\indexlibrary{\idxcode{atomic_ref<\placeholder{integral-type}>}!constructor}% +\indexlibrary{\idxcode{atomic_ref<\placeholder{floating-point-type}>}!constructor}% \begin{itemdecl} atomic_ref(const atomic_ref& ref) noexcept; \end{itemdecl} @@ -2912,8 +2912,8 @@ \indexlibrarymember{store}{atomic_ref}% \indexlibrarymember{store}{atomic_ref}% -\indexlibrarymember{store}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{store}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{store}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{store}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} void store(T desired, memory_order order = memory_order::seq_cst) const noexcept; \end{itemdecl} @@ -2935,8 +2935,8 @@ \indexlibrarymember{operator=}{atomic_ref}% \indexlibrarymember{operator=}{atomic_ref}% -\indexlibrarymember{operator=}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{operator=}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{operator=}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{operator=}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} T operator=(T desired) const noexcept; \end{itemdecl} @@ -2953,8 +2953,8 @@ \indexlibrarymember{load}{atomic_ref}% \indexlibrarymember{load}{atomic_ref}% -\indexlibrarymember{load}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{load}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{load}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{load}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} T load(memory_order order = memory_order::seq_cst) const noexcept; \end{itemdecl} @@ -2976,8 +2976,8 @@ \indexlibrarymember{operator \placeholder{type}}{atomic_ref}% \indexlibrarymember{operator T*}{atomic_ref}% -\indexlibrarymember{operator \placeholder{integral}}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{operator \placeholder{floating-point}}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{operator \placeholder{integral-type}}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{operator \placeholder{floating-point-type}}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} operator T() const noexcept; \end{itemdecl} @@ -2990,8 +2990,8 @@ \indexlibrarymember{exchange}{atomic_ref}% \indexlibrarymember{exchange}{atomic_ref}% -\indexlibrarymember{exchange}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{exchange}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{exchange}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{exchange}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} T exchange(T desired, memory_order order = memory_order::seq_cst) const noexcept; \end{itemdecl} @@ -3012,12 +3012,12 @@ \indexlibrarymember{compare_exchange_weak}{atomic_ref}% \indexlibrarymember{compare_exchange_weak}{atomic_ref}% -\indexlibrarymember{compare_exchange_weak}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{compare_exchange_weak}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{compare_exchange_weak}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{compare_exchange_weak}{atomic_ref<\placeholder{floating-point-type}>}% \indexlibrarymember{compare_exchange_strong}{atomic_ref}% \indexlibrarymember{compare_exchange_strong}{atomic_ref}% -\indexlibrarymember{compare_exchange_strong}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{compare_exchange_strong}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{compare_exchange_strong}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{compare_exchange_strong}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} bool compare_exchange_weak(T& expected, T desired, memory_order success, memory_order failure) const noexcept; @@ -3160,7 +3160,7 @@ \rSec3[atomics.ref.int]{Specializations for integral types} \pnum -\indexlibrary{\idxcode{atomic_ref<\placeholder{integral}>}}% +\indexlibrary{\idxcode{atomic_ref<\placeholder{integral-type}>}}% There are specializations of the \tcode{atomic_ref} class template for the integral types \tcode{char}, @@ -3179,8 +3179,8 @@ \keyword{char32_t}, \keyword{wchar_t}, and any other types needed by the typedefs in the header \libheaderref{cstdint}. -For each such type \tcode{\placeholder{integral}}, -the specialization \tcode{atomic_ref<\placeholder{integral}>} provides +For each such type \tcode{\placeholder{integral-type}}, +the specialization \tcode{atomic_ref<\placeholder{integral-type}>} provides additional atomic operations appropriate to integral types. \begin{note} The specialization \tcode{atomic_ref} @@ -3189,59 +3189,59 @@ \begin{codeblock} namespace std { - template<> struct atomic_ref<@\placeholder{integral}@> { + template<> struct atomic_ref<@\placeholder{integral-type}@> { private: - @\placeholder{integral}@* ptr; // \expos + @\placeholder{integral-type}@* ptr; // \expos public: - using value_type = @\placeholder{integral}@; + using value_type = @\placeholder{integral-type}@; using difference_type = value_type; static constexpr size_t required_alignment = @\impdefx{required alignment for \tcode{atomic_ref} type's operations}@; static constexpr bool is_always_lock_free = @\impdefx{whether a given \tcode{atomic_ref} type's operations are always lock free}@; bool is_lock_free() const noexcept; - explicit atomic_ref(@\placeholder{integral}@&); + explicit atomic_ref(@\placeholder{integral-type}@&); atomic_ref(const atomic_ref&) noexcept; atomic_ref& operator=(const atomic_ref&) = delete; - void store(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) const noexcept; - @\placeholdernc{integral}@ operator=(@\placeholder{integral}@) const noexcept; - @\placeholdernc{integral}@ load(memory_order = memory_order::seq_cst) const noexcept; - operator @\placeholdernc{integral}@() const noexcept; + void store(@\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) const noexcept; + @\placeholdernc{integral-type}@ operator=(@\placeholder{integral-type}@) const noexcept; + @\placeholdernc{integral-type}@ load(memory_order = memory_order::seq_cst) const noexcept; + operator @\placeholdernc{integral-type}@() const noexcept; - @\placeholdernc{integral}@ exchange(@\placeholdernc{integral}@, - memory_order = memory_order::seq_cst) const noexcept; - bool compare_exchange_weak(@\placeholder{integral}@&, @\placeholder{integral}@, + @\placeholdernc{integral-type}@ exchange(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) const noexcept; + bool compare_exchange_weak(@\placeholder{integral-type}@&, @\placeholder{integral-type}@, memory_order, memory_order) const noexcept; - bool compare_exchange_strong(@\placeholder{integral}@&, @\placeholder{integral}@, + bool compare_exchange_strong(@\placeholder{integral-type}@&, @\placeholder{integral-type}@, memory_order, memory_order) const noexcept; - bool compare_exchange_weak(@\placeholder{integral}@&, @\placeholder{integral}@, + bool compare_exchange_weak(@\placeholder{integral-type}@&, @\placeholder{integral-type}@, memory_order = memory_order::seq_cst) const noexcept; - bool compare_exchange_strong(@\placeholder{integral}@&, @\placeholder{integral}@, + bool compare_exchange_strong(@\placeholder{integral-type}@&, @\placeholder{integral-type}@, memory_order = memory_order::seq_cst) const noexcept; - @\placeholdernc{integral}@ fetch_add(@\placeholdernc{integral}@, - memory_order = memory_order::seq_cst) const noexcept; - @\placeholdernc{integral}@ fetch_sub(@\placeholdernc{integral}@, - memory_order = memory_order::seq_cst) const noexcept; - @\placeholdernc{integral}@ fetch_and(@\placeholdernc{integral}@, - memory_order = memory_order::seq_cst) const noexcept; - @\placeholdernc{integral}@ fetch_or(@\placeholdernc{integral}@, - memory_order = memory_order::seq_cst) const noexcept; - @\placeholdernc{integral}@ fetch_xor(@\placeholdernc{integral}@, - memory_order = memory_order::seq_cst) const noexcept; - - @\placeholdernc{integral}@ operator++(int) const noexcept; - @\placeholdernc{integral}@ operator--(int) const noexcept; - @\placeholdernc{integral}@ operator++() const noexcept; - @\placeholdernc{integral}@ operator--() const noexcept; - @\placeholdernc{integral}@ operator+=(@\placeholdernc{integral}@) const noexcept; - @\placeholdernc{integral}@ operator-=(@\placeholdernc{integral}@) const noexcept; - @\placeholdernc{integral}@ operator&=(@\placeholdernc{integral}@) const noexcept; - @\placeholdernc{integral}@ operator|=(@\placeholdernc{integral}@) const noexcept; - @\placeholdernc{integral}@ operator^=(@\placeholdernc{integral}@) const noexcept; - - void wait(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) const noexcept; + @\placeholdernc{integral-type}@ fetch_add(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) const noexcept; + @\placeholdernc{integral-type}@ fetch_sub(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) const noexcept; + @\placeholdernc{integral-type}@ fetch_and(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) const noexcept; + @\placeholdernc{integral-type}@ fetch_or(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) const noexcept; + @\placeholdernc{integral-type}@ fetch_xor(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) const noexcept; + + @\placeholdernc{integral-type}@ operator++(int) const noexcept; + @\placeholdernc{integral-type}@ operator--(int) const noexcept; + @\placeholdernc{integral-type}@ operator++() const noexcept; + @\placeholdernc{integral-type}@ operator--() const noexcept; + @\placeholdernc{integral-type}@ operator+=(@\placeholdernc{integral-type}@) const noexcept; + @\placeholdernc{integral-type}@ operator-=(@\placeholdernc{integral-type}@) const noexcept; + @\placeholdernc{integral-type}@ operator&=(@\placeholdernc{integral-type}@) const noexcept; + @\placeholdernc{integral-type}@ operator|=(@\placeholdernc{integral-type}@) const noexcept; + @\placeholdernc{integral-type}@ operator^=(@\placeholdernc{integral-type}@) const noexcept; + + void wait(@\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) const noexcept; void notify_one() const noexcept; void notify_all() const noexcept; }; @@ -3257,13 +3257,14 @@ The correspondence among key, operator, and computation is specified in \tref{atomic.types.int.comp}. -\indexlibrarymember{fetch_add}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{fetch_and}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{fetch_or}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{fetch_sub}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{fetch_xor}{atomic_ref<\placeholder{integral}>}% +\indexlibrarymember{fetch_add}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{fetch_and}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{fetch_or}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{fetch_sub}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{fetch_xor}{atomic_ref<\placeholder{integral-type}>}% \begin{itemdecl} -@\placeholdernc{integral}@ fetch_@\placeholdernc{key}@(@\placeholdernc{integral}@ operand, memory_order order = memory_order::seq_cst) const noexcept; +@\placeholdernc{integral-type}@ fetch_@\placeholdernc{key}@(@\placeholdernc{integral-type}@ operand, + memory_order order = memory_order::seq_cst) const noexcept; \end{itemdecl} \begin{itemdescr} @@ -3293,13 +3294,13 @@ \end{note} \end{itemdescr} -\indexlibrarymember{operator+=}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{operator-=}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{operator\&=}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{operator"|=}{atomic_ref<\placeholder{integral}>}% -\indexlibrarymember{operator\caret=}{atomic_ref<\placeholder{integral}>}% +\indexlibrarymember{operator+=}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{operator-=}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{operator\&=}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{operator"|=}{atomic_ref<\placeholder{integral-type}>}% +\indexlibrarymember{operator\caret=}{atomic_ref<\placeholder{integral-type}>}% \begin{itemdecl} -@\placeholdernc{integral}@ operator @\placeholder{op}@=(@\placeholdernc{integral}@ operand) const noexcept; +@\placeholdernc{integral-type}@ operator @\placeholder{op}@=(@\placeholdernc{integral-type}@ operand) const noexcept; \end{itemdecl} \begin{itemdescr} @@ -3312,55 +3313,55 @@ \rSec3[atomics.ref.float]{Specializations for floating-point types} \pnum -\indexlibrary{\idxcode{atomic_ref<\placeholder{floating-point}>}}% +\indexlibrary{\idxcode{atomic_ref<\placeholder{floating-point-type}>}}% There are specializations of the \tcode{atomic_ref} class template for all cv-unqualified floating-point types. -For each such type \tcode{\placeholder{floating-point}}, +For each such type \tcode{\placeholder{floating-point-type}}, the specialization \tcode{atomic_ref<\placeholder{floating-\-point}>} provides additional atomic operations appropriate to floating-point types. \begin{codeblock} namespace std { - template<> struct atomic_ref<@\placeholder{floating-point}@> { + template<> struct atomic_ref<@\placeholder{floating-point-type}@> { private: - @\placeholder{floating-point}@* ptr; // \expos + @\placeholder{floating-point-type}@* ptr; // \expos public: - using value_type = @\placeholder{floating-point}@; + using value_type = @\placeholder{floating-point-type}@; using difference_type = value_type; static constexpr size_t required_alignment = @\impdefx{required alignment for \tcode{atomic_ref} type's operations}@; static constexpr bool is_always_lock_free = @\impdefx{whether a given \tcode{atomic_ref} type's operations are always lock free}@; bool is_lock_free() const noexcept; - explicit atomic_ref(@\placeholder{floating-point}@&); + explicit atomic_ref(@\placeholder{floating-point-type}@&); atomic_ref(const atomic_ref&) noexcept; atomic_ref& operator=(const atomic_ref&) = delete; - void store(@\placeholdernc{floating-point}@, memory_order = memory_order::seq_cst) const noexcept; - @\placeholder{floating-point}@ operator=(@\placeholder{floating-point}@) const noexcept; - @\placeholder{floating-point}@ load(memory_order = memory_order::seq_cst) const noexcept; - operator @\placeholdernc{floating-point}@() const noexcept; + void store(@\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) const noexcept; + @\placeholder{floating-point-type}@ operator=(@\placeholder{floating-point-type}@) const noexcept; + @\placeholder{floating-point-type}@ load(memory_order = memory_order::seq_cst) const noexcept; + operator @\placeholdernc{floating-point-type}@() const noexcept; - @\placeholder{floating-point}@ exchange(@\placeholdernc{floating-point}@, - memory_order = memory_order::seq_cst) const noexcept; - bool compare_exchange_weak(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + @\placeholder{floating-point-type}@ exchange(@\placeholdernc{floating-point-type}@, + memory_order = memory_order::seq_cst) const noexcept; + bool compare_exchange_weak(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order, memory_order) const noexcept; - bool compare_exchange_strong(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + bool compare_exchange_strong(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order, memory_order) const noexcept; - bool compare_exchange_weak(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + bool compare_exchange_weak(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) const noexcept; - bool compare_exchange_strong(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + bool compare_exchange_strong(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) const noexcept; - @\placeholder{floating-point}@ fetch_add(@\placeholdernc{floating-point}@, - memory_order = memory_order::seq_cst) const noexcept; - @\placeholder{floating-point}@ fetch_sub(@\placeholdernc{floating-point}@, - memory_order = memory_order::seq_cst) const noexcept; + @\placeholder{floating-point-type}@ fetch_add(@\placeholdernc{floating-point-type}@, + memory_order = memory_order::seq_cst) const noexcept; + @\placeholder{floating-point-type}@ fetch_sub(@\placeholdernc{floating-point-type}@, + memory_order = memory_order::seq_cst) const noexcept; - @\placeholder{floating-point}@ operator+=(@\placeholder{floating-point}@) const noexcept; - @\placeholder{floating-point}@ operator-=(@\placeholder{floating-point}@) const noexcept; + @\placeholder{floating-point-type}@ operator+=(@\placeholder{floating-point-type}@) const noexcept; + @\placeholder{floating-point-type}@ operator-=(@\placeholder{floating-point-type}@) const noexcept; - void wait(@\placeholdernc{floating-point}@, memory_order = memory_order::seq_cst) const noexcept; + void wait(@\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) const noexcept; void notify_one() const noexcept; void notify_all() const noexcept; }; @@ -3376,10 +3377,10 @@ The correspondence among key, operator, and computation is specified in \tref{atomic.types.int.comp}. -\indexlibrarymember{fetch_add}{atomic_ref<\placeholder{floating-point}>}% -\indexlibrarymember{fetch_sub}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{fetch_add}{atomic_ref<\placeholder{floating-point-type}>}% +\indexlibrarymember{fetch_sub}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} -@\placeholder{floating-point}@ fetch_@\placeholdernc{key}@(@\placeholder{floating-point}@ operand, +@\placeholder{floating-point-type}@ fetch_@\placeholdernc{key}@(@\placeholder{floating-point-type}@ operand, memory_order order = memory_order::seq_cst) const noexcept; \end{itemdecl} @@ -3402,18 +3403,18 @@ If the result is not a representable value for its type\iref{expr.pre}, the result is unspecified, but the operations otherwise have no undefined behavior. -Atomic arithmetic operations on \tcode{\placeholder{floating-point}} should conform to -the \tcode{std::numeric_limits<\placeholder{floating-point}>} traits +Atomic arithmetic operations on \tcode{\placeholder{floating-point-type}} should conform to +the \tcode{std::numeric_limits<\placeholder{floating-point-type}>} traits associated with the floating-point type\iref{limits.syn}. The floating-point environment\iref{cfenv} -for atomic arithmetic operations on \tcode{\placeholder{floating-point}} +for atomic arithmetic operations on \tcode{\placeholder{floating-point-type}} may be different than the calling thread's floating-point environment. \end{itemdescr} -\indexlibrarymember{operator+=}{atomic_ref<\placeholder{floating-point}>}% -\indexlibrarymember{operator-=}{atomic_ref<\placeholder{floating-point}>}% +\indexlibrarymember{operator+=}{atomic_ref<\placeholder{floating-point-type}>}% +\indexlibrarymember{operator-=}{atomic_ref<\placeholder{floating-point-type}>}% \begin{itemdecl} -@\placeholder{floating-point}@ operator @\placeholder{op}@=(@\placeholder{floating-point}@ operand) const noexcept; +@\placeholder{floating-point-type}@ operator @\placeholder{op}@=(@\placeholder{floating-point-type}@ operand) const noexcept; \end{itemdecl} \begin{itemdescr} @@ -3531,7 +3532,7 @@ common to integers and pointers to objects} \indexlibrarymember{operator++}{atomic_ref}% -\indexlibrarymember{operator++}{atomic_ref<\placeholder{integral}>}% +\indexlibrarymember{operator++}{atomic_ref<\placeholder{integral-type}>}% \begin{itemdecl} value_type operator++(int) const noexcept; \end{itemdecl} @@ -3543,7 +3544,7 @@ \end{itemdescr} \indexlibrarymember{operator--}{atomic_ref}% -\indexlibrarymember{operator--}{atomic_ref<\placeholder{integral}>}% +\indexlibrarymember{operator--}{atomic_ref<\placeholder{integral-type}>}% \begin{itemdecl} value_type operator--(int) const noexcept; \end{itemdecl} @@ -3555,7 +3556,7 @@ \end{itemdescr} \indexlibrarymember{operator++}{atomic_ref}% -\indexlibrarymember{operator++}{atomic_ref<\placeholder{integral}>}% +\indexlibrarymember{operator++}{atomic_ref<\placeholder{integral-type}>}% \begin{itemdecl} value_type operator++() const noexcept; \end{itemdecl} @@ -3567,7 +3568,7 @@ \end{itemdescr} \indexlibrarymember{operator--}{atomic_ref}% -\indexlibrarymember{operator--}{atomic_ref<\placeholder{integral}>}% +\indexlibrarymember{operator--}{atomic_ref<\placeholder{integral-type}>}% \begin{itemdecl} value_type operator--() const noexcept; \end{itemdecl} @@ -3662,8 +3663,8 @@ \indexlibraryctor{atomic}% \indexlibraryctor{atomic}% -\indexlibrary{\idxcode{atomic<\placeholder{integral}>}!constructor}% -\indexlibrary{\idxcode{atomic<\placeholder{floating-point}>}!constructor}% +\indexlibrary{\idxcode{atomic<\placeholder{integral-type}>}!constructor}% +\indexlibrary{\idxcode{atomic<\placeholder{floating-point-type}>}!constructor}% \begin{itemdecl} constexpr atomic() noexcept(is_nothrow_default_constructible_v); \end{itemdecl} @@ -3681,8 +3682,8 @@ \indexlibraryctor{atomic}% \indexlibraryctor{atomic}% -\indexlibrary{\idxcode{atomic<\placeholder{integral}>}!constructor}% -\indexlibrary{\idxcode{atomic<\placeholder{floating-point}>}!constructor}% +\indexlibrary{\idxcode{atomic<\placeholder{integral-type}>}!constructor}% +\indexlibrary{\idxcode{atomic<\placeholder{floating-point-type}>}!constructor}% \begin{itemdecl} constexpr atomic(T desired) noexcept; \end{itemdecl} @@ -3704,8 +3705,8 @@ \indexlibrarymember{is_always_lock_free}{atomic}% \indexlibrarymember{is_always_lock_free}{atomic}% -\indexlibrarymember{is_always_lock_free}{atomic<\placeholder{integral}>}% -\indexlibrarymember{is_always_lock_free}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{is_always_lock_free}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{is_always_lock_free}{atomic<\placeholder{floating-point-type}>}% \indexlibrarymember{is_always_lock_free}{atomic>}% \indexlibrarymember{is_always_lock_free}{atomic>}% \begin{itemdecl} @@ -3725,8 +3726,8 @@ \indexlibraryglobal{atomic_is_lock_free}% \indexlibrarymember{is_lock_free}{atomic}% \indexlibrarymember{is_lock_free}{atomic}% -\indexlibrarymember{is_lock_free}{atomic<\placeholder{integral}>}% -\indexlibrarymember{is_lock_free}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{is_lock_free}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{is_lock_free}{atomic<\placeholder{floating-point-type}>}% \indexlibrarymember{is_lock_free}{atomic>}% \indexlibrarymember{is_lock_free}{atomic>}% \begin{itemdecl} @@ -3748,8 +3749,8 @@ \indexlibraryglobal{atomic_store_explicit}% \indexlibrarymember{store}{atomic}% \indexlibrarymember{store}{atomic}% -\indexlibrarymember{store}{atomic<\placeholder{integral}>}% -\indexlibrarymember{store}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{store}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{store}{atomic<\placeholder{floating-point-type}>}% \begin{itemdecl} void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept; void store(T desired, memory_order order = memory_order::seq_cst) noexcept; @@ -3775,8 +3776,8 @@ \indexlibrarymember{operator=}{atomic}% \indexlibrarymember{operator=}{atomic}% -\indexlibrarymember{operator=}{atomic<\placeholder{integral}>}% -\indexlibrarymember{operator=}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{operator=}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{operator=}{atomic<\placeholder{floating-point-type}>}% \begin{itemdecl} T operator=(T desired) volatile noexcept; T operator=(T desired) noexcept; @@ -3801,8 +3802,8 @@ \indexlibraryglobal{atomic_load_explicit}% \indexlibrarymember{load}{atomic}% \indexlibrarymember{load}{atomic}% -\indexlibrarymember{load}{atomic<\placeholder{integral}>}% -\indexlibrarymember{load}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{load}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{load}{atomic<\placeholder{floating-point-type}>}% \begin{itemdecl} T load(memory_order order = memory_order::seq_cst) const volatile noexcept; T load(memory_order order = memory_order::seq_cst) const noexcept; @@ -3829,8 +3830,8 @@ \indexlibrarymember{operator \placeholder{type}}{atomic}% \indexlibrarymember{operator T*}{atomic}% -\indexlibrarymember{operator \placeholder{integral}}{atomic<\placeholder{integral}>}% -\indexlibrarymember{operator \placeholder{floating-point}}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{operator \placeholder{integral-type}}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{operator \placeholder{floating-point-type}}{atomic<\placeholder{floating-point-type}>}% \begin{itemdecl} operator T() const volatile noexcept; operator T() const noexcept; @@ -3852,8 +3853,8 @@ \indexlibraryglobal{atomic_exchange_explicit}% \indexlibrarymember{exchange}{atomic}% \indexlibrarymember{exchange}{atomic}% -\indexlibrarymember{exchange}{atomic<\placeholder{integral}>}% -\indexlibrarymember{exchange}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{exchange}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{exchange}{atomic<\placeholder{floating-point-type}>}% \begin{itemdecl} T exchange(T desired, memory_order order = memory_order::seq_cst) volatile noexcept; T exchange(T desired, memory_order order = memory_order::seq_cst) noexcept; @@ -3883,12 +3884,12 @@ \indexlibraryglobal{atomic_compare_exchange_strong_explicit}% \indexlibrarymember{compare_exchange_weak}{atomic}% \indexlibrarymember{compare_exchange_weak}{atomic}% -\indexlibrarymember{compare_exchange_weak}{atomic<\placeholder{integral}>}% -\indexlibrarymember{compare_exchange_weak}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{compare_exchange_weak}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{compare_exchange_weak}{atomic<\placeholder{floating-point-type}>}% \indexlibrarymember{compare_exchange_strong}{atomic}% \indexlibrarymember{compare_exchange_strong}{atomic}% -\indexlibrarymember{compare_exchange_strong}{atomic<\placeholder{integral}>}% -\indexlibrarymember{compare_exchange_strong}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{compare_exchange_strong}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{compare_exchange_strong}{atomic<\placeholder{floating-point-type}>}% \begin{itemdecl} bool compare_exchange_weak(T& expected, T desired, memory_order success, memory_order failure) volatile noexcept; @@ -4058,8 +4059,8 @@ \indexlibrarymember{wait}{atomic}% \indexlibrarymember{wait}{atomic}% -\indexlibrarymember{wait}{atomic<\placeholder{integral}>}% -\indexlibrarymember{wait}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{wait}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{wait}{atomic<\placeholder{floating-point-type}>}% \begin{itemdecl} void wait(T old, memory_order order = memory_order::seq_cst) const volatile noexcept; void wait(T old, memory_order order = memory_order::seq_cst) const noexcept; @@ -4091,8 +4092,8 @@ \indexlibrarymember{notify_one}{atomic}% \indexlibrarymember{notify_one}{atomic}% -\indexlibrarymember{notify_one}{atomic<\placeholder{integral}>}% -\indexlibrarymember{notify_one}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{notify_one}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{notify_one}{atomic<\placeholder{floating-point-type}>}% \begin{itemdecl} void notify_one() volatile noexcept; void notify_one() noexcept; @@ -4112,8 +4113,8 @@ \indexlibrarymember{notify_all}{atomic}% \indexlibrarymember{notify_all}{atomic}% -\indexlibrarymember{notify_all}{atomic<\placeholder{integral}>}% -\indexlibrarymember{notify_all}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{notify_all}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{notify_all}{atomic<\placeholder{floating-point-type}>}% \begin{itemdecl} void notify_all() volatile noexcept; void notify_all() noexcept; @@ -4132,7 +4133,7 @@ \rSec3[atomics.types.int]{Specializations for integers} -\indexlibrary{\idxcode{atomic<\placeholder{integral}>}}% +\indexlibrary{\idxcode{atomic<\placeholder{integral-type}>}}% \pnum There are specializations of the \tcode{atomic} class template for the integral types @@ -4152,8 +4153,8 @@ \keyword{char32_t}, \keyword{wchar_t}, and any other types needed by the typedefs in the header \libheaderref{cstdint}. -For each such type \tcode{\placeholder{integral}}, the specialization -\tcode{atomic<\placeholder{integral}>} provides additional atomic operations appropriate to integral types. +For each such type \tcode{\placeholder{integral-type}}, the specialization +\tcode{atomic<\placeholder{integral-type}>} provides additional atomic operations appropriate to integral types. \begin{note} The specialization \tcode{atomic} uses the primary template\iref{atomics.types.generic}. @@ -4161,8 +4162,8 @@ \begin{codeblock} namespace std { - template<> struct atomic<@\placeholder{integral}@> { - using value_type = @\placeholder{integral}@; + template<> struct atomic<@\placeholder{integral-type}@> { + using value_type = @\placeholder{integral-type}@; using difference_type = value_type; static constexpr bool is_always_lock_free = @\impdefx{whether a given \tcode{atomic} type's operations are always lock free}@; @@ -4170,71 +4171,83 @@ bool is_lock_free() const noexcept; constexpr atomic() noexcept; - constexpr atomic(@\placeholdernc{integral}@) noexcept; + constexpr atomic(@\placeholdernc{integral-type}@) noexcept; atomic(const atomic&) = delete; atomic& operator=(const atomic&) = delete; atomic& operator=(const atomic&) volatile = delete; - void store(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) volatile noexcept; - void store(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) noexcept; - @\placeholdernc{integral}@ operator=(@\placeholdernc{integral}@) volatile noexcept; - @\placeholdernc{integral}@ operator=(@\placeholdernc{integral}@) noexcept; - @\placeholdernc{integral}@ load(memory_order = memory_order::seq_cst) const volatile noexcept; - @\placeholdernc{integral}@ load(memory_order = memory_order::seq_cst) const noexcept; - operator @\placeholdernc{integral}@() const volatile noexcept; - operator @\placeholdernc{integral}@() const noexcept; - - @\placeholdernc{integral}@ exchange(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) volatile noexcept; - @\placeholdernc{integral}@ exchange(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) noexcept; - bool compare_exchange_weak(@\placeholder{integral}@&, @\placeholdernc{integral}@, + void store(@\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) volatile noexcept; + void store(@\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) noexcept; + @\placeholdernc{integral-type}@ operator=(@\placeholdernc{integral-type}@) volatile noexcept; + @\placeholdernc{integral-type}@ operator=(@\placeholdernc{integral-type}@) noexcept; + @\placeholdernc{integral-type}@ load(memory_order = memory_order::seq_cst) const volatile noexcept; + @\placeholdernc{integral-type}@ load(memory_order = memory_order::seq_cst) const noexcept; + operator @\placeholdernc{integral-type}@() const volatile noexcept; + operator @\placeholdernc{integral-type}@() const noexcept; + + @\placeholdernc{integral-type}@ exchange(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) volatile noexcept; + @\placeholdernc{integral-type}@ exchange(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) noexcept; + bool compare_exchange_weak(@\placeholder{integral-type}@&, @\placeholdernc{integral-type}@, memory_order, memory_order) volatile noexcept; - bool compare_exchange_weak(@\placeholder{integral}@&, @\placeholdernc{integral}@, + bool compare_exchange_weak(@\placeholder{integral-type}@&, @\placeholdernc{integral-type}@, memory_order, memory_order) noexcept; - bool compare_exchange_strong(@\placeholder{integral}@&, @\placeholdernc{integral}@, + bool compare_exchange_strong(@\placeholder{integral-type}@&, @\placeholdernc{integral-type}@, memory_order, memory_order) volatile noexcept; - bool compare_exchange_strong(@\placeholder{integral}@&, @\placeholdernc{integral}@, + bool compare_exchange_strong(@\placeholder{integral-type}@&, @\placeholdernc{integral-type}@, memory_order, memory_order) noexcept; - bool compare_exchange_weak(@\placeholder{integral}@&, @\placeholdernc{integral}@, + bool compare_exchange_weak(@\placeholder{integral-type}@&, @\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) volatile noexcept; - bool compare_exchange_weak(@\placeholder{integral}@&, @\placeholdernc{integral}@, + bool compare_exchange_weak(@\placeholder{integral-type}@&, @\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) noexcept; - bool compare_exchange_strong(@\placeholder{integral}@&, @\placeholdernc{integral}@, + bool compare_exchange_strong(@\placeholder{integral-type}@&, @\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) volatile noexcept; - bool compare_exchange_strong(@\placeholder{integral}@&, @\placeholdernc{integral}@, + bool compare_exchange_strong(@\placeholder{integral-type}@&, @\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) noexcept; - @\placeholdernc{integral}@ fetch_add(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) volatile noexcept; - @\placeholdernc{integral}@ fetch_add(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) noexcept; - @\placeholdernc{integral}@ fetch_sub(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) volatile noexcept; - @\placeholdernc{integral}@ fetch_sub(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) noexcept; - @\placeholdernc{integral}@ fetch_and(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) volatile noexcept; - @\placeholdernc{integral}@ fetch_and(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) noexcept; - @\placeholdernc{integral}@ fetch_or(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) volatile noexcept; - @\placeholdernc{integral}@ fetch_or(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) noexcept; - @\placeholdernc{integral}@ fetch_xor(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) volatile noexcept; - @\placeholdernc{integral}@ fetch_xor(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) noexcept; - - @\placeholdernc{integral}@ operator++(int) volatile noexcept; - @\placeholdernc{integral}@ operator++(int) noexcept; - @\placeholdernc{integral}@ operator--(int) volatile noexcept; - @\placeholdernc{integral}@ operator--(int) noexcept; - @\placeholdernc{integral}@ operator++() volatile noexcept; - @\placeholdernc{integral}@ operator++() noexcept; - @\placeholdernc{integral}@ operator--() volatile noexcept; - @\placeholdernc{integral}@ operator--() noexcept; - @\placeholdernc{integral}@ operator+=(@\placeholdernc{integral}@) volatile noexcept; - @\placeholdernc{integral}@ operator+=(@\placeholdernc{integral}@) noexcept; - @\placeholdernc{integral}@ operator-=(@\placeholdernc{integral}@) volatile noexcept; - @\placeholdernc{integral}@ operator-=(@\placeholdernc{integral}@) noexcept; - @\placeholdernc{integral}@ operator&=(@\placeholdernc{integral}@) volatile noexcept; - @\placeholdernc{integral}@ operator&=(@\placeholdernc{integral}@) noexcept; - @\placeholdernc{integral}@ operator|=(@\placeholdernc{integral}@) volatile noexcept; - @\placeholdernc{integral}@ operator|=(@\placeholdernc{integral}@) noexcept; - @\placeholdernc{integral}@ operator^=(@\placeholdernc{integral}@) volatile noexcept; - @\placeholdernc{integral}@ operator^=(@\placeholdernc{integral}@) noexcept; - - void wait(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) const volatile noexcept; - void wait(@\placeholdernc{integral}@, memory_order = memory_order::seq_cst) const noexcept; + @\placeholdernc{integral-type}@ fetch_add(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) volatile noexcept; + @\placeholdernc{integral-type}@ fetch_add(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) noexcept; + @\placeholdernc{integral-type}@ fetch_sub(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) volatile noexcept; + @\placeholdernc{integral-type}@ fetch_sub(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) noexcept; + @\placeholdernc{integral-type}@ fetch_and(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) volatile noexcept; + @\placeholdernc{integral-type}@ fetch_and(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) noexcept; + @\placeholdernc{integral-type}@ fetch_or(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) volatile noexcept; + @\placeholdernc{integral-type}@ fetch_or(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) noexcept; + @\placeholdernc{integral-type}@ fetch_xor(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) volatile noexcept; + @\placeholdernc{integral-type}@ fetch_xor(@\placeholdernc{integral-type}@, + memory_order = memory_order::seq_cst) noexcept; + + @\placeholdernc{integral-type}@ operator++(int) volatile noexcept; + @\placeholdernc{integral-type}@ operator++(int) noexcept; + @\placeholdernc{integral-type}@ operator--(int) volatile noexcept; + @\placeholdernc{integral-type}@ operator--(int) noexcept; + @\placeholdernc{integral-type}@ operator++() volatile noexcept; + @\placeholdernc{integral-type}@ operator++() noexcept; + @\placeholdernc{integral-type}@ operator--() volatile noexcept; + @\placeholdernc{integral-type}@ operator--() noexcept; + @\placeholdernc{integral-type}@ operator+=(@\placeholdernc{integral-type}@) volatile noexcept; + @\placeholdernc{integral-type}@ operator+=(@\placeholdernc{integral-type}@) noexcept; + @\placeholdernc{integral-type}@ operator-=(@\placeholdernc{integral-type}@) volatile noexcept; + @\placeholdernc{integral-type}@ operator-=(@\placeholdernc{integral-type}@) noexcept; + @\placeholdernc{integral-type}@ operator&=(@\placeholdernc{integral-type}@) volatile noexcept; + @\placeholdernc{integral-type}@ operator&=(@\placeholdernc{integral-type}@) noexcept; + @\placeholdernc{integral-type}@ operator|=(@\placeholdernc{integral-type}@) volatile noexcept; + @\placeholdernc{integral-type}@ operator|=(@\placeholdernc{integral-type}@) noexcept; + @\placeholdernc{integral-type}@ operator^=(@\placeholdernc{integral-type}@) volatile noexcept; + @\placeholdernc{integral-type}@ operator^=(@\placeholdernc{integral-type}@) noexcept; + + void wait(@\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) const volatile noexcept; + void wait(@\placeholdernc{integral-type}@, memory_order = memory_order::seq_cst) const noexcept; void notify_one() volatile noexcept; void notify_one() noexcept; void notify_all() volatile noexcept; @@ -4293,11 +4306,11 @@ \indexlibraryglobal{atomic_fetch_or_explicit}% \indexlibraryglobal{atomic_fetch_sub_explicit}% \indexlibraryglobal{atomic_fetch_xor_explicit}% -\indexlibrarymember{fetch_add}{atomic<\placeholder{integral}>}% -\indexlibrarymember{fetch_and}{atomic<\placeholder{integral}>}% -\indexlibrarymember{fetch_or}{atomic<\placeholder{integral}>}% -\indexlibrarymember{fetch_sub}{atomic<\placeholder{integral}>}% -\indexlibrarymember{fetch_xor}{atomic<\placeholder{integral}>}% +\indexlibrarymember{fetch_add}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{fetch_and}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{fetch_or}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{fetch_sub}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{fetch_xor}{atomic<\placeholder{integral-type}>}% \begin{itemdecl} T fetch_@\placeholdernc{key}@(T operand, memory_order order = memory_order::seq_cst) volatile noexcept; T fetch_@\placeholdernc{key}@(T operand, memory_order order = memory_order::seq_cst) noexcept; @@ -4337,11 +4350,11 @@ \indexlibrarymember{operator+=}{atomic}% \indexlibrarymember{operator-=}{atomic}% -\indexlibrarymember{operator+=}{atomic<\placeholder{integral}>}% -\indexlibrarymember{operator-=}{atomic<\placeholder{integral}>}% -\indexlibrarymember{operator\&=}{atomic<\placeholder{integral}>}% -\indexlibrarymember{operator"|=}{atomic<\placeholder{integral}>}% -\indexlibrarymember{operator\caret=}{atomic<\placeholder{integral}>}% +\indexlibrarymember{operator+=}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{operator-=}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{operator\&=}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{operator"|=}{atomic<\placeholder{integral-type}>}% +\indexlibrarymember{operator\caret=}{atomic<\placeholder{integral-type}>}% \begin{itemdecl} T operator @\placeholder{op}@=(T operand) volatile noexcept; T operator @\placeholder{op}@=(T operand) noexcept; @@ -4360,18 +4373,18 @@ \rSec3[atomics.types.float]{Specializations for floating-point types} -\indexlibrary{\idxcode{atomic<\placeholder{floating-point}>}}% +\indexlibrary{\idxcode{atomic<\placeholder{floating-point-type}>}}% \pnum There are specializations of the \tcode{atomic} class template for all cv-unqualified floating-point types. -For each such type \tcode{\placeholdernc{floating-point}}, -the specialization \tcode{atomic<\placeholder{floating-point}>} +For each such type \tcode{\placeholdernc{floating-point-type}}, +the specialization \tcode{atomic<\placeholder{floating-point-type}>} provides additional atomic operations appropriate to floating-point types. \begin{codeblock} namespace std { - template<> struct atomic<@\placeholder{floating-point}@> { - using value_type = @\placeholdernc{floating-point}@; + template<> struct atomic<@\placeholder{floating-point-type}@> { + using value_type = @\placeholdernc{floating-point-type}@; using difference_type = value_type; static constexpr bool is_always_lock_free = @\impdefx{whether a given \tcode{atomic} type's operations are always lock free}@; @@ -4379,57 +4392,57 @@ bool is_lock_free() const noexcept; constexpr atomic() noexcept; - constexpr atomic(@\placeholder{floating-point}@) noexcept; + constexpr atomic(@\placeholder{floating-point-type}@) noexcept; atomic(const atomic&) = delete; atomic& operator=(const atomic&) = delete; atomic& operator=(const atomic&) volatile = delete; - void store(@\placeholdernc{floating-point}@, memory_order = memory_order::seq_cst) volatile noexcept; - void store(@\placeholdernc{floating-point}@, memory_order = memory_order::seq_cst) noexcept; - @\placeholdernc{floating-point}@ operator=(@\placeholder{floating-point}@) volatile noexcept; - @\placeholdernc{floating-point}@ operator=(@\placeholder{floating-point}@) noexcept; - @\placeholdernc{floating-point}@ load(memory_order = memory_order::seq_cst) volatile noexcept; - @\placeholdernc{floating-point}@ load(memory_order = memory_order::seq_cst) noexcept; - operator @\placeholdernc{floating-point}@() volatile noexcept; - operator @\placeholdernc{floating-point}@() noexcept; + void store(@\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) volatile noexcept; + void store(@\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) noexcept; + @\placeholdernc{floating-point-type}@ operator=(@\placeholder{floating-point-type}@) volatile noexcept; + @\placeholdernc{floating-point-type}@ operator=(@\placeholder{floating-point-type}@) noexcept; + @\placeholdernc{floating-point-type}@ load(memory_order = memory_order::seq_cst) volatile noexcept; + @\placeholdernc{floating-point-type}@ load(memory_order = memory_order::seq_cst) noexcept; + operator @\placeholdernc{floating-point-type}@() volatile noexcept; + operator @\placeholdernc{floating-point-type}@() noexcept; - @\placeholdernc{floating-point}@ exchange(@\placeholdernc{floating-point}@, - memory_order = memory_order::seq_cst) volatile noexcept; - @\placeholdernc{floating-point}@ exchange(@\placeholdernc{floating-point}@, - memory_order = memory_order::seq_cst) noexcept; - bool compare_exchange_weak(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + @\placeholdernc{floating-point-type}@ exchange(@\placeholdernc{floating-point-type}@, + memory_order = memory_order::seq_cst) volatile noexcept; + @\placeholdernc{floating-point-type}@ exchange(@\placeholdernc{floating-point-type}@, + memory_order = memory_order::seq_cst) noexcept; + bool compare_exchange_weak(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order, memory_order) volatile noexcept; - bool compare_exchange_weak(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + bool compare_exchange_weak(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order, memory_order) noexcept; - bool compare_exchange_strong(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + bool compare_exchange_strong(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order, memory_order) volatile noexcept; - bool compare_exchange_strong(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + bool compare_exchange_strong(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order, memory_order) noexcept; - bool compare_exchange_weak(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + bool compare_exchange_weak(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) volatile noexcept; - bool compare_exchange_weak(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + bool compare_exchange_weak(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) noexcept; - bool compare_exchange_strong(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + bool compare_exchange_strong(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) volatile noexcept; - bool compare_exchange_strong(@\placeholder{floating-point}@&, @\placeholdernc{floating-point}@, + bool compare_exchange_strong(@\placeholder{floating-point-type}@&, @\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) noexcept; - @\placeholdernc{floating-point}@ fetch_add(@\placeholdernc{floating-point}@, - memory_order = memory_order::seq_cst) volatile noexcept; - @\placeholdernc{floating-point}@ fetch_add(@\placeholdernc{floating-point}@, - memory_order = memory_order::seq_cst) noexcept; - @\placeholdernc{floating-point}@ fetch_sub(@\placeholdernc{floating-point}@, - memory_order = memory_order::seq_cst) volatile noexcept; - @\placeholdernc{floating-point}@ fetch_sub(@\placeholdernc{floating-point}@, - memory_order = memory_order::seq_cst) noexcept; - - @\placeholdernc{floating-point}@ operator+=(@\placeholder{floating-point}@) volatile noexcept; - @\placeholdernc{floating-point}@ operator+=(@\placeholder{floating-point}@) noexcept; - @\placeholdernc{floating-point}@ operator-=(@\placeholder{floating-point}@) volatile noexcept; - @\placeholdernc{floating-point}@ operator-=(@\placeholder{floating-point}@) noexcept; - - void wait(@\placeholdernc{floating-point}@, memory_order = memory_order::seq_cst) const volatile noexcept; - void wait(@\placeholdernc{floating-point}@, memory_order = memory_order::seq_cst) const noexcept; + @\placeholdernc{floating-point-type}@ fetch_add(@\placeholdernc{floating-point-type}@, + memory_order = memory_order::seq_cst) volatile noexcept; + @\placeholdernc{floating-point-type}@ fetch_add(@\placeholdernc{floating-point-type}@, + memory_order = memory_order::seq_cst) noexcept; + @\placeholdernc{floating-point-type}@ fetch_sub(@\placeholdernc{floating-point-type}@, + memory_order = memory_order::seq_cst) volatile noexcept; + @\placeholdernc{floating-point-type}@ fetch_sub(@\placeholdernc{floating-point-type}@, + memory_order = memory_order::seq_cst) noexcept; + + @\placeholdernc{floating-point-type}@ operator+=(@\placeholder{floating-point-type}@) volatile noexcept; + @\placeholdernc{floating-point-type}@ operator+=(@\placeholder{floating-point-type}@) noexcept; + @\placeholdernc{floating-point-type}@ operator-=(@\placeholder{floating-point-type}@) volatile noexcept; + @\placeholdernc{floating-point-type}@ operator-=(@\placeholder{floating-point-type}@) noexcept; + + void wait(@\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) const volatile noexcept; + void wait(@\placeholdernc{floating-point-type}@, memory_order = memory_order::seq_cst) const noexcept; void notify_one() volatile noexcept; void notify_one() noexcept; void notify_all() volatile noexcept; @@ -4456,8 +4469,8 @@ \indexlibraryglobal{atomic_fetch_sub}% \indexlibraryglobal{atomic_fetch_add_explicit}% \indexlibraryglobal{atomic_fetch_sub_explicit}% -\indexlibrarymember{fetch_add}{atomic<\placeholder{floating-point}>}% -\indexlibrarymember{fetch_sub}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{fetch_add}{atomic<\placeholder{floating-point-type}>}% +\indexlibrarymember{fetch_sub}{atomic<\placeholder{floating-point-type}>}% \begin{itemdecl} T fetch_@\placeholdernc{key}@(T operand, memory_order order = memory_order::seq_cst) volatile noexcept; T fetch_@\placeholdernc{key}@(T operand, memory_order order = memory_order::seq_cst) noexcept; @@ -4485,18 +4498,18 @@ \remarks If the result is not a representable value for its type\iref{expr.pre} the result is unspecified, but the operations otherwise have no undefined -behavior. Atomic arithmetic operations on \tcode{\placeholder{floating-point}} -should conform to the \tcode{std::numeric_limits<\placeholder{floating-point}>} +behavior. Atomic arithmetic operations on \tcode{\placeholder{floating-point-type}} +should conform to the \tcode{std::numeric_limits<\placeholder{floating-point-type}>} traits associated with the floating-point type\iref{limits.syn}. The floating-point environment\iref{cfenv} for atomic arithmetic operations -on \tcode{\placeholder{floating-point}} may be different than the +on \tcode{\placeholder{floating-point-type}} may be different than the calling thread's floating-point environment. \end{itemdescr} \indexlibrarymember{operator+=}{atomic}% \indexlibrarymember{operator-=}{atomic}% -\indexlibrarymember{operator+=}{atomic<\placeholder{floating-point}>}% -\indexlibrarymember{operator-=}{atomic<\placeholder{floating-point}>}% +\indexlibrarymember{operator+=}{atomic<\placeholder{floating-point-type}>}% +\indexlibrarymember{operator-=}{atomic<\placeholder{floating-point-type}>}% \begin{itemdecl} T operator @\placeholder{op}@=(T operand) volatile noexcept; T operator @\placeholder{op}@=(T operand) noexcept; @@ -4516,11 +4529,11 @@ \remarks If the result is not a representable value for its type\iref{expr.pre} the result is unspecified, but the operations otherwise have no undefined -behavior. Atomic arithmetic operations on \tcode{\placeholder{floating-point}} -should conform to the \tcode{std::numeric_limits<\placeholder{floating-point}>} +behavior. Atomic arithmetic operations on \tcode{\placeholder{floating-point-type}} +should conform to the \tcode{std::numeric_limits<\placeholder{floating-point-type}>} traits associated with the floating-point type\iref{limits.syn}. The floating-point environment\iref{cfenv} for atomic arithmetic operations -on \tcode{\placeholder{floating-point}} may be different than the +on \tcode{\placeholder{floating-point-type}} may be different than the calling thread's floating-point environment. \end{itemdescr} @@ -4689,7 +4702,7 @@ \rSec3[atomics.types.memop]{Member operators common to integers and pointers to objects} \indexlibrarymember{operator++}{atomic}% -\indexlibrarymember{operator++}{atomic<\placeholder{integral}>}% +\indexlibrarymember{operator++}{atomic<\placeholder{integral-type}>}% \begin{itemdecl} value_type operator++(int) volatile noexcept; value_type operator++(int) noexcept; @@ -4707,7 +4720,7 @@ \end{itemdescr} \indexlibrarymember{operator--}{atomic}% -\indexlibrarymember{operator--}{atomic<\placeholder{integral}>}% +\indexlibrarymember{operator--}{atomic<\placeholder{integral-type}>}% \begin{itemdecl} value_type operator--(int) volatile noexcept; value_type operator--(int) noexcept; @@ -4725,7 +4738,7 @@ \end{itemdescr} \indexlibrarymember{operator++}{atomic}% -\indexlibrarymember{operator++}{atomic<\placeholder{integral}>}% +\indexlibrarymember{operator++}{atomic<\placeholder{integral-type}>}% \begin{itemdecl} value_type operator++() volatile noexcept; value_type operator++() noexcept; @@ -4743,7 +4756,7 @@ \end{itemdescr} \indexlibrarymember{operator--}{atomic}% -\indexlibrarymember{operator--}{atomic<\placeholder{integral}>}% +\indexlibrarymember{operator--}{atomic<\placeholder{integral-type}>}% \begin{itemdecl} value_type operator--() volatile noexcept; value_type operator--() noexcept; From cdf92ebc98ac227e195043ebec3fc2450ba664a8 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 14 Nov 2022 21:13:53 -0800 Subject: [PATCH 098/257] CWG2392 new-expression size check and constant evaluation --- source/expressions.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/expressions.tex b/source/expressions.tex index fa655634a5..305e2c3fdf 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -5245,7 +5245,7 @@ If the \grammarterm{expression} is erroneous after converting to \tcode{std::size_t}: \begin{itemize} \item -if the \grammarterm{expression} is a core constant expression, +if the \grammarterm{expression} is a potentially-evaluated core constant expression, the program is ill-formed; \item otherwise, an allocation function is not called; instead From 7d802b4560ead648b177f0bfb8c10608ec93c289 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 14 Nov 2022 21:33:38 -0800 Subject: [PATCH 099/257] CWG2407 Missing entry in Annex C for defaulted comparison operators [diff.cpp17.over] Restructure new wording to conform to the rest of [diff] --- source/compatibility.tex | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/source/compatibility.tex b/source/compatibility.tex index 5ec53298b8..f65fc27e89 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -657,6 +657,31 @@ } \end{codeblock} +\diffref{over.match.oper} +\change +Overload resolution may change for equality operators\iref{expr.eq}. +\rationale +Support calling \tcode{operator==} with reversed order of arguments. +\effect +Valid \CppXVII{} code that uses equality operators with conversion functions +may be ill-formed or have different semantics in this revision of \Cpp{}. +For example: +\begin{codeblock} +struct A { + operator int() const { return 10; } +}; + +bool operator==(A, int); // \#1 +// \#2 is built-in candidate: \tcode{bool operator==(int, int);} +bool b = 10 == A(); // calls \#1 with reversed order of arguments; previously selected \#2 + +struct B { + bool operator==(const B&); // member function with no cv-qualifier +}; +B b1; +bool eq = (b1 == b1); // ambiguous; previously well-formed +\end{codeblock} + \rSec2[diff.cpp17.temp]{\ref{temp}: templates} \diffref{temp.names} From 99c860532faed7650f78bdd7615263839bc3e5c4 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 14 Nov 2022 21:38:00 -0800 Subject: [PATCH 100/257] CWG2410 Implicit calls of immediate functions --- source/expressions.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/expressions.tex b/source/expressions.tex index 305e2c3fdf..09ea517af4 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -7835,7 +7835,7 @@ its enclosing statement is enclosed\iref{stmt.pre} by the \grammarterm{compound-statement} of a consteval if statement\iref{stmt.if}. \end{itemize} -An expression or conversion is an \defn{immediate invocation} +An invocation is an \defn{immediate invocation} if it is a potentially-evaluated explicit or implicit invocation of an immediate function and is not in an immediate function context. From a111f0fd9433213c3b201911a9054aa47f0e9759 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 14 Nov 2022 21:43:06 -0800 Subject: [PATCH 101/257] CWG2428 Deprecating a concept --- source/declarations.tex | 3 ++- source/templates.tex | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 96f5fc8e91..f81c028d82 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -8691,7 +8691,8 @@ a function, a namespace, an enumeration, -an enumerator, or +an enumerator, +a concept, or a template specialization. \pnum diff --git a/source/templates.tex b/source/templates.tex index 1c261623bc..d9652a851b 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -4125,7 +4125,7 @@ \begin{bnf} \nontermdef{concept-definition}\br - \keyword{concept} concept-name \terminal{=} constraint-expression \terminal{;} + \keyword{concept} concept-name \opt{attribute-specifier-seq} \terminal{=} constraint-expression \terminal{;} \end{bnf} \begin{bnf} @@ -4139,6 +4139,7 @@ Its \grammarterm{identifier} becomes a \grammarterm{concept-name} referring to that concept within its scope. +The optional \grammarterm{attribute-specifier-seq} appertains to the concept. \begin{example} \begin{codeblock} template From 45aadc0bddb49f27e5d52d3ca34dc1683ec18e95 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 14 Nov 2022 22:08:35 -0800 Subject: [PATCH 102/257] CWG2440 Allocation in core constant expressions --- source/expressions.tex | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index 09ea517af4..896374c8ff 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -7591,21 +7591,17 @@ \pnum For the purposes of determining whether an expression $E$ is a core constant expression, -the evaluation of a call to a member function of \tcode{std::allocator} +the evaluation of the body of a member function of \tcode{std::allocator} as defined in \ref{allocator.members}, where \tcode{T} is a literal type, -does not disqualify $E$ from being a core constant expression, -even if the actual evaluation of such a call -would otherwise fail the requirements for a core constant expression. -Similarly, the evaluation of a call to +is ignored. +Similarly, the evaluation of the body of \tcode{std::construct_at} or -\tcode{std::ranges::construct_at}\iref{specialized.construct} -does not disqualify $E$ -from being a core constant expression unless -the first argument, of type \tcode{T*}, does not point +\tcode{std::ranges::construct_at} +is considered to include only +the underlying constructor call +if the first argument (of type \tcode{T*}) points to storage allocated with \tcode{std::allocator} or -to an object whose lifetime began within the evaluation of $E$, or -the evaluation of the underlying constructor call -disqualifies $E$ from being a core constant expression. +to an object whose lifetime began within the evaluation of $E$. \pnum During the evaluation of an expression $E$ as a core constant expression, From bcd6e66491d40c97815b3946bdefe3c4a24ef43c Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 14 Nov 2022 23:35:27 -0800 Subject: [PATCH 103/257] CWG2451 promise.unhandled_exception() and final suspend point --- source/declarations.tex | 24 +++++++++++++++++++----- source/expressions.tex | 11 ++++++++--- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index f81c028d82..0c2de6ffbe 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -6448,19 +6448,20 @@ where \begin{itemize} \item +\indextext{coroutine!await expression}% the \grammarterm{await-expression} containing the call to \tcode{initial_suspend} -is the \defn{initial suspend point}, and +is the \defnadj{initial}{await expression}, and \item the \grammarterm{await-expression} containing the call to \tcode{final_suspend} -is the \defn{final suspend point}, and +is the \defnadj{final}{await expression}, and \item \placeholder{initial-await-resume-called} is initially \tcode{false} and is set to \tcode{true} immediately before the evaluation of the \placeholder{await-resume} expression\iref{expr.await} -of the initial suspend point, and +of the initial await expression, and \item \placeholder{promise-type} denotes the promise type, and \item @@ -6476,7 +6477,19 @@ constructor is found\iref{over.match.viable}, then \placeholder{promise-constructor-arguments} is \tcode{($\tcode{q}_1$, $\dotsc$, $\tcode{q}_n$)}, otherwise -\placeholder{promise-constructor-arguments} is empty. +\placeholder{promise-constructor-arguments} is empty, and +\item +a coroutine is suspended at the \defnadj{initial}{suspend point} if +it is suspended at the initial await expression, and +\item +a coroutine is suspended at a \defnadj{final}{suspend point} if +it is suspended +\begin{itemize} +\item +at a final await expression or +\item +due to an exception exiting from \tcode{unhandled_exception()}. +\end{itemize} \end{itemize} \pnum @@ -6642,7 +6655,8 @@ \pnum If the evaluation of the expression \tcode{\exposid{promise}.unhandled_exception()} exits via an exception, -the coroutine is considered suspended at the final suspend point. +the coroutine is considered suspended at the final suspend point +and the exception propagates to the caller or resumer. \pnum The expression \keyword{co_await} \tcode{\exposid{promise}.final_suspend()} diff --git a/source/expressions.tex b/source/expressions.tex index 896374c8ff..b564bf6b94 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -4762,9 +4762,10 @@ of the enclosing coroutine and \tcode{P} is the type of that object. \item Unless -the \grammarterm{await-expression} was implicitly produced by a -\grammarterm{yield-expression}\iref{expr.yield}, an initial suspend point, -or a final suspend point\iref{dcl.fct.def.coroutine}, +the \grammarterm{await-expression} was implicitly produced by +a \grammarterm{yield-expression}\iref{expr.yield}, +an initial await expression, +or a final await expression\iref{dcl.fct.def.coroutine}, a search is performed for the name \tcode{await_transform} in the scope of \tcode{P} \iref{class.member.lookup}. If this search is performed and finds at least one declaration, @@ -4855,6 +4856,10 @@ rethrown\iref{except.throw}. Otherwise, control flow returns to the current coroutine caller or resumer\iref{dcl.fct.def.coroutine} without exiting any scopes\iref{stmt.jump}. +\indextext{coroutine!suspend point}% +The point in the coroutine +immediately prior to control returning to its caller or resumer +is a coroutine \defn{suspend point}. \item If the result of \placeholder{await-ready} is \keyword{true}, From eb43529c5dcb5ed82cd54a1095cbba3210442460 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 14 Nov 2022 23:38:57 -0800 Subject: [PATCH 104/257] CWG2508 Restrictions on uses of template parameter names --- source/templates.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/templates.tex b/source/templates.tex index d9652a851b..cc1caec091 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -4617,7 +4617,8 @@ \pnum The name of a \grammarterm{template-parameter} -shall not be bound to any following declaration contained by the scope +shall not be bound to any following declaration +whose locus is contained by the scope to which the template-parameter belongs. \begin{example} \begin{codeblock} From e04d375b2326f29e1849679c280ab63c27665ec9 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 14 Nov 2022 23:45:40 -0800 Subject: [PATCH 105/257] CWG2583 Common initial sequence should consider over-alignment --- source/classes.tex | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source/classes.tex b/source/classes.tex index cedcaf76ef..ea8a7a5bd9 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -785,13 +785,21 @@ The \defn{common initial sequence} of two standard-layout struct\iref{class.prop} types is the longest sequence of non-static data members and bit-fields in declaration order, starting with the first -such entity in each of the structs, such that corresponding entities +such entity in each of the structs, such that +\begin{itemize} +\item +corresponding entities have layout-compatible types\iref{basic.types}, +\item +corresponding entities have the same alignment requirements\iref{basic.align}, +\item either both entities are declared with the \tcode{no_unique_address} attribute\iref{dcl.attr.nouniqueaddr} -or neither is, -and either both entities are bit-fields with the same width +or neither is, and +\item +either both entities are bit-fields with the same width or neither is a bit-field. +\end{itemize} \begin{example} \begin{codeblock} struct A { int a; char b; }; From 41506fb8d715b75aa3a7e861e5825a6c86cfd976 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 14 Nov 2022 23:52:12 -0800 Subject: [PATCH 106/257] CWG2590 Underlying type should determine size and alignment requirements of an enum --- source/declarations.tex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/declarations.tex b/source/declarations.tex index 0c2de6ffbe..433e3318f4 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -7041,6 +7041,15 @@ this range. \end{footnote} +\pnum +An enumeration has +the same size, +value representation, and +alignment requirements\iref{basic.align} +as its underlying type. +Furthermore, each value of an enumeration has the same representation +as the corresponding value of the underlying type. + \pnum Two enumeration types are \defnx{layout-compatible enumerations}{layout-compatible!enumeration} if they have the same underlying type. From 869679a203172c70dcb4856e2096315eb48f33a9 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 00:17:56 -0800 Subject: [PATCH 107/257] CWG2598 Unions should not require a non-static data member of literal type --- source/basic.tex | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index 092b9a2f86..7b188aa9d7 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -4742,15 +4742,20 @@ has all of the following properties: \begin{itemize} \item it has a constexpr destructor\iref{dcl.constexpr}, -\item it is either a closure type\iref{expr.prim.lambda.closure}, -an aggregate type\iref{dcl.init.aggr}, or -has at least one constexpr constructor or constructor template +\item all of its non-static non-variant data members and base classes are of non-volatile literal types, and +\item it +\begin{itemize} +\item is a closure type\iref{expr.prim.lambda.closure}, +\item is an aggregate union type that has either +no variant members or +at least one variant member of non-volatile literal type, +\item is a non-union aggregate type for which +each of its anonymous union members +satisfies the above requirements for an aggregate union type, or +\item has at least one constexpr constructor or constructor template (possibly inherited\iref{namespace.udecl} from a base class) -that is not a copy or move constructor, -\item if it is a union, at least one of its non-static data members is -of non-volatile literal type, and -\item if it is not a union, all of its non-static data members and base classes are -of non-volatile literal types. +that is not a copy or move constructor. +\end{itemize} \end{itemize} \end{itemize} \begin{note} From b52fdb02fc8ace1b10d2430d758f0e1b007b5ceb Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 00:25:31 -0800 Subject: [PATCH 108/257] CWG2599 What does initializing a parameter include? --- source/declarations.tex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/declarations.tex b/source/declarations.tex index 433e3318f4..e97e5803ea 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -4680,6 +4680,14 @@ An \grammarterm{initializer-clause} followed by an ellipsis is a pack expansion\iref{temp.variadic}. +\pnum +Initialization includes +the evaluation of all subexpressions of +each \grammarterm{initializer-clause} of +the initializer (possibly nested within \grammarterm{braced-init-list}{s}) and +the creation of any temporary objects for +function arguments or return values\iref{class.temporary}. + \pnum If the initializer is a parenthesized \grammarterm{expression-list}, the expressions are evaluated in the order From f0f778a61114b5dc823bda181bec18c0c5995df8 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 01:08:54 -0800 Subject: [PATCH 109/257] CWG2601 Tracking of created and destroyed subobjects --- source/exceptions.tex | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/source/exceptions.tex b/source/exceptions.tex index 15b2896a22..f7ce5ae44c 100644 --- a/source/exceptions.tex +++ b/source/exceptions.tex @@ -405,22 +405,51 @@ \end{example} \pnum -If the initialization or destruction of an object +If the initialization of an object other than by delegating constructor is terminated by an exception, the destructor is invoked for -each of the object's direct subobjects -and, for a complete object, virtual base class subobjects, -whose initialization has completed\iref{dcl.init} -and whose destructor has not yet begun execution, -except that in the case of destruction, the variant members of a -union-like class are not destroyed. +each of the object's subobjects +that were known to be initialized by the object's initialization and +whose initialization has completed\iref{dcl.init}. \begin{note} If such an object has a reference member that extends the lifetime of a temporary object, this ends the lifetime of the reference member, so the lifetime of the temporary object is effectively not extended. \end{note} +\indextext{subobject!initialized, known to be}% +A subobject is \defn{known to be initialized} +if its initialization is specified +\begin{itemize} +\item in \ref{class.base.init} for initialization by constructor, +\item in \ref{class.copy.ctor} for initialization by defaulted copy/move constructor, +\item in \ref{class.inhctor.init} for initialization by inherited constructor, +\item in \ref{dcl.init.aggr} for aggregate initialization, +\item in \ref{expr.prim.lambda.capture} for the initialization of +the closure object when evaluating a \grammarterm{lambda-expression}, +\item in \ref{dcl.init.general} for +default-initialization, value-initialization, or direct-initialization +of an array. +\end{itemize} +\begin{note} +This includes virtual base class subobjects +if the initialization +is for a complete object, and +can include variant members +that were nominated explicitly by +a \grammarterm{mem-initializer} or \grammarterm{designated-initializer-clause} or +that have a default member initializer. +\end{note} +If the destructor of an object is terminated by an exception, +each destructor invocation +that would be performed after executing the body of the destructor\iref{class.dtor} and +that has not yet begun execution +is performed. +\begin{note} +This includes virtual base class subobjects if +the destructor was invoked for a complete object. +\end{note} The subobjects are destroyed in the reverse order of the completion of their construction. Such destruction is sequenced before entering a handler of the \grammarterm{function-try-block} of the constructor or destructor, From c8c701144639c9e12a10d419e0f2a989c058e5e8 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 02:19:07 -0800 Subject: [PATCH 110/257] CWG2603 Holistic functional equivalence for function templates [basic.scope.scope] Add reference to "corresponding object parameter" under function template. [basic.scope.scope] Add missing "their" in new wording. --- source/basic.tex | 19 ++++++++++++------- source/templates.tex | 10 ++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index 7b188aa9d7..467e866851 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -882,6 +882,7 @@ \item their object parameters have the same type. \end{itemize} +\indextext{template!function!corresponding object parameter}% Two non-static member function templates have \defnadjx{corresponding}{object parameters}{object parameter} if: \begin{itemize} @@ -894,6 +895,14 @@ \item the types of their object parameters are equivalent. \end{itemize} +\indextext{template!function!corresponding signature}% +Two function templates have +\defnadjx{corresponding}{signatures}{signature} if +their \grammarterm{template-parameter-list}{s} +have the same length, +their corresponding \grammarterm{template-parameter}{s} are equivalent, +they have equivalent non-object-parameter-type-lists and return types (if any), and, +if both are non-static members, they have corresponding object parameters. \pnum Two declarations \defn{correspond} @@ -925,13 +934,9 @@ if both are non-static members, they have corresponding object parameters, or \item -both declare function templates with equivalent -non-object-parameter-type-lists, -return types (if any), -\grammarterm{template-head}s, and -trailing \grammarterm{requires-clause}s (if any), and, -if both are non-static members, -they have corresponding object parameters. +both declare function templates with corresponding signatures and equivalent +\grammarterm{template-head}s and +trailing \grammarterm{requires-clause}s (if any). \end{itemize} \end{itemize} \begin{note} diff --git a/source/templates.tex b/source/templates.tex index cc1caec091..87a62a52a2 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -3743,6 +3743,16 @@ whether two constructs are equivalent, and they are functionally equivalent but not equivalent, the program is ill-formed, no diagnostic required. +% FIXME: What does it mean for two function templates to correspond? +Furthermore, if two function templates that do not correspond +\begin{itemize} +\item have the same name, +\item have corresponding signatures\iref{basic.scope.scope}, +\item would declare the same entity\iref{basic.link} considering them to correspond, and +% FIXME: What does it mean for a set of template argument lists to satisfy a function template? +\item accept and are satisfied by the same set of template argument lists, +\end{itemize} +the program is ill-formed, no diagnostic required. \pnum \begin{note} From 96aca58651efacc83eadc53bd48df65972fe5a70 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 02:24:31 -0800 Subject: [PATCH 111/257] CWG2604 Attributes for an explicit specialization --- source/templates.tex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/templates.tex b/source/templates.tex index 87a62a52a2..cc5787b998 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -6591,6 +6591,9 @@ is inline, constexpr, or an immediate function is determined by the explicit specialization and is independent of those properties of the template. +Similarly, +attributes appearing in the declaration of a template +have no effect on an explicit specialization of that template. \begin{example} \begin{codeblock} template void f(T) { @\commentellip@ } @@ -6598,6 +6601,12 @@ template<> inline void f<>(int) { @\commentellip@ } // OK, inline template<> int g<>(int) { @\commentellip@ } // OK, not inline + +template [[noreturn]] void h([[maybe_unused]] int i); +template<> void h(int i) { + // Implementations are expected not to warn that the function returns + // but can warn about the unused parameter. +} \end{codeblock} \end{example} From afc88d5d682b06673b6f76c18b4eed09d891b2ec Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 02:26:25 -0800 Subject: [PATCH 112/257] CWG2605 Implicit-lifetime aggregates --- source/classes.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/classes.tex b/source/classes.tex index ea8a7a5bd9..2ae9beb2fe 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -305,7 +305,7 @@ A class \tcode{S} is an \defnadj{implicit-lifetime}{class} if \begin{itemize} \item -it is an aggregate or +it is an aggregate whose destructor is not user-provided or \item it has at least one trivial eligible constructor and a trivial, non-deleted destructor. From 319d7da39ede1cb87cdacebb4ea0ad91a473aa31 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 02:30:15 -0800 Subject: [PATCH 113/257] CWG2610 Indirect private base classes in aggregates --- source/declarations.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index e97e5803ea..efdf9de161 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -4744,9 +4744,9 @@ \item no private or protected direct non-static data members\iref{class.access}, \item -no virtual functions\iref{class.virtual}, and +no private or protected direct base classes\iref{class.access.base}, and \item -no virtual, private, or protected base classes\iref{class.mi}. +no virtual functions\iref{class.virtual} or virtual base classes\iref{class.mi}. \end{itemize} \begin{note} Aggregate initialization does not allow accessing From 6e8c9bc52a6d38ab9717847942e79a5976741b90 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 02:45:22 -0800 Subject: [PATCH 114/257] CWG2611 Missing parentheses in expansion of fold-expression could cause syntactic reinterpretation --- source/templates.tex | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/templates.tex b/source/templates.tex index cc5787b998..453ba9e828 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -2839,30 +2839,40 @@ The instantiation of a \grammarterm{fold-expression}\iref{expr.prim.fold} produces: \begin{itemize} \item +% Note: "\space" used below because " " inside tcode adds too much whitespace; +% one could optionally use mathfont inside tcode, e.g. "\tcode{($ $}". +\tcode{(}\space \tcode{((}$\mathtt{E}_1$ \placeholder{op} $\mathtt{E}_2$\tcode{)} \placeholder{op} $\cdots$\tcode{)} \placeholder{op} $\mathtt{E}_N$ +\space\tcode{)} for a unary left fold, \item +\tcode{(}\space $\mathtt{E}_1$ \placeholder{op} \tcode{(}$\cdots$ \placeholder{op} \tcode{(}$\mathtt{E}_{N-1}$ \placeholder{op} $\mathtt{E}_N$\tcode{))} +\space\tcode{)} for a unary right fold, \item +\tcode{(}\space \tcode{(((}$\mathtt{E}$ \placeholder{op} $\mathtt{E}_1$\tcode{)} \placeholder{op} $\mathtt{E}_2$\tcode{)} \placeholder{op} $\cdots$\tcode{)} \placeholder{op} $\mathtt{E}_N$ +\space\tcode{)} for a binary left fold, and \item +\tcode{(}\space $\mathtt{E}_1$ \placeholder{op} \tcode{(}$\cdots$ \placeholder{op} \tcode{(}$\mathtt{E}_{N-1}$ \placeholder{op} \tcode{(}$\mathtt{E}_{N}$ \placeholder{op} $\mathtt{E}$\tcode{)))} +\space\tcode{)} for a binary right fold. \end{itemize} From ea7df945f80a9571875fd4422055795236eb3d3c Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 02:49:25 -0800 Subject: [PATCH 115/257] CWG2612 Incorrect comment in example --- source/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/declarations.tex b/source/declarations.tex index efdf9de161..f02fb05ee9 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -4548,7 +4548,7 @@ is the same class as the class of the destination, the initializer expression is used to initialize the destination object. \begin{example} -\tcode{T x = T(T(T()));} calls the \tcode{T} default constructor to initialize \tcode{x}. +\tcode{T x = T(T(T()));} value-initializes \tcode{x}. \end{example} \item Otherwise, if the initialization is direct-initialization, From d9dc415541d7e7f8b66dfba4047f5b91572dc898 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 02:51:16 -0800 Subject: [PATCH 116/257] CWG2613 Incomplete definition of resumer --- source/declarations.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/declarations.tex b/source/declarations.tex index f02fb05ee9..06e3380072 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -6525,7 +6525,7 @@ a resumption member function\iref{coroutine.handle.resumption} of a coroutine handle\iref{coroutine.handle} that refers to the coroutine. -The function that invoked a resumption member function is +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. From 2fe137e9f6467bcc656f5048c18be4cd1ce9de8a Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 03:01:26 -0800 Subject: [PATCH 117/257] CWG2614 Unspecified results for class member access --- source/expressions.tex | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index b564bf6b94..51c92b040b 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -3592,7 +3592,12 @@ \pnum If \tcode{E2} is declared to have type ``reference to \tcode{T}'', then -\tcode{E1.E2} is an lvalue; the type of \tcode{E1.E2} is \tcode{T}. +\tcode{E1.E2} is an lvalue of type \tcode{T}. +If \tcode{E2} is a static data member, +\tcode{E1.E2} designates the object or function to which +the reference is bound, +otherwise \tcode{E1.E2} designates the object or function to which +the corresponding reference member of \tcode{E1} is bound. Otherwise, one of the following rules applies. \begin{itemize} @@ -3640,8 +3645,8 @@ ill-formed. \item If \tcode{E2} is a member enumerator and the type of \tcode{E2} -is \tcode{T}, the expression \tcode{E1.E2} is a prvalue. The type of -\tcode{E1.E2} is \tcode{T}. +is \tcode{T}, the expression \tcode{E1.E2} is a prvalue of type \tcode{T} +whose value is the value of the enumerator. \end{itemize} \pnum From 092dec0b5820b121e7b26618cb630989e57f0110 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 04:07:26 -0800 Subject: [PATCH 118/257] CWG2616 Imprecise restrictions on break and continue [stmt.pre] Add index to "enclosing" under statement. --- source/statements.tex | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/source/statements.tex b/source/statements.tex index bca992c936..a4abdf7d97 100644 --- a/source/statements.tex +++ b/source/statements.tex @@ -57,6 +57,7 @@ \end{note} \pnum +\indextext{statement!enclosing}% A \grammarterm{statement} \tcode{S1} \defnx{encloses}{enclosing statement} a \grammarterm{statement} \tcode{S2} if \begin{itemize} @@ -74,6 +75,11 @@ \item \tcode{S1} encloses a statement \tcode{S3} and \tcode{S3} encloses \tcode{S2}. \end{itemize} +\indextext{statement!enclosed by}% +A statement \tcode{S1} is +\defnx{enclosed by}{enclosed by statement} +a statement \tcode{S2} if +\tcode{S2} encloses \tcode{S1}. \pnum \indextext{\idxgram{condition}{s}!rules for}% @@ -148,9 +154,12 @@ before its introduction. \pnum +\indextext{\idxgram{labeled-statement}}% \indextext{label!\idxcode{case}}% \indextext{label!\idxcode{default}}% -Case labels and default labels shall occur only in \keyword{switch} statements. +A \grammarterm{labeled-statement} +whose \grammarterm{label} is a \keyword{case} or \keyword{default} label +shall be enclosed by\iref{stmt.pre} a \keyword{switch} statement\iref{stmt.switch}. \pnum A \defnadj{control-flow-limited}{statement} is a statement \tcode{S} for which: @@ -759,25 +768,27 @@ \indextext{statement!\idxcode{break}} \pnum -The \keyword{break} statement shall occur only in an +A \keyword{break} statement shall be enclosed by\iref{stmt.pre} \indextext{\idxgram{iteration-statement}}% \indextext{statement!\idxcode{switch}}% -\grammarterm{iteration-statement} or a \keyword{switch} statement and causes -termination of the smallest enclosing \grammarterm{iteration-statement} or -\keyword{switch} statement; control passes to the statement following the +an \grammarterm{iteration-statement}\iref{stmt.iter} or +a \keyword{switch} statement\iref{stmt.switch}. +The \keyword{break} statement causes +termination of the smallest such enclosing statement; +control passes to the statement following the terminated statement, if any. \rSec2[stmt.cont]{The \keyword{continue} statement}% \indextext{statement!\idxcode{continue}} \pnum -The -\keyword{continue} -statement shall occur only in an +A \keyword{continue} +statement shall be enclosed by\iref{stmt.pre} an \indextext{\idxgram{iteration-statement}}% -\grammarterm{iteration-statement} -and causes control to pass to the loop-continuation portion of the -smallest enclosing \grammarterm{iteration-statement}, that is, to the end +\grammarterm{iteration-statement}\iref{stmt.iter}. +The \keyword{continue} statement +causes control to pass to the loop-continuation portion of the +smallest such enclosing statement, that is, to the end of the loop. More precisely, in each of the statements \begin{minipage}{.30\hsize} From bb4acc841a4b5fbca8b00fc121cc887877583663 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 04:38:13 -0800 Subject: [PATCH 119/257] CWG2618 Substitution during deduction should exclude exception specifications --- source/templates.tex | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/source/templates.tex b/source/templates.tex index 453ba9e828..558f975f60 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -7130,8 +7130,16 @@ obtained from default arguments are substituted. \pnum -The substitution occurs in all types and expressions that are used in the function -type and in template parameter declarations. The expressions include not only +\indextext{deduction!deduction substitution loci}% +The \defn{deduction substitution loci} are +\begin{itemize} +\item the function type outside of the \grammarterm{noexcept-specifier}, +\item the \grammarterm{explicit-specifier}, and +\item the template parameter declarations. +\end{itemize} +The substitution occurs in all types and expressions that are used +in the deduction substitution loci. +The expressions include not only constant expressions such as those that appear in array bounds or as nontype template arguments but also general expressions (i.e., non-constant expressions) inside \tcode{sizeof}, \keyword{decltype}, and other contexts that allow non-constant @@ -7175,11 +7183,8 @@ as part of the substitution process. \end{note} -Only invalid types and expressions in the immediate context of -the function type, -its template parameter types, -and its \grammarterm{explicit-specifier} -can result in a deduction failure. +Invalid types and expressions can result in a deduction failure +only in the immediate context of the deduction substitution loci. \begin{note} The substitution into types and expressions can result in effects such as the instantiation of class template specializations and/or From 07b5caab31df9a544f8ab5121c9bb36ae4acc3d9 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 04:50:32 -0800 Subject: [PATCH 120/257] CWG2619 Kind of initialization for a designated-initializer-list --- source/declarations.tex | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 06e3380072..b116c8664a 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -4455,7 +4455,8 @@ as well as in argument passing, function return, throwing an exception\iref{except.throw}, handling an exception\iref{except.handle}, -and aggregate member initialization\iref{dcl.init.aggr}, +and aggregate member initialization other than by a +\grammarterm{designated-initializer-clause}\iref{dcl.init.aggr}, is called \defn{copy-initialization}. \begin{note} @@ -4798,7 +4799,7 @@ the initializer list is a brace-enclosed \grammarterm{designated-initializer-list}, the element is initialized by the -\grammarterm{designated-initializer-list} \tcode{\{ }\placeholder{D}\tcode{ \}}, +\grammarterm{braced-init-list} \tcode{\{ }\placeholder{D}\tcode{ \}}, where \placeholder{D} is the \grammarterm{designated-initializer-clause} naming a member of the anonymous union member. There shall be only one such \grammarterm{designated-initializer-clause}. @@ -4826,6 +4827,11 @@ a narrowing conversion\iref{dcl.init.list} is required to convert the expression, the program is ill-formed. \begin{note} +If the initialization is by \grammarterm{designated-initializer-clause}, +its form determines whether copy-initialization or direct-initialization +is performed. +\end{note} +\begin{note} If an initializer is itself an initializer list, the element is list-initialized, which will result in a recursive application of the rules in this subclause if the element is an aggregate. From 394a01687dccd0df6acb4eda149ac28330315273 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 04:58:12 -0800 Subject: [PATCH 121/257] CWG2620 Nonsensical disambiguation rule --- source/declarations.tex | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index b116c8664a..daad42ede1 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -2323,12 +2323,16 @@ \pnum The ambiguity arising from the similarity between a function-style cast and a declaration mentioned in~\ref{stmt.ambig} can also occur in the context of a declaration. -In that context, the choice is between a function declaration with -a redundant set of parentheses around a parameter name and an object declaration -with a function-style cast as the initializer. +In that context, the choice is between +an object declaration +with a function-style cast as the initializer and +a declaration involving a function declarator +with a redundant set of parentheses around a parameter name. Just as for the ambiguities mentioned in~\ref{stmt.ambig}, -the resolution is to consider any construct that could possibly -be a declaration a declaration. +the resolution is to consider any construct, +such as the potential parameter declaration, +that could possibly be a declaration +to be a declaration. \begin{note} A declaration can be explicitly disambiguated by adding parentheses around the argument. From 2c1f16d7dc82b3f2860eefea7ef26ff531a8059b Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 05:06:33 -0800 Subject: [PATCH 122/257] CWG2622 Compounding types from function and pointer-to-member types --- source/limits.tex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/limits.tex b/source/limits.tex index e3b86f6ca1..b3188315c4 100644 --- a/source/limits.tex +++ b/source/limits.tex @@ -25,10 +25,12 @@ \item% Nesting levels of conditional inclusion\iref{cpp.cond} [256]. \item% -Pointer\iref{dcl.ptr}, array\iref{dcl.array}, and function\iref{dcl.fct} declarators -(in any combination) -modifying a class, arithmetic, -or incomplete type in a declaration [256]. +Pointer\iref{dcl.ptr}, +pointer-to-member\iref{dcl.mptr}, +array\iref{dcl.array}, and +function\iref{dcl.fct} +declarators (in any combination) +modifying a type in a declaration [256]. \item% Nesting levels of parenthesized expressions\iref{expr.prim.paren} within a full-expression [256]. \item% From fb69b327b69ab60f439d4a3ab77482fcf775f077 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 05:15:10 -0800 Subject: [PATCH 123/257] CWG2624 Array delete expression with no array cookie --- source/expressions.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/expressions.tex b/source/expressions.tex index 51c92b040b..cb03c0e6ed 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -5707,7 +5707,8 @@ \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 -a previous array \grammarterm{new-expression}. +a previous array \grammarterm{new-expression} whose +allocation function was not a non-allocating form\iref{new.delete.placement}. \begin{footnote} For nonzero-length arrays, this is the same as a pointer to the first From 3f9de47f33bd56ba770d5027dfba1760c03fa62c Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 05:20:42 -0800 Subject: [PATCH 124/257] CWG2625 Deletion of pointer to out-of-lifetime object --- source/basic.tex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index 467e866851..fc777a9942 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -3431,8 +3431,7 @@ program has undefined behavior if: \begin{itemize} \item - 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}, + the pointer is used as the operand of a \grammarterm{delete-expression}, \item the pointer is used to access a non-static data member or call a non-static member function of the object, or From 68653fc432d180b713e5554df50a62e650fff751 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 07:46:41 -0800 Subject: [PATCH 125/257] CWG2626 Rephrase ones' complement using base-2 representation --- source/expressions.tex | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index cb03c0e6ed..9bcd61562c 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -4672,11 +4672,17 @@ The type of the result is \keyword{bool}. \pnum -\indextext{signed integer representation!ones' complement}% \indextext{operator!ones' complement}% -The operand of \tcode{\~{}} shall have integral or unscoped enumeration type; the -result is the ones' complement of its operand. Integral promotions are -performed. The type of the result is the type of the promoted operand. +The operand of \tcode{\~{}} shall have integral or unscoped enumeration type. +Integral promotions are performed. +The type of the result is the type of the promoted operand. +% FIXME: [basic.fundamental]/p5 uses $x_i$; [expr] uses $\tcode{x}_i$. +Given the coefficients $\tcode{x}_i$ +of the base-2 representation\iref{basic.fundamental} +of the promoted operand \tcode{x}, +the coefficient $\tcode{r}_i$ +of the base-2 representation of the result \tcode{r} +is 1 if $\tcode{x}_i$ is 0, and 0 otherwise. There is an ambiguity in the grammar when \tcode{\~{}} is followed by a \grammarterm{type-name} or \grammarterm{decltype-specifier}. From acd2c815d233559fc8b152d06fd72e811f55f925 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 07:54:42 -0800 Subject: [PATCH 126/257] CWG2627 Bit-fields and narrowing conversions --- source/declarations.tex | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/declarations.tex b/source/declarations.tex index daad42ede1..815f320516 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -5993,8 +5993,18 @@ original type, or \item from an integer type or unscoped enumeration type to an integer type that cannot -represent all the values of the original type, except where the source is a constant +represent all the values of the original type, except where +\begin{itemize} +\item +the source is a bit-field whose width $w$ is less than that of its type +(or, for an enumeration type, its underlying type) and +the target type can represent all the values +of a hypothetical extended integer type +with width $w$ and with the same signedness as the original type or +\item +the source is a constant expression whose value after integral promotions will fit into the target type, or +\end{itemize} \item from a pointer type or a pointer-to-member type to \tcode{bool}. \end{itemize} From f8600b823057bce8271bf14ba110da7ecbce523b Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 08:08:46 -0800 Subject: [PATCH 127/257] CWG2629 Variables of floating-point type as switch conditions --- source/statements.tex | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/statements.tex b/source/statements.tex index a4abdf7d97..2afcf4b8da 100644 --- a/source/statements.tex +++ b/source/statements.tex @@ -100,11 +100,8 @@ declared variable contextually converted to \tcode{bool}\iref{conv}. If that -conversion is ill-formed, the program is ill-formed. The value of a -\grammarterm{condition} that is an initialized declaration in a -\keyword{switch} statement is the value of the declared variable if it has -integral or enumeration type, or of that variable implicitly converted -to integral or enumeration type otherwise. The value of a +conversion is ill-formed, the program is ill-formed. +The value of a \grammarterm{condition} that is an expression is the value of the expression, contextually converted to \tcode{bool} for statements other @@ -412,7 +409,11 @@ several statements depending on the value of a condition. \pnum -The condition shall be of integral type, enumeration type, or class +The value of a \grammarterm{condition} +that is an initialized declaration +is the value of the declared variable, +or the value of the \grammarterm{expression} otherwise. +The value of the condition shall be of integral type, enumeration type, or class type. If of class type, the condition is contextually implicitly converted\iref{conv} to an integral or enumeration type. From 3f33361ddf0547def6d7f4ce17b633fa0381ea0c Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 08:14:34 -0800 Subject: [PATCH 128/257] CWG2630 Syntactic specification of class completeness --- source/classes.tex | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/classes.tex b/source/classes.tex index 2ae9beb2fe..217a837b35 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -605,10 +605,9 @@ \end{note} \pnum -A class is considered a completely-defined object -type\iref{term.incomplete.type} (or complete type) at the closing \tcode{\}} of -the \grammarterm{class-specifier}. -The class is regarded as complete within its complete-class contexts; +A class is regarded as complete +where its definition is reachable and +within its complete-class contexts; otherwise it is regarded as incomplete within its own class \grammarterm{member-specification}. From 568c342a66a784fd94502aef2b5536e2bd68ec55 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 08:25:16 -0800 Subject: [PATCH 129/257] CWG2641 Redundant specification of value category of literals --- source/lex.tex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/lex.tex b/source/lex.tex index df7f34c44a..58bb2034e1 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -1173,6 +1173,10 @@ pointer-literal\br user-defined-literal \end{bnf} +\begin{note} +When appearing as an \grammarterm{expression}, +a literal has a type and a value category\iref{expr.prim.literal}. +\end{note} \rSec2[lex.icon]{Integer literals} @@ -1325,7 +1329,6 @@ the first type in the list in \tref{lex.icon.type} corresponding to its optional \grammarterm{integer-suffix} in which its value can be represented. -An \grammarterm{integer-literal} is a prvalue. \begin{floattable}{Types of \grammarterm{integer-literal}s}{lex.icon.type}{l|l|l} \topline @@ -2160,7 +2163,7 @@ \pnum \indextext{Boolean literal}% The Boolean literals are the keywords \tcode{false} and \tcode{true}. -Such literals are prvalues and have type \tcode{bool}. +Such literals have type \tcode{bool}. \rSec2[lex.nullptr]{Pointer literals} @@ -2171,7 +2174,7 @@ \end{bnf} \pnum -The pointer literal is the keyword \keyword{nullptr}. It is a prvalue of type +The pointer literal is the keyword \keyword{nullptr}. It has type \tcode{std::nullptr_t}. \begin{note} \tcode{std::nullptr_t} is a distinct type that is neither a pointer type nor a pointer-to-member type; From 194fdcd843f70349153358feb40e7b8ea416f563 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 09:07:12 -0800 Subject: [PATCH 130/257] CWG2635 Constrained structured bindings --- source/declarations.tex | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 815f320516..d64354ff0a 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -172,11 +172,19 @@ \pnum A \grammarterm{simple-declaration} with an \grammarterm{identifier-list} is called a \defn{structured binding declaration}\iref{dcl.struct.bind}. -If the \grammarterm{decl-specifier-seq} contains -any \grammarterm{decl-specifier} other than -\keyword{static}, \keyword{thread_local}, \keyword{auto}\iref{dcl.spec.auto}, or -\grammarterm{cv-qualifier}{s}, -the program is ill-formed. +Each \grammarterm{decl-specifier} in the \grammarterm{decl-specifier-seq} +shall be +\tcode{static}, +\tcode{thread_local}, +\tcode{auto}\iref{dcl.spec.auto}, or +a \grammarterm{cv-qualifier}. +\begin{example} +\begin{codeblock} +template concept C = true; +C auto [x, y] = std::pair{1, 2}; // error: constrained \grammarterm{placeholder-type-specifier} + // not permitted for structured bindings +\end{codeblock} +\end{example} The \grammarterm{initializer} shall be of the form ``\tcode{=} \grammarterm{assignment-expression}'', of the form ``\tcode{\{} \grammarterm{assignment-expression} \tcode{\}}'', From 3f97a652dbdb1958561dff3b3ba482fad9b0a7b7 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Thu, 17 Nov 2022 14:54:03 -0800 Subject: [PATCH 131/257] CWG2242 ODR violation with constant initialization possibly omitted Fixes NB US 033 (C++23 CD). --- source/basic.tex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/basic.tex b/source/basic.tex index fc777a9942..43e1d2b8df 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -675,6 +675,11 @@ \item In each such definition, corresponding entities shall have the same language linkage. +\item In each such definition, +const objects with static or thread storage duration +shall be constant-initialized if +the object is constant-initialized in any such definition. + \item In each such definition, the overloaded operators referred to, the implicit calls to conversion functions, constructors, operator new functions and operator delete functions, shall refer to the same From b57af5a52b8b54b785377ac2e20caa784f1dca52 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Thu, 17 Nov 2022 15:26:40 -0800 Subject: [PATCH 132/257] CWG2621 Kind of lookup for using enum declarations Fixes NB CA 054 (C++23 CD). --- source/declarations.tex | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index d64354ff0a..04e689e9bd 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -1356,11 +1356,6 @@ class-key \opt{attribute-specifier-seq} \opt{nested-name-specifier} identifier\br class-key simple-template-id\br class-key nested-name-specifier \opt{\keyword{template}} simple-template-id\br - elaborated-enum-specifier -\end{bnf} - -\begin{bnf} -\nontermdef{elaborated-enum-specifier}\br \keyword{enum} \opt{nested-name-specifier} identifier \end{bnf} @@ -7161,13 +7156,23 @@ \begin{bnf} \nontermdef{using-enum-declaration}\br - \terminal{using} elaborated-enum-specifier \terminal{;} + \keyword{using} \keyword{enum} using-enum-declarator \terminal{;} +\end{bnf} + +\begin{bnf} +\nontermdef{using-enum-declarator}\br + \opt{nested-name-specifier} identifier\br + \opt{nested-name-specifier} simple-template-id \end{bnf} \pnum -The \grammarterm{elaborated-enum-specifier} -shall not name a dependent type -and the type shall have a reachable \grammarterm{enum-specifier}. +A \grammarterm{using-enum-declarator} +names the set of declarations found by +lookup\iref{basic.lookup.unqual,basic.lookup.qual} +for the \grammarterm{using-enum-declarator}. +The \grammarterm{using-enum-declarator} +shall designate a non-dependent type +with a reachable \grammarterm{enum-specifier}. \pnum A \grammarterm{using-enum-declaration} From 47a1382ae664a8275dcdd7be2d61b8bbf0eb9513 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Thu, 17 Nov 2022 17:52:57 -0800 Subject: [PATCH 133/257] CWG2631 Immediate function evaluations in default arguments In [intro.execution], cross-reference term for "unevaluated operand": We have started attaching labels to defined terms, so we can directly refer to the terms instead of just the containing subclause. Fixes NB FR 005 (C++23 CD). --- source/basic.tex | 13 +++++++++++++ source/classes.tex | 5 +++++ source/declarations.tex | 15 ++++++++++++++- source/expressions.tex | 3 +-- source/templates.tex | 12 ++++++++---- 5 files changed, 41 insertions(+), 7 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index 43e1d2b8df..5341ad7f35 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -5585,6 +5585,10 @@ \item The constituent expression of an expression is that expression. \item +The constituent expression of a conversion is +the corresponding implicit function call, if any, or +the converted expression otherwise. +\item The constituent expressions of a \grammarterm{braced-init-list} or of a (possibly parenthesized) \grammarterm{expression-list} are the constituent expressions of the elements of the respective list. @@ -5632,6 +5636,15 @@ Expressions appearing in the \grammarterm{compound-statement} of a \grammarterm{lambda-expression} are not subexpressions of the \grammarterm{lambda-expression}. \end{note} +The \defnadjx{potentially-evaluated}{subexpressions}{subexpression} of +an expression, conversion, or \grammarterm{initializer} $E$ are +\begin{itemize} +\item +the constituent expressions of $E$ and +\item +the subexpressions thereof that +are not subexpressions of a nested unevaluated operand\iref{term.unevaluated.operand}. +\end{itemize} \pnum A \defn{full-expression} is diff --git a/source/classes.tex b/source/classes.tex index 217a837b35..fc2c3e7f6b 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -659,6 +659,11 @@ shall not directly or indirectly cause the implicit definition of a defaulted default constructor for the enclosing class or the exception specification of that constructor. +An immediate invocation\iref{expr.const} that +is a potentially-evaluated subexpression\iref{intro.execution} +of a default member initializer +is neither evaluated nor checked for whether it +is a constant expression at the point where the subexpression appears. \pnum A member shall not be declared with the \keyword{extern} diff --git a/source/declarations.tex b/source/declarations.tex index 04e689e9bd..c841b5e93b 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -4004,7 +4004,12 @@ copy-initialization semantics\iref{dcl.init}. The names in the default argument are looked up, and the semantic constraints are checked, -at the point where the default argument appears. +at the point where the default argument appears, except that +an immediate invocation\iref{expr.const} that +is a potentially-evaluated subexpression\iref{intro.execution} of +the \grammarterm{initializer-clause} in a \grammarterm{parameter-declaration} is +neither evaluated +nor checked for whether it is a constant expression at that point. Name lookup and checking of semantic constraints for default arguments of templated functions are performed as described in~\ref{temp.inst}. \begin{example} @@ -4684,6 +4689,14 @@ \end{note} \end{itemize} +\pnum +An immediate invocation\iref{expr.const} that is not evaluated where +it appears\iref{dcl.fct.default,class.mem.general} +is evaluated and checked for whether it is +a constant expression at the point where +the enclosing \grammarterm{initializer} is used in +a function call, a constructor definition, or an aggregate initialization. + \pnum An \grammarterm{initializer-clause} followed by an ellipsis is a pack expansion\iref{temp.variadic}. diff --git a/source/expressions.tex b/source/expressions.tex index 9bcd61562c..743364c3d4 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -7923,8 +7923,7 @@ or \item -a subexpression of one of the above -that is not a subexpression of a nested unevaluated operand\iref{term.unevaluated.operand}. +a potentially-evaluated subexpression\iref{intro.execution} of one of the above. \end{itemize} \indextext{function!needed for constant evaluation}% diff --git a/source/templates.tex b/source/templates.tex index 558f975f60..d9ff147dbc 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -5978,13 +5978,17 @@ It is unspecified whether or not an implementation implicitly instantiates a virtual member function of a class template if the virtual member function would not otherwise be instantiated. -The use of a template specialization in a default argument -shall not cause the template to be implicitly instantiated except that a -class template may be instantiated where its complete type is needed to determine -the correctness of the default argument. +The use of a template specialization in +a default argument or default member initializer +shall not cause the template to be implicitly instantiated except +where needed to determine +the correctness of the default argument or default member initializer. The use of a default argument in a function call causes specializations in the default argument to be implicitly instantiated. +Similarly, the use of a default member initializer +in a constructor definition or an aggregate initialization +causes specializations in the default member initializer to be instantiated. \pnum If a function template From 7b81bde3b05502a4d27fe1914ffa59e14709c469 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Thu, 17 Nov 2022 21:07:09 -0800 Subject: [PATCH 134/257] CWG2636 Update Annex E based on Unicode 15.0 UAX #31 Fixes NB US 132 (C++23 CD). --- source/uax31.tex | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/uax31.tex b/source/uax31.tex index 64f4b873b7..d39674c374 100644 --- a/source/uax31.tex +++ b/source/uax31.tex @@ -85,14 +85,13 @@ \rSec1[uaxid.pattern]{R3 Pattern_White_Space and Pattern_Syntax characters} \pnum -UAX \#31 describes how languages that use or interpret patterns of characters, -such as regular expressions or number formats, -may describe that syntax with Unicode properties. +UAX \#31 describes how formal languages +such as computer languages should describe and implement +their use of whitespace and syntactically significant characters +during the processes of lexing and parsing. \pnum -\Cpp{} does not do this as part of the language, -deferring to library components for such usage of patterns. -This requirement does not apply to \Cpp{}. +\Cpp{} does not claim conformance with this requirement. \rSec1[uaxid.eqn]{R4 Equivalent normalized identifiers} From 7ba74b89a82a884817ac93d06acf8718de0a37e3 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Thu, 17 Nov 2022 21:28:06 -0800 Subject: [PATCH 135/257] CWG2643 Completing a pointer to array of unknown bound Fixes NB US 039 (C++23 CD). --- source/basic.tex | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index 5341ad7f35..05a74fd816 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -4666,9 +4666,14 @@ can be an array of unknown bound and therefore be incomplete at one point in a translation unit and complete later on; the array types at those two points (``array of unknown bound of \tcode{T}'' and ``array of -\tcode{N} \tcode{T}'') are different types. The type of a pointer to array of -unknown bound, or of a type defined by a \keyword{typedef} declaration to -be an array of unknown bound, cannot be completed. +\tcode{N} \tcode{T}'') are different types. +\begin{note} +The type of a pointer or reference to array of unknown bound +permanently points to or refers to an incomplete type. +An array of unknown bound named by a \keyword{typedef} declaration +permanently refers to an incomplete type. +In either case, the array type cannot be completed. +\end{note} \begin{example} \indextext{type!example of incomplete}% \begin{codeblock} From 5bd8319d8f07bb8aab2b46288916d3a70d16a257 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Thu, 17 Nov 2022 21:42:32 -0800 Subject: [PATCH 136/257] CWG2644 Incorrect comment in example Fixes NB US 042 (C++23 CD). --- source/expressions.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/expressions.tex b/source/expressions.tex index 743364c3d4..de264d331a 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -2358,7 +2358,7 @@ return x+2; }(); // Updates \tcode{::x} to 6, and initializes \tcode{y} to 7. -auto z = [a = 42](int a) { return 1; }; // error: parameter and local variable have the same name +auto z = [a = 42](int a) { return 1; }; // error: parameter and conceptual local variable have the same name auto counter = [i=0]() mutable -> decltype(i) { // OK, returns \tcode{int} return i++; }; From 4631d28728aaa117912180da30eff85da632cd91 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Thu, 17 Nov 2022 23:00:54 -0800 Subject: [PATCH 137/257] CWG2645 Unused term "default argument promotions" [cstdarg.syn] Employ bullets to separate the different conceptual areas of differences from ISO C. Fixes NB US 044 (C++23 CD). --- source/support.tex | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/support.tex b/source/support.tex index da003c4df7..3cba171dd8 100644 --- a/source/support.tex +++ b/source/support.tex @@ -5783,6 +5783,11 @@ \pnum The contents of the header \libheaderdef{cstdarg} are the same as the C standard library header \libheader{stdarg.h}, with the following changes: +\begin{itemize} +\item +In lieu of the default argument promotions specified in ISO C 6.5.2.2, +the definition in~\ref{expr.call} applies. +\item The restrictions that ISO C places on the second parameter to the \indexlibraryglobal{va_start}% \tcode{va_start} macro in header \libheader{stdarg.h} @@ -5808,6 +5813,7 @@ is of a reference type, or of a type that is not compatible with the type that results when passing an argument for which there is no parameter, the behavior is undefined. +\end{itemize} \xrefc{7.16.1.1} From ef668df7dd2cc3570c9ff1ba05fb4191ea553813 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 07:41:29 -0800 Subject: [PATCH 138/257] CWG2646 Defaulted special member functions Fixes NB US 052 (C++23 CD). --- source/declarations.tex | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index c841b5e93b..467c76ef8a 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -6200,35 +6200,33 @@ \pnum An explicitly defaulted special member function $\tcode{F}_1$ -with type $\tcode{T}_1$ is allowed to differ from the corresponding special member function $\tcode{F}_2$ -with type $\tcode{T}_2$ that would have been implicitly declared, as follows: \begin{itemize} \item - $\tcode{T}_1$ and $\tcode{T}_2$ may have differing \grammarterm{ref-qualifier}{s}; + $\tcode{F}_1$ and $\tcode{F}_2$ may have differing \grammarterm{ref-qualifier}{s}; \item if $\tcode{F}_2$ has an implicit object parameter of type ``reference to \tcode{C}'', $\tcode{F}_1$ may be an explicit object member function whose explicit object parameter is of type ``reference to \tcode{C}'', - in which case $\tcode{T}_1$ would differ from $\tcode{T}_2$ - in that $\tcode{T}_1$ has an additional parameter; + in which case the type of $\tcode{F}_1$ would differ from the type of $\tcode{F}_2$ + in that the type of $\tcode{F}_1$ has an additional parameter; \item - $\tcode{T}_1$ and $\tcode{T}_2$ may have differing exception specifications; and + $\tcode{F}_1$ and $\tcode{F}_2$ may have differing exception specifications; and \item if $\tcode{F}_2$ has a non-object parameter of type \tcode{const C\&}, the corresponding non-object parameter of $\tcode{F}_1$ may be of type \tcode{C\&}. \end{itemize} -If $\tcode{T}_1$ differs from $\tcode{T}_2$ in a way +If the type of $\tcode{F}_1$ differs from the type of $\tcode{F}_2$ in a way other than as allowed by the preceding rules, then: \begin{itemize} \item if $\tcode{F}_1$ is an assignment operator, and - the return type of $\tcode{T}_1$ differs from - the return type of $\tcode{T}_2$ or + the return type of $\tcode{F}_1$ differs from + the return type of $\tcode{F}_2$ or $\tcode{F}_1${'s} non-object parameter type is not a reference, the program is ill-formed; \item From d7c37a0d3a1de325447a5ff8f8874a32abd1fd4e Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 07:47:56 -0800 Subject: [PATCH 139/257] CWG2647 Fix for "needed for constant evaluation" Fixes NB US 047 (C++23 CD). --- source/expressions.tex | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index de264d331a..e00d3755ff 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -7326,7 +7326,7 @@ \pnum A variable is \defn{potentially-constant} if it is constexpr or -it has reference or const-qualified integral or enumeration type. +it has reference or non-volatile const-qualified integral or enumeration type. \pnum A constant-initialized potentially-constant variable $V$ is @@ -7937,9 +7937,7 @@ that is potentially constant evaluated, or \item -a variable named by a potentially constant evaluated expression -that is either a constexpr variable or -is of non-volatile const-qualified integral type or of reference type. +a potentially-constant variable named by a potentially constant evaluated expression. \end{itemize} \indextext{expression|)} From 0118297cffc82552ac93af3e89156897dfdf2841 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 07:54:20 -0800 Subject: [PATCH 140/257] CWG2648 Correspondence of surrogate call function and conversion function Fixes NB CA 063 (C++23 CD). --- source/overloading.tex | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/overloading.tex b/source/overloading.tex index 741c11e8c3..0c123a5dbf 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -3418,11 +3418,12 @@ where the \grammarterm{postfix-expression} is of class type, the operator function is selected by overload resolution\iref{over.call.object}. -If a surrogate call function for a conversion function -named \keyword{operator} \grammarterm{conversion-type-id} is selected, +If a surrogate call function is selected, +let $e$ be the result of invoking the corresponding conversion operator function on the \grammarterm{postfix-expression}; + the expression is interpreted as \begin{ncsimplebnf} -postfix-expression \terminal{.} \keyword{operator} conversion-type-id \terminal{(}\terminal{)} \terminal{(} \opt{expression-list} \terminal{)} +$e$ \terminal{(} \opt{expression-list} \terminal{)} \end{ncsimplebnf} Otherwise, the expression is interpreted as \begin{ncsimplebnf} From 2cfab654f83de3003d5fbc082bef34e9be9c6792 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 07:57:07 -0800 Subject: [PATCH 141/257] CWG2649 Incorrect note about implicit conversion sequence Fixes NB CA 064 (C++23 CD). --- source/overloading.tex | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source/overloading.tex b/source/overloading.tex index 0c123a5dbf..9524ab5a0f 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -579,12 +579,6 @@ When comparing the call against a surrogate call function, the implied object argument is compared against the first parameter of the surrogate call function. -The -conversion function from which the surrogate call function was -derived will be used in the conversion sequence for that -parameter since it converts the implied object argument to the -appropriate function pointer or reference required by that first -parameter. \end{note} \begin{example} \begin{codeblock} From 30a9b4e36a18cf7afdd4467d0264b5aa6ef4045e Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 08:10:09 -0800 Subject: [PATCH 142/257] CWG2650 Incorrect example for ill-formed non-type template arguments The change from "struct" to "class" is accidentally missing from the paper P2710R0, but it was intended as part of the issue resolution, as confirmed by CWG. Fixes NB US 068 (C++23 CD). --- source/templates.tex | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/templates.tex b/source/templates.tex index d9ff147dbc..523468aa85 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -7329,9 +7329,11 @@ \begin{example} \begin{codeblock} template struct S {}; -template int f(S*); -struct X {}; -int i0 = f(0); +template int f(S*); // \#1 +class X { + int m; +}; +int i0 = f(0); // \#1 uses a value of non-structural type \tcode{X} as a non-type template argument \end{codeblock} \end{example} From f9799b6e098fa6b0f3c80abbc5bb638ed656d66a Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 08:16:07 -0800 Subject: [PATCH 143/257] CWG2651 Conversion function templates and "noexcept" Fixes NB US 069 (C++23 CD). --- source/templates.tex | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/templates.tex b/source/templates.tex index 523468aa85..38c5aac700 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -7721,7 +7721,7 @@ (call it \tcode{A}) as described in~\ref{temp.deduct.type}. If the \grammarterm{conversion-function-id} is constructed during overload resolution\iref{over.match.funcs}, -the following transformations apply. +the rules in the remainder of this subclause apply. \pnum If \tcode{P} is a reference type, the type referred to by \tcode{P} is used in place @@ -7786,8 +7786,9 @@ (i.e., the type referred to by the reference). \item If the original \tcode{A} is -a function pointer or pointer-to-member-function type, -its \keyword{noexcept}. +a function pointer or pointer-to-member-function type +with a potentially-throwing exception specification\iref{except.spec}, +the exception specification. \item Any cv-qualifiers in \tcode{A} that can be restored by a qualification conversion. From 82c4158bd006ddc831e54a5a2f50e2b62c516384 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 08:28:03 -0800 Subject: [PATCH 144/257] CWG2615 Missing __has_cpp_attribute(assume) Fixes NB GB 070 (C++23 CD). --- source/preprocessor.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/preprocessor.tex b/source/preprocessor.tex index 8ac266b714..bc2da66ce9 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -390,6 +390,7 @@ {ll} \topline \lhdr{Attribute} & \rhdr{Value} \\ \rowsep +\tcode{assume} & \tcode{202207L} \\ \tcode{carries_dependency} & \tcode{200809L} \\ \tcode{deprecated} & \tcode{201309L} \\ \tcode{fallthrough} & \tcode{201603L} \\ From 027ad84318680a729954b0c6e9cbd6c4ae0c74ce Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 08:41:49 -0800 Subject: [PATCH 145/257] CWG2639 new-lines after phase 1 Fixes NB US 030 (C++23 CD). --- source/lex.tex | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/lex.tex b/source/lex.tex index 58bb2034e1..581db8e2c6 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -82,12 +82,18 @@ then it shall be a well-formed UTF-8 code unit sequence and it is decoded to produce a sequence of UCS scalar values that constitutes the sequence of elements of the translation character set. +In the resulting sequence, +each pair of characters in the input sequence consisting of +\unicode{000d}{carriage return} followed by \unicode{000a}{line feed}, +as well as each +\unicode{000d}{carriage return} not immediately followed by a \unicode{000a}{line feed}, +is replaced by a single new-line character. For any other kind of input file supported by the implementation, characters are mapped, in an \impldef{mapping physical source file characters to translation character set} manner, -to a sequence of translation character set elements\iref{lex.charset} -(introducing new-line characters for end-of-line indicators). +to a sequence of translation character set elements\iref{lex.charset}, +representing end-of-line indicators as new-line characters. \item \indextext{line splicing}% From 10b117e74adca67cea6aff6e5b50fdcd79638138 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 08:48:59 -0800 Subject: [PATCH 146/257] CWG2640 Allow more characters in an n-char sequence Fixes NB US 028 (C++23 CD). --- source/lex.tex | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/lex.tex b/source/lex.tex index 581db8e2c6..668928caab 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -314,10 +314,7 @@ \begin{bnf} \nontermdef{n-char} \textnormal{one of}\br - \terminal{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}\br - \terminal{0 1 2 3 4 5 6 7 8 9}\br - \textnormal{\unicode{002d}{hyphen-minus}}\br - \textnormal{\unicode{0020}{space}} + \textnormal{any member of the translation character set except the \unicode{007d}{right curly bracket} or new-line character} \end{bnf} \begin{bnf} From 255d8d1e998e6faeeecd68c5e281a0866d19ad76 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 08:54:01 -0800 Subject: [PATCH 147/257] CWG2652 Overbroad definition of __STDCPP_BFLOAT16_T__ Fixes NB US 071 (C++23 CD). --- source/preprocessor.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/preprocessor.tex b/source/preprocessor.tex index bc2da66ce9..86aca96c45 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -1766,7 +1766,8 @@ \mname{STDCPP_BFLOAT16_T}\\ Defined as the integer literal \tcode{1} if and only if the implementation supports an extended floating-point type -with the properties described in \ref{basic.extended.fp}. +with the properties of the \grammarterm{typedef-name} \tcode{std::bfloat16_t} +as described in \ref{basic.extended.fp}. \item \indextext{__time__@\mname{TIME}}% From 00b90f3a7f4321ff6b32192e3c54fdd7166a6a8e Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 08:56:43 -0800 Subject: [PATCH 148/257] CWG2653 Can an explicit object parameter have a default argument? Fixes NB GB 051 (C++23 CD). --- source/declarations.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 467c76ef8a..d2095d0314 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -3387,9 +3387,9 @@ \begin{bnf} \nontermdef{parameter-declaration}\br \opt{attribute-specifier-seq} \opt{\keyword{this}} decl-specifier-seq declarator\br - \opt{attribute-specifier-seq} \opt{\keyword{this}} decl-specifier-seq declarator \terminal{=} initializer-clause\br + \opt{attribute-specifier-seq} decl-specifier-seq declarator \terminal{=} initializer-clause\br \opt{attribute-specifier-seq} \opt{\keyword{this}} decl-specifier-seq \opt{abstract-declarator}\br - \opt{attribute-specifier-seq} \opt{\keyword{this}} decl-specifier-seq \opt{abstract-declarator} \terminal{=} initializer-clause + \opt{attribute-specifier-seq} decl-specifier-seq \opt{abstract-declarator} \terminal{=} initializer-clause \end{bnf} The optional \grammarterm{attribute-specifier-seq} in a \grammarterm{parameter-declaration} From 079156df2435befdc895339b1b97330ae3fa6574 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 09:04:48 -0800 Subject: [PATCH 149/257] CWG2654 Un-deprecation of compound volatile assignments Fixes NB US 045 (C++23 CD). --- source/expressions.tex | 7 +++---- source/future.tex | 4 +--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index e00d3755ff..f15aad3108 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -7191,10 +7191,9 @@ The behavior of an expression of the form \tcode{E1 \placeholder{op}= E2} is equivalent to \tcode{E1 = E1 \placeholder{op} E2} except that \tcode{E1} is evaluated only once. -Such expressions are deprecated -if \tcode{E1} has volatile-qualified type -and \placeholder{op} is not one of the bitwise operators -\tcode{|}, \tcode{\&}, \tcode{\caret}; see~\ref{depr.volatile.type}. +\begin{note} +The object designated by \tcode{E1} is accessed twice. +\end{note} For \tcode{+=} and \tcode{-=}, \tcode{E1} shall either have arithmetic type or be a pointer to a possibly cv-qualified completely-defined object type. In all other diff --git a/source/future.tex b/source/future.tex index 093dba383e..a674ec7901 100644 --- a/source/future.tex +++ b/source/future.tex @@ -104,9 +104,7 @@ brachiosaur = neck; // OK tail = brachiosaur; // OK tail = brachiosaur = neck; // deprecated -brachiosaur += neck; // deprecated -brachiosaur = brachiosaur + neck; // OK -brachiosaur |= neck; // OK, bitwise compound expression +brachiosaur += neck; // OK \end{codeblock} \end{example} From dbe1a03e82eb42be8360bad127d4da7f51b25372 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 09:21:45 -0800 Subject: [PATCH 150/257] CWG2538 Can standard attributes be syntactically ignored? [dcl.attr.grammar] Replace "may" with "can" inside note. Fixes NB GB 055 (C++23 CD). --- source/declarations.tex | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index d2095d0314..82d75e4b8e 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -8483,9 +8483,15 @@ For an \grammarterm{attribute-token} (including an \grammarterm{attribute-scoped-token}) not specified in this document, the -behavior is \impldef{behavior of non-standard attributes}. -Any \grammarterm{attribute-token} that is not recognized by the implementation +behavior is \impldef{behavior of non-standard attributes}; +any such \grammarterm{attribute-token} that is not recognized by the implementation is ignored. +\begin{note} +A program is ill-formed if it contains an \grammarterm{attribute} +specified in \ref{dcl.attr} that violates +the rules specifying to which entity or statement the attribute can apply or +the syntax rules for the attribute's \grammarterm{attribute-argument-clause}, if any. +\end{note} An \grammarterm{attribute-token} is reserved for future standardization if \begin{itemize} \item it is not an \grammarterm{attribute-scoped-token} and From ffcf9b7138c53b2c42b1cab9a8a10b5c9750e3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 15 Nov 2022 06:30:29 +0000 Subject: [PATCH 151/257] P2589R1 static operator[] Fixes NB CA 065 (C++23 CD). --- source/overloading.tex | 4 ++-- source/preprocessor.tex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/overloading.tex b/source/overloading.tex index 9524ab5a0f..ec0d55b2fc 100644 --- a/source/overloading.tex +++ b/source/overloading.tex @@ -3430,8 +3430,8 @@ \pnum A \defnadj{subscripting}{operator function} -is a function named \tcode{\keyword{operator}[]} -that is a non-static member function with an arbitrary number of parameters. +is a member function named \tcode{\keyword{operator}[]} +with an arbitrary number of parameters. It may have default arguments. For an expression of the form \begin{ncsimplebnf} diff --git a/source/preprocessor.tex b/source/preprocessor.tex index 86aca96c45..3b1b63d8ba 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -1829,7 +1829,7 @@ \defnxname{cpp_inline_variables} & \tcode{201606L} \\ \rowsep \defnxname{cpp_lambdas} & \tcode{200907L} \\ \rowsep \defnxname{cpp_modules} & \tcode{201907L} \\ \rowsep -\defnxname{cpp_multidimensional_subscript} & \tcode{202110L} \\ \rowsep +\defnxname{cpp_multidimensional_subscript} & \tcode{202211L} \\ \rowsep \defnxname{cpp_named_character_escapes} & \tcode{202207L} \\ \rowsep \defnxname{cpp_namespace_attributes} & \tcode{201411L} \\ \rowsep \defnxname{cpp_noexcept_function_type} & \tcode{201510L} \\ \rowsep From 2e92639f0b6dd14b82afbe5e84fa5f61cb8106c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 15 Nov 2022 17:56:42 +0000 Subject: [PATCH 152/257] P2647R1 Permitting static constexpr variables in constexpr functions Fixes NB GB 048 (C++23 CD). --- source/expressions.tex | 13 ++++++++++++- source/preprocessor.tex | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index f15aad3108..2c4e9146be 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -7367,7 +7367,18 @@ a control flow that passes through a declaration of a variable with static\iref{basic.stc.static} or -thread\iref{basic.stc.thread} storage duration; +thread\iref{basic.stc.thread} storage duration, +unless that variable is usable in constant expressions; +\begin{example} +\begin{codeblock} +constexpr char test() { + static const int x = 5; + static constexpr char c[] = "Hello World"; + return *(c + x); +} +static_assert(' ' == test()); +\end{codeblock} +\end{example} \item an invocation of a non-constexpr function; diff --git a/source/preprocessor.tex b/source/preprocessor.tex index 3b1b63d8ba..afc486ab87 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -1801,7 +1801,7 @@ \defnxname{cpp_char8_t} & \tcode{202207L} \\ \rowsep \defnxname{cpp_concepts} & \tcode{202002L} \\ \rowsep \defnxname{cpp_conditional_explicit} & \tcode{201806L} \\ \rowsep -\defnxname{cpp_constexpr} & \tcode{202207L} \\ \rowsep +\defnxname{cpp_constexpr} & \tcode{202211L} \\ \rowsep \defnxname{cpp_constexpr_dynamic_alloc} & \tcode{201907L} \\ \rowsep \defnxname{cpp_constexpr_in_decltype} & \tcode{201711L} \\ \rowsep \defnxname{cpp_consteval} & \tcode{201811L} \\ \rowsep From 52e0381c71763be151fdb1d27bf15752458a22f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 16 Nov 2022 05:45:12 +0000 Subject: [PATCH 153/257] P2564R3 consteval needs to propagate up Minor editorial changes: * omitted colons before sentence-lists * marked "constexpr" and "consteval" specifiers up as keywords * use "class", not "typename", in templates in the example Fixes NB DE 046 (C++23 CD). --- source/declarations.tex | 4 +- source/expressions.tex | 121 ++++++++++++++++++++++++++++++++++++---- source/preprocessor.tex | 2 +- 3 files changed, 114 insertions(+), 13 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 82d75e4b8e..1aa423ac7c 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -767,8 +767,10 @@ used in the declaration of a function declares that function to be a \defnx{constexpr function}{specifier!\idxcode{constexpr}!function}. +\begin{note} A function or constructor declared with the \keyword{consteval} specifier -is called an \defnadj{immediate}{function}. +is an immediate function\iref{expr.const}. +\end{note} A destructor, an allocation function, or a deallocation function shall not be declared with the \keyword{consteval} specifier. diff --git a/source/expressions.tex b/source/expressions.tex index 2c4e9146be..ed3d56eda8 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -1372,15 +1372,6 @@ \end{example} \end{itemize} -\pnum -A potentially-evaluated \grammarterm{id-expression} -that denotes an immediate function\iref{dcl.constexpr} -shall appear only -\begin{itemize} -\item as a subexpression of an immediate invocation, or -\item in an immediate function context\iref{expr.const}. -\end{itemize} - \pnum For an \grammarterm{id-expression} that denotes an overload set, overload resolution is performed @@ -7853,7 +7844,10 @@ \begin{itemize} \item its innermost enclosing non-block scope is -a function parameter scope of an immediate function, or +a function parameter scope of an immediate function, +\item +it is a subexpression of a manifestly constant-evaluated expression +or conversion, or \item its enclosing statement is enclosed\iref{stmt.pre} by the \grammarterm{compound-statement} of a consteval if statement\iref{stmt.if}. @@ -7862,7 +7856,112 @@ if it is a potentially-evaluated explicit or implicit invocation of an immediate function and is not in an immediate function context. -An immediate invocation shall be a constant expression. +An aggregate initialization is an immediate invocation +if it evaluates a default member initializer +that has a subexpression that is an immediate-escalating expression. + +\pnum +\indexdefn{expression!immediate-escalating}% +\indexdefn{conversion!immediate-escalating}% +\indexdefn{immediate-escalating!expression|see{expression, immediate-escalating}}% +\indexdefn{immediate-escalating!conversion|see{conversion, immediate-escalating}}% +An expression or conversion is \defn{immediate-escalating} +if it is not initially in an immediate function context +and it is either +\begin{itemize} +\item +a potentially-evaluated \grammarterm{id-expression} +that denotes an immediate function +that is not a subexpression of an immediate invocation, or +\item +an immediate invocation that is not a constant expression +and is not a subexpression of an immediate invocation. +\end{itemize} + +\pnum +\indexdefn{immediate-escalating!function|see{function, immediate-escalating}}% +An \defnx{immediate-escalating}{function!immediate-escalating} function is +\begin{itemize} +\item +the call operator of a lambda that is not declared +with the \keyword{consteval} specifier, +\item +a defaulted special member function +that is not declared with the \keyword{consteval} specifier, or +\item +a function that results from the instantiation +of a templated entity defined with the \keyword{constexpr} specifier. +\end{itemize} +An immediate-escalating expression shall appear only +in an immediate-escalating function. + +\pnum +An \defnadj{immediate}{function} is a function or constructor that is +\begin{itemize} +\item +declared with the \keyword{consteval} specifier, or +\item +an immediate-escalating function \tcode{\placeholder{F}} +whose function body contains an immediate-escalating expression \tcode{\placeholder{E}} +such that \tcode{\placeholder{E}}'s innermost enclosing non-block scope +is \tcode{\placeholder{F}}'s function parameter scope. +\end{itemize} +\begin{example} +\begin{codeblock} +consteval int id(int i) { return i; } +constexpr char id(char c) { return c; } + +template +constexpr int f(T t) { + return t + id(t); +} + +auto a = &f; // OK, \tcode{f} is not an immediate function +auto b = &f; // error: \tcode{f} is an immediate function + +static_assert(f(3) == 6); // OK + +template +constexpr int g(T t) { // \tcode{g} is not an immediate function + return t + id(42); // because \tcode{id(42)} is already a constant +} + +template +constexpr bool is_not(T t, F f) { + return not f(t); +} + +consteval bool is_even(int i) { return i % 2 == 0; } + +static_assert(is_not(5, is_even)); // OK + +int x = 0; + +template +constexpr T h(T t = id(x)) { // \tcode{h} is not an immediate function + return t; +} + +template +constexpr T hh() { // \tcode{hh} is an immediate function + return h(); +} + +int i = hh(); // error: ill-formed, \tcode{hh()} is an immediate-escalating expression + // outside of an immediate-escalating function + +struct A { + int x; + int y = id(x); +}; + +template +constexpr int k(int) { // \tcode{k} is not an immediate function because \tcode{A(42)} is a + return A(42).y; // constant expression and thus not immediate-escalating +} +\end{codeblock} +\end{example} + \pnum An expression or conversion is \defn{manifestly constant-evaluated} diff --git a/source/preprocessor.tex b/source/preprocessor.tex index afc486ab87..d01c69babf 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -1804,7 +1804,7 @@ \defnxname{cpp_constexpr} & \tcode{202211L} \\ \rowsep \defnxname{cpp_constexpr_dynamic_alloc} & \tcode{201907L} \\ \rowsep \defnxname{cpp_constexpr_in_decltype} & \tcode{201711L} \\ \rowsep -\defnxname{cpp_consteval} & \tcode{201811L} \\ \rowsep +\defnxname{cpp_consteval} & \tcode{202211L} \\ \rowsep \defnxname{cpp_constinit} & \tcode{201907L} \\ \rowsep \defnxname{cpp_decltype} & \tcode{200707L} \\ \rowsep \defnxname{cpp_decltype_auto} & \tcode{201304L} \\ \rowsep From 7af27afd592a9fffac1fb2cc3521daf6c5f0257f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 16 Nov 2022 06:45:14 +0000 Subject: [PATCH 154/257] P2706R0 Redundant specification for defaulted functions Fixes NB US 061 (C++23 CD). --- source/classes.tex | 52 ++++------------------------------------- source/declarations.tex | 8 +++++-- 2 files changed, 11 insertions(+), 49 deletions(-) diff --git a/source/classes.tex b/source/classes.tex index fc2c3e7f6b..e13097d465 100644 --- a/source/classes.tex +++ b/source/classes.tex @@ -1040,8 +1040,7 @@ The implementation will implicitly declare these member functions for some class types when the program does not explicitly declare them. The implementation will implicitly define them -if they are odr-used\iref{term.odr.use} or -needed for constant evaluation\iref{expr.const}. +as needed\iref{dcl.fct.def.default}. \end{note} An implicitly-declared special member function is declared at the closing \tcode{\}} of the \grammarterm{class-specifier}. @@ -1303,15 +1302,7 @@ \defnx{non-trivial}{constructor!default!non-trivial}. \pnum -A default constructor -that is defaulted and not defined as deleted -is -\defnx{implicitly defined}{constructor!implicitly defined} -when it is odr-used\iref{term.odr.use} -to initialize an object of its class type\iref{intro.object}, -when it is needed for constant evaluation\iref{expr.const}, or -when it is explicitly defaulted after its first declaration. -The implicitly-defined default constructor performs the set of +An implicitly-defined\iref{dcl.fct.def.default} default constructor performs the set of initializations of the class that would be performed by a user-written default constructor for that class with no \grammarterm{ctor-initializer}\iref{class.base.init} and an empty @@ -1602,20 +1593,11 @@ \defnx{non-trivial}{constructor!copy!nontrivial}. \pnum -\indextext{constructor!copy!implicitly defined}% -\indextext{constructor!move!implicitly defined}% -A copy/move constructor -that is defaulted and not defined as deleted -is -\term{implicitly defined} -when it is odr-used\iref{term.odr.use}, -when it is needed for constant evaluation\iref{expr.const}, or -when it is explicitly defaulted after its first declaration. \begin{note} The copy/move constructor is implicitly defined even if the implementation elided its odr-use\iref{term.odr.use,class.temporary}. \end{note} -If the implicitly-defined constructor would satisfy the requirements of a +If an implicitly-defined\iref{dcl.fct.def.default} constructor would satisfy the requirements of a constexpr function\iref{dcl.constexpr}, the implicitly-defined constructor is \keyword{constexpr}. @@ -1905,18 +1887,7 @@ \defnx{non-trivial}{assignment operator!copy!non-trivial}. \pnum -\indextext{assignment operator!copy!implicitly defined}% -\indextext{assignment operator!move!implicitly defined}% -A copy/move assignment operator for a class \tcode{X} -that is defaulted and not defined as deleted -is -\term{implicitly defined} -when it is odr-used\iref{term.odr.use} -(e.g., when it is selected by overload resolution -to assign to an object of its class type), -when it is needed for constant evaluation\iref{expr.const}, or -when it is explicitly defaulted after its first declaration. -The implicitly-defined copy/move assignment operator is \keyword{constexpr}. +An implicitly-defined\iref{dcl.fct.def.default} copy/move assignment operator is \keyword{constexpr}. \pnum Before the defaulted copy/move assignment operator for a class is @@ -2126,14 +2097,6 @@ A defaulted destructor is a constexpr destructor if it satisfies the requirements for a constexpr function\iref{dcl.constexpr}. -\pnum -A destructor -that is defaulted and not defined as deleted -is -\defnx{implicitly defined}{destructor!implicitly defined} -when it is odr-used\iref{term.odr.use} -or when it is explicitly defaulted after its first declaration. - \pnum Before a defaulted destructor for a class is implicitly defined, all the non-user-provided @@ -6435,12 +6398,7 @@ where the implicit object parameter (if any) is considered to be the first parameter. \end{itemize} -A comparison operator function for class \tcode{C} that -is defaulted on its first declaration and -is not defined as deleted is -\defnx{implicitly defined}{operator!comparison!implicitly defined} -when it is odr-used or needed for constant evaluation. -Name lookups in the defaulted definition +Name lookups in the implicit definition\iref{dcl.fct.def.default} of a comparison operator function are performed from a context equivalent to its \grammarterm{function-body}. diff --git a/source/declarations.tex b/source/declarations.tex index 1aa423ac7c..b89dd84b04 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -6275,7 +6275,7 @@ Explicitly-defaulted functions and implicitly-declared functions are collectively called \defn{defaulted} functions, and the implementation shall provide implicit definitions -for them\iref{class.ctor,class.dtor,class.copy.ctor,class.copy.assign}, +for them\iref{class.ctor,class.dtor,class.copy.ctor,class.copy.assign} as described below, including possibly defining them as deleted. A defaulted prospective destructor\iref{class.dtor} that is not a destructor is defined as deleted. @@ -6287,8 +6287,12 @@ \defn{user-provided} if it is user-declared and not explicitly defaulted or deleted on its first declaration. A user-provided explicitly-defaulted function (i.e., explicitly defaulted after its first declaration) -is defined at the point where it is explicitly defaulted; if such a function is implicitly +is implicitly defined at the point where it is explicitly defaulted; if such a function is implicitly defined as deleted, the program is ill-formed. +A non-user-provided defaulted function +(i.e. implicitly declared or explicitly defaulted in the class) +that is not defined as deleted is implicitly defined when it is odr-used\iref{basic.def.odr} +or needed for constant evaluation\iref{expr.const}. \begin{note} Declaring a function as defaulted after its first declaration can provide efficient execution and concise From f3ffeb4f05fe4302d8ecee129e72f4e99e10dc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 16 Nov 2022 07:11:43 +0000 Subject: [PATCH 155/257] P2615R1 Meaningful exports Fixes NB GB 059 (C++23 CD). --- source/basic.tex | 6 +----- source/declarations.tex | 21 ++++++++++++++------- source/modules.tex | 20 ++++++++------------ source/templates.tex | 2 ++ 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index 05a74fd816..4fd0641fdb 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -48,7 +48,7 @@ Every name is introduced by a \defn{declaration}, which is a \begin{itemize} \item -\grammarterm{declaration}, +\grammarterm{name-declaration}, \grammarterm{block-declaration}, or \grammarterm{member-declaration}\iref{dcl.pre,class.mem}, \item @@ -1753,10 +1753,6 @@ if it precedes $P$ and inhabits either $S$ or the scope of a namespace nominated by a \grammarterm{using-directive} that is active in $S$ at $P$. -\begin{note} -A \grammarterm{using-directive} is exported if and only if -it appears in a header unit. -\end{note} \pnum An \term{unqualified search} in a scope $S$ from a program point $P$ diff --git a/source/declarations.tex b/source/declarations.tex index b89dd84b04..a63c317a72 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -19,14 +19,17 @@ \begin{bnf} \nontermdef{declaration}\br + name-declaration\br + special-declaration +\end{bnf} + +\begin{bnf} +\nontermdef{name-declaration}\br block-declaration\br nodeclspec-function-declaration\br function-definition\br template-declaration\br deduction-guide\br - explicit-instantiation\br - explicit-specialization\br - export-declaration\br linkage-specification\br namespace-definition\br empty-declaration\br @@ -34,6 +37,13 @@ module-import-declaration \end{bnf} +\begin{bnf} +\nontermdef{special-declaration}\br + explicit-instantiation\br + explicit-specialization\br + export-declaration +\end{bnf} + \begin{bnf} \nontermdef{block-declaration}\br simple-declaration\br @@ -8151,7 +8161,7 @@ \begin{bnf} \nontermdef{linkage-specification}\br \keyword{extern} string-literal \terminal{\{} \opt{declaration-seq} \terminal{\}}\br - \keyword{extern} string-literal declaration + \keyword{extern} string-literal name-declaration \end{bnf} The \grammarterm{string-literal} indicates the required language linkage. @@ -8185,9 +8195,6 @@ \end{example} \pnum -A \grammarterm{module-import-declaration} -shall not be directly contained in -a \grammarterm{linkage-specification}. A \grammarterm{module-import-declaration} appearing in a linkage specification with other than \Cpp{} language linkage is conditionally-supported with diff --git a/source/modules.tex b/source/modules.tex index d82d1b0cfc..0a65f8c069 100644 --- a/source/modules.tex +++ b/source/modules.tex @@ -196,7 +196,7 @@ \begin{bnf} \nontermdef{export-declaration}\br - \keyword{export} declaration\br + \keyword{export} name-declaration\br \keyword{export} \terminal{\{} \opt{declaration-seq} \terminal{\}}\br export-keyword module-import-declaration \end{bnf} @@ -209,10 +209,12 @@ or a \grammarterm{private-module-fragment}. An \grammarterm{export-declaration} has the declarative effects of its -\grammarterm{declaration}, +\grammarterm{name-declaration}, \grammarterm{declaration-seq} (if any), or \grammarterm{module-import-declaration}. -The \grammarterm{declaration} or \grammarterm{declaration-seq} of +The \grammarterm{name-declaration} of an \grammarterm{export-declaration} +shall not declare a partial specialization\iref{temp.decls.general}. +The \grammarterm{declaration-seq} of an \grammarterm{export-declaration} shall not contain an \grammarterm{export-declaration} or \grammarterm{module-import-declaration}. @@ -232,10 +234,7 @@ \end{itemize} \pnum -An exported declaration -that is not a \grammarterm{module-import-declaration} -shall declare at least one name. -If the declaration is not within a header unit, +If an exported declaration is not within a header unit, it shall not declare a name with internal linkage. \pnum @@ -249,17 +248,14 @@ #include "a.h" // error: declaration of \tcode{x} is not in the // purview of a module interface unit export module M; -export namespace {} // error: does not introduce any names -export namespace { - int a1; // error: export of name with internal linkage -} +export namespace {} // error: namespace has internal linkage namespace { export int a2; // error: export of name with internal linkage } export static int b; // error: b explicitly declared static export int f(); // OK export namespace N { } // OK -export using namespace N; // error: does not declare a name +export using namespace N; // OK \end{codeblocktu} \end{example} diff --git a/source/templates.tex b/source/templates.tex index 38c5aac700..c726e771ff 100644 --- a/source/templates.tex +++ b/source/templates.tex @@ -6379,6 +6379,8 @@ \end{example} \pnum +The \grammarterm{declaration} in an \grammarterm{explicit-specialization} +shall not be an \grammarterm{export-declaration}. An explicit specialization shall not use a \grammarterm{storage-class-specifier}\iref{dcl.stc} other than \keyword{thread_local}. From 29e31faece4b116644d038ab15f298a868fc6a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 16 Nov 2022 17:30:18 +0000 Subject: [PATCH 156/257] P2718R0 Wording for P2644R1 Fix for Range-based for Loop Editorial changes: * The note and example were placed _after_ the current example, not before, since they are about a particular aspect, whereas the current example is about the general feature. * The Annex C entry's example uses Annex-C style. * The term "range-based for loop" has been replaced with the official term "range-based for statement" in Annex C. Fixes NB DE 038 (C++23 CD). --- source/basic.tex | 22 ++++++++++++++++------ source/compatibility.tex | 23 +++++++++++++++++++++++ source/statements.tex | 18 +++++++++++++++++- 3 files changed, 56 insertions(+), 7 deletions(-) diff --git a/source/basic.tex b/source/basic.tex index 4fd0641fdb..bd155ed606 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -4317,7 +4317,7 @@ \pnum \indextext{initializer!temporary and declarator}% \indextext{temporary!order of destruction of}% -There are three contexts in which temporaries are destroyed at a different +There are four contexts in which temporaries are destroyed at a different point than the end of the full-expression. The first context is when a default constructor is called to initialize an element of an array with no corresponding initializer\iref{dcl.init}. @@ -4438,14 +4438,24 @@ \end{itemize} \pnum -The destruction of a temporary whose lifetime is not extended by being -bound to a reference is sequenced before the destruction of every +The fourth context is when a temporary object other than a function parameter object +is created in the \grammarterm{for-range-initializer} of a range-based \keyword{for} statement. +If such a temporary object would otherwise be destroyed +at the end of the \grammarterm{for-range-initializer} full-expression, +the object persists for the lifetime of the reference +initialized by the \grammarterm{for-range-initializer}. + +\pnum +The destruction of a temporary whose lifetime is not extended +beyond the full-expression in which it was created +is sequenced before the destruction of every temporary which is constructed earlier in the same full-expression. -If the lifetime of two or more temporaries to which references are bound ends -at the same point, +If the lifetime of two or more temporaries +with lifetimes extending beyond the full-expressions in which they were created +ends at the same point, these temporaries are destroyed at that point in the reverse order of the completion of their construction. -In addition, the destruction of temporaries bound to references shall +In addition, the destruction of such temporaries shall take into account the ordering of destruction of objects with static, thread, or automatic storage duration\iref{basic.stc.static,basic.stc.thread,basic.stc.auto}; that is, if diff --git a/source/compatibility.tex b/source/compatibility.tex index f65fc27e89..44a0fb5efb 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -69,6 +69,29 @@ // now equivalent to \tcode{arr.operator[](1, 2)} or ill-formed \end{codeblock} +\rSec2[diff.cpp20.stmt]{\ref{stmt.stmt}: statements} + +\diffref{stmt.ranged} +\change +The lifetime of temporary objects in the \grammarterm{for-range-initializer} +is extended until the end of the loop\iref{class.temporary}. +\rationale +Improve usability of the range-based \keyword{for} statement. +\effect +Destructors of some temporary objects are invoked later. +For example: +\begin{codeblock} +void f() { + std::vector v = { 42, 17, 13 }; + std::mutex m; + + for (int x : + static_cast(std::lock_guard(m)), v) { // lock released in \CppXX + std::lock_guard guard(m); // OK in \CppXX, now deadlocks + } +} +\end{codeblock} + \rSec2[diff.cpp20.dcl]{\ref{dcl.dcl}: declarations} \diffref{dcl.init.string} diff --git a/source/statements.tex b/source/statements.tex index 2afcf4b8da..9bcd85d5bc 100644 --- a/source/statements.tex +++ b/source/statements.tex @@ -704,7 +704,6 @@ \end{note} \end{itemize} \end{itemize} - \begin{example} \begin{codeblock} int array[5] = { 1, 2, 3, 4, 5 }; @@ -712,6 +711,23 @@ x *= 2; \end{codeblock} \end{example} +\begin{note} +The lifetime of some temporaries in the \grammarterm{for-range-initializer} +is extended to cover the entire loop\iref{class.temporary}. +\end{note} +\begin{example} +\begin{codeblock} +using T = std::list; +const T& f1(const T& t) { return t; } +const T& f2(T t) { return t; } +T g(); + +void foo() { + for (auto e : f1(g())) {} // OK, lifetime of return value of \tcode{g()} extended + for (auto e : f2(g())) {} // undefined behavior +} +\end{codeblock} +\end{example} \pnum In the \grammarterm{decl-specifier-seq} of a \grammarterm{for-range-declaration}, From 4f5b94796ac402afb03102ff0bad307322834eb6 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 09:47:17 -0800 Subject: [PATCH 157/257] LWG3118 fpos equality comparison unspecified --- source/iostreams.tex | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index fc56636633..0e5ccd6d64 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -1700,7 +1700,7 @@ of type \tcode{P} or \tcode{const P}, \item \tcode{pl} and \tcode{ql} refer to modifiable lvalues of type \tcode{P}, \item \tcode{O} refers to type \tcode{streamoff}, and -\item \tcode{o} refers to a value +\item \tcode{o} and \tcode{o2} refer to values of type \tcode{streamoff} or \tcode{const streamoff}. \end{itemize} @@ -1725,7 +1725,7 @@ & & \effects Value-initializes the state object. \br - \ensures \tcode{p == P(o)} \\ \rowsep + \ensures \tcode{p == P(o)} is \tcode{true}. \\ \rowsep \tcode{P()} & \tcode{P} & \tcode{P(0)} & @@ -1738,8 +1738,20 @@ \tcode{streamoff} & converts to \tcode{offset} & \tcode{P(O(p)) == p} \\ \rowsep +\tcode{p == q} & + \tcode{bool} & + & + \remarks For any two values \tcode{o} and \tcode{o2}, + if \tcode{p} is obtained + from \tcode{o} converted to \tcode{P} or + from a copy of such \tcode{P} value and + if \tcode{q} is obtained + from \tcode{o2} converted to \tcode{P} or + from a copy of such \tcode{P} value, + then \tcode{p == q} is \tcode{true} + only if \tcode{o == o2} is \tcode{true}. \\ \rowsep \tcode{p != q} & - convertible to \tcode{bool} & + \tcode{bool} & \tcode{!(p == q)} & \\ \rowsep \tcode{p + o} & \tcode{P} & From 308b5ef5219d903a504f13dac0d1c960e17c28a7 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 09:52:15 -0800 Subject: [PATCH 158/257] =?UTF-8?q?LWG3594=20inout=5Fptr=20=E2=80=94=20inc?= =?UTF-8?q?onsistent=20release()=20in=20destructor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/memory.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/memory.tex b/source/memory.tex index 9dc24f3078..6ada84d1dd 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -5193,9 +5193,9 @@ \item otherwise, \begin{codeblock} +@\exposid{release-statement}@; if (p) { apply([&](auto&&... args) { - @\exposid{release-statement}@; s.reset(static_cast(p), std::forward(args)...); }, std::move(a)); } \end{codeblock} @@ -5205,9 +5205,9 @@ \item otherwise, \begin{codeblock} +@\exposid{release-statement}@; if (p) { apply([&](auto&&... args) { - @\exposid{release-statement}@; s = Smart(static_cast(p), std::forward(args)...); }, std::move(a)); } \end{codeblock} From 51f4ba9d007cfb4d0d11b1ec9836f7d6ab0c1dec Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 10:06:37 -0800 Subject: [PATCH 159/257] LWG3636 formatter::format should be const-qualified --- source/time.tex | 4 ++-- source/utilities.tex | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source/time.tex b/source/time.tex index 1f97197252..f45b163df2 100644 --- a/source/time.tex +++ b/source/time.tex @@ -10963,7 +10963,7 @@ : formatter, charT> { template typename FormatContext::iterator - format(const chrono::zoned_time& tp, FormatContext& ctx); + format(const chrono::zoned_time& tp, FormatContext& ctx) const; }; \end{codeblock} @@ -10971,7 +10971,7 @@ \begin{itemdecl} template typename FormatContext::iterator - format(const chrono::zoned_time& tp, FormatContext& ctx); + format(const chrono::zoned_time& tp, FormatContext& ctx) const; \end{itemdecl} \begin{itemdescr} diff --git a/source/utilities.tex b/source/utilities.tex index 30f814b68d..479d4de54c 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15034,7 +15034,8 @@ \tcode{Out}, and formatting argument type \tcode{T}, in \tref{formatter.basic} and \tref{formatter}: \begin{itemize} -\item \tcode{f} is a value of type \tcode{F}, +\item \tcode{f} is a value of type (possibly \tcode{const}) \tcode{F}, +\item \tcode{g} is an lvalue of type \tcode{F}, \item \tcode{u} is an lvalue of type \tcode{T}, \item \tcode{t} is a value of a type convertible to (possibly const) \tcode{T}, \item \tcode{PC} is \tcode{basic_format_parse_context}, @@ -15054,7 +15055,7 @@ {p{1.2in}p{1in}p{2.9in}} \topline \hdstyle{Expression} & \hdstyle{Return type} & \hdstyle{Requirement} \\ \capsep -\tcode{f.parse(pc)} & +\tcode{g.parse(pc)} & \tcode{PC::iterator} & Parses \fmtgrammarterm{format-spec}\iref{format.string} for type \tcode{T} @@ -15252,7 +15253,7 @@ const char* color_names[] = { "red", "green", "blue" }; template<> struct std::formatter : std::formatter { - auto format(color c, format_context& ctx) { + auto format(color c, format_context& ctx) const { return formatter::format(color_names[c], ctx); } }; @@ -15685,7 +15686,7 @@ } // Formats an \tcode{S} with width given by the argument \tcode{width_arg_id}. - auto format(S s, format_context& ctx) { + auto format(S s, format_context& ctx) const { int width = visit_format_arg([](auto value) -> int { if constexpr (!is_integral_v) throw format_error("width is not integral"); From f3840cd62094226ba6f0a8290ad3b023b9852eea Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 10:11:41 -0800 Subject: [PATCH 160/257] LWG3754 Class template expected synopsis contains declarations that do not match the detailed description --- source/utilities.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 479d4de54c..e5b0f8b081 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -7237,9 +7237,9 @@ constexpr explicit(@\seebelow@) expected(U&& v); template - constexpr expected(const unexpected&); + constexpr explicit(@\seebelow@) expected(const unexpected&); template - constexpr expected(unexpected&&); + constexpr explicit(@\seebelow@) expected(unexpected&&); template constexpr explicit expected(in_place_t, Args&&...); @@ -8312,9 +8312,9 @@ constexpr explicit(@\seebelow@) expected(expected&&); template - constexpr expected(const unexpected&); + constexpr explicit(@\seebelow@) expected(const unexpected&); template - constexpr expected(unexpected&&); + constexpr explicit(@\seebelow@) expected(unexpected&&); constexpr explicit expected(in_place_t) noexcept; template From 47fb595b396d7a0820f6e933800420c3d10bd238 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 12:56:53 -0800 Subject: [PATCH 161/257] LWG3028 Container requirements tables should distinguish const and non-const variables --- source/containers.tex | 111 ++++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 53 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 474f7ecae1..7b67e5bd7d 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -79,13 +79,18 @@ \item \tcode{X} denotes a container class containing objects of type \tcode{T}, \item -\tcode{a} and \tcode{b} denote values of type \tcode{X}, +\tcode{a} denotes a value of type \tcode{X}, +\item +\tcode{b} and \tcode{c} denote values of type (possibly const) \tcode{X}, \item \tcode{i} and \tcode{j} denote values of type (possibly const) \tcode{X::iterator}, \item \tcode{u} denotes an identifier, \item -\tcode{r} denotes a non-const value of type \tcode{X}, and +\tcode{v} denotes an lvalue of type (possibly const) \tcode{X} or +an rvalue of type \tcode{const X}, +\item +\tcode{s} and \tcode{t} denote non-const lvalues of type \tcode{X}, and \item \tcode{rv} denotes a non-const rvalue of type \tcode{X}. \end{itemize} @@ -219,8 +224,8 @@ \end{itemdescr} \begin{itemdecl} -X u(a); -X u = a; +X u(v); +X u = v; \end{itemdecl} \begin{itemdescr} @@ -230,7 +235,7 @@ \pnum \ensures -\tcode{u == a} +\tcode{u == v}. \pnum \complexity @@ -252,8 +257,27 @@ Linear for \tcode{array} and constant for all other standard containers. \end{itemdescr} +\indexcont{operator=}% \begin{itemdecl} -a = rv +t = v; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\result +\tcode{X\&}. + +\pnum +\ensures +\tcode{t == v}. + +\pnum +\complexity +Linear. +\end{itemdescr} + +\begin{itemdecl} +t = rv \end{itemdecl} \begin{itemdescr} @@ -263,12 +287,12 @@ \pnum \effects -All existing elements of \tcode{a} are either move assigned to or destroyed. +All existing elements of \tcode{t} are either move assigned to or destroyed. \pnum \ensures -If \tcode{a} and \tcode{rv} do not refer to the same object, -\tcode{a} is equal to the value that \tcode{rv} had before this assignment. +If \tcode{t} and \tcode{rv} do not refer to the same object, +\tcode{t} is equal to the value that \tcode{rv} had before this assignment. \pnum \complexity @@ -282,7 +306,7 @@ \begin{itemdescr} \pnum \result -\keyword{void} +\keyword{void}. \pnum \effects @@ -295,14 +319,14 @@ \indexcont{begin}% \begin{itemdecl} -a.begin() +b.begin() \end{itemdecl} \begin{itemdescr} \pnum \result \tcode{iterator}; -\tcode{const_iterator} for constant \tcode{a}. +\tcode{const_iterator} for constant \tcode{b}. \pnum \returns @@ -315,14 +339,14 @@ \indexcont{end}% \begin{itemdecl} -a.end() +b.end() \end{itemdecl} \begin{itemdescr} \pnum \result \tcode{iterator}; -\tcode{const_iterator} for constant \tcode{a}. +\tcode{const_iterator} for constant \tcode{b}. \pnum \returns @@ -335,7 +359,7 @@ \indexcont{cbegin}% \begin{itemdecl} -a.cbegin() +b.cbegin() \end{itemdecl} \begin{itemdescr} @@ -345,7 +369,7 @@ \pnum \returns -\tcode{const_cast(a).begin()} +\tcode{const_cast(b).begin()} \pnum \complexity @@ -354,7 +378,7 @@ \indexcont{cend}% \begin{itemdecl} -a.cend() +b.cend() \end{itemdecl} \begin{itemdescr} @@ -364,7 +388,7 @@ \pnum \returns -\tcode{const_cast(a).end()} +\tcode{const_cast(b).end()} \pnum \complexity @@ -391,7 +415,7 @@ \indexcont{operator==}% \begin{itemdecl} -a == b +c == b \end{itemdecl} \begin{itemdescr} @@ -405,7 +429,7 @@ \pnum \returns -\tcode{equal(a.begin(), a.end(), b.begin(), b.end())} +\tcode{equal(c.begin(), c.end(), b.begin(), b.end())} \begin{note} The algorithm \tcode{equal} is defined in \ref{alg.equal}. @@ -413,7 +437,7 @@ \pnum \complexity -Constant if \tcode{a.size() != b.size()}, linear otherwise. +Constant if \tcode{c.size() != b.size()}, linear otherwise. \pnum \remarks @@ -422,28 +446,28 @@ \indexcont{operator"!=}% \begin{itemdecl} -a != b +c != b \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to \tcode{!(a == b)}. +Equivalent to \tcode{!(c == b)}. \end{itemdescr} \indexcont{swap}% \begin{itemdecl} -a.swap(b) +t.swap(s) \end{itemdecl} \begin{itemdescr} \pnum \result -\keyword{void} +\keyword{void}. \pnum \effects -Exchanges the contents of \tcode{a} and \tcode{b}. +Exchanges the contents of \tcode{t} and \tcode{s}. \pnum \complexity @@ -451,37 +475,18 @@ \end{itemdescr} \begin{itemdecl} -swap(a, b) +swap(t, s) \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to \tcode{a.swap(b)}. -\end{itemdescr} - -\indexcont{operator=}% -\begin{itemdecl} -r = a -\end{itemdecl} - -\begin{itemdescr} -\pnum -\result -\tcode{X\&}. - -\pnum -\ensures -\tcode{r == a}. - -\pnum -\complexity -Linear. +Equivalent to \tcode{t.swap(s)}. \end{itemdescr} \indexcont{size}% \begin{itemdecl} -a.size() +c.size() \end{itemdecl} \begin{itemdescr} @@ -491,7 +496,7 @@ \pnum \returns -\tcode{distance(a.begin(), a.end())}, +\tcode{distance(c.begin(), c.end())}, i.e. the number of elements in the container. \pnum @@ -506,7 +511,7 @@ \indexcont{max_size}% \begin{itemdecl} -a.max_size() +c.max_size() \end{itemdecl} \begin{itemdescr} @@ -525,7 +530,7 @@ \indexcont{empty}% \begin{itemdecl} -a.empty() +c.empty() \end{itemdecl} \begin{itemdescr} @@ -535,7 +540,7 @@ \pnum \returns -\tcode{a.begin() == a.end()} +\tcode{c.begin() == c.end()} \pnum \complexity @@ -543,7 +548,7 @@ \pnum \remarks -If the container is empty, then \tcode{a.empty()} is true. +If the container is empty, then \tcode{c.empty()} is \tcode{true}. \end{itemdescr} \pnum From a15360a143227abc385294df5357e7e4bf5ac55b Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 13:02:46 -0800 Subject: [PATCH 162/257] LWG3177 Limit permission to specialize variable templates to program-defined types --- source/lib-intro.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index f8f7ee7823..f560613bdd 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -2818,6 +2818,10 @@ if it declares an explicit or partial specialization of any standard library variable template, except where explicitly permitted by the specification of that variable template. +\begin{note} +The requirements on an explicit or partial specialization +are stated by each variable template that grants such permission. +\end{note} \pnum The behavior of a \Cpp{} program is undefined if it declares From 350b3d9a0a626cbcfd8ede51c6aae3173701c576 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 13:53:44 -0800 Subject: [PATCH 163/257] LWG3545 std::pointer_traits should be SFINAE-friendly --- source/memory.tex | 57 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/source/memory.tex b/source/memory.tex index 6ada84d1dd..5e86fb6b3d 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -594,13 +594,7 @@ \begin{codeblock} namespace std { template struct pointer_traits { - using pointer = Ptr; - using element_type = @\seebelow@; - using difference_type = @\seebelow@; - - template using rebind = @\seebelow@; - - static pointer pointer_to(@\seebelow@ r); + @\seebelow@; }; template struct pointer_traits { @@ -617,6 +611,46 @@ \rSec3[pointer.traits.types]{Member types} +\pnum +The definitions in this subclause make use of +the following exposition-only class template and concept: +\begin{codeblock} +template +struct @\exposid{ptr-traits-elem}@ // \expos +{ }; + +template requires requires { typename T::element_type; } +struct @\exposid{ptr-traits-elem}@ +{ using type = typename T::element_type; }; + +template class SomePointer, class T, class... Args> + requires (!requires { typename SomePointer::element_type; }) +struct @\exposid{ptr-traits-elem}@> +{ using type = T; }; + +template + concept @\defexposconcept{has-elem-type}@ = // \expos + requires { typename @\exposid{ptr-traits-elem}@::type; } +\end{codeblock} + +\pnum +If \tcode{Ptr} satisfies \exposconcept{has-elem-type}, +a specialization \tcode{pointer_traits} +generated from the \tcode{pointer_traits} primary template +has the following members +as well as those described in~\ref{pointer.traits.functions}; +otherwise, such a specialization has no members by any of those names. + +\indexlibrarymember{pointer}{pointer_traits}% +\begin{itemdecl} +using pointer = @\seebelow@; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\ctype \tcode{Ptr}. +\end{itemdescr} + \indexlibrarymember{element_type}{pointer_traits}% \begin{itemdecl} using element_type = @\seebelow@; @@ -624,12 +658,7 @@ \begin{itemdescr} \pnum -\ctype \tcode{Ptr::element_type} if -the \grammarterm{qualified-id} \tcode{Ptr::element_type} is valid and denotes a -type\iref{temp.deduct}; otherwise, \tcode{T} if -\tcode{Ptr} is a class template instantiation of the form \tcode{SomePointer}, -where \tcode{Args} is zero or more type arguments; otherwise, the specialization is -ill-formed. +\ctype \tcode{typename \exposid{ptr-traits-elem}::type}. \end{itemdescr} \indexlibrarymember{difference_type}{pointer_traits}% @@ -697,6 +726,8 @@ \pnum Specializations of \tcode{pointer_traits} may define the member declared in this subclause to customize the behavior of the standard library. +A specialization generated from the \tcode{pointer_traits} primary template +has no member by this name. \indexlibrarymember{to_address}{pointer_traits}% \begin{itemdecl} From 43ee8790d7f18128adcea54b948cc6db3588648d Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 13:57:22 -0800 Subject: [PATCH 164/257] LWG3597 Unsigned integer types don't model advanceable --- source/ranges.tex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/ranges.tex b/source/ranges.tex index f676751720..31ec7a4d5a 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2800,6 +2800,8 @@ \expects \tcode{Bound} denotes \tcode{unreachable_sentinel_t} or \tcode{Bound()} is reachable from \tcode{value}. +When \tcode{W} and \tcode{Bound} model \libconcept{totally_ordered_with}, +then \tcode{bool(value <= Bound())} is \tcode{true}. \pnum \effects From cfa1614d47dfede8d9fc0d4d81b93a5602a95ca2 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 14:08:03 -0800 Subject: [PATCH 165/257] LWG3600 Making istream_iterator copy constructor trivial is an ABI break --- source/iterators.tex | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index cf6b9b8374..52f9c9544e 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -6466,7 +6466,7 @@ constexpr istream_iterator(); constexpr istream_iterator(default_sentinel_t); istream_iterator(istream_type& s); - istream_iterator(const istream_iterator& x) = default; + constexpr istream_iterator(const istream_iterator& x) noexcept(@\seebelow@); ~istream_iterator() = default; istream_iterator& operator=(const istream_iterator&) = default; @@ -6529,18 +6529,22 @@ \indexlibraryctor{istream_iterator}% \begin{itemdecl} -istream_iterator(const istream_iterator& x) = default; +constexpr istream_iterator(const istream_iterator& x) noexcept(@\seebelow@); \end{itemdecl} \begin{itemdescr} \pnum -\ensures -\tcode{in_stream == x.in_stream} is \tcode{true}. +\effects +Initializes \tcode{in_stream} with \tcode{x.in_stream} and +initializes \tcode{value} with \tcode{x.value}. \pnum \remarks -If \tcode{is_trivially_copy_constructible_v} is \tcode{true}, -then this constructor is trivial. +An invocation of this constructor may be used in a core constant expression +if and only if the initialization of \tcode{value} from \tcode{x.value} +is a constant subexpression\iref{defns.const.subexpr}. +The exception specification is equivalent to +\tcode{is_nothrow_copy_constructible_v}. \end{itemdescr} \indexlibrarydtor{istream_iterator}% From 72afe68b91f35ab08b8474ea258cfd9d045f42d0 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 14:32:18 -0800 Subject: [PATCH 166/257] LWG3629 make_error_code and make_error_condition are customization points --- source/diagnostics.tex | 52 +++++++++++++++++++++++++++++------------- source/lib-intro.tex | 9 ++++++-- 2 files changed, 43 insertions(+), 18 deletions(-) diff --git a/source/diagnostics.tex b/source/diagnostics.tex index b75be934c1..b9398520d0 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -1122,8 +1122,9 @@ \begin{itemdescr} \pnum -\ensures -\tcode{val_ == 0} and \tcode{cat_ == \&system_category()}. +\effects +Initializes \tcode{val_} with \tcode{0} +and \tcode{cat_} with \tcode{\&system_category()}. \end{itemdescr} \indexlibraryctor{error_code}% @@ -1133,8 +1134,9 @@ \begin{itemdescr} \pnum -\ensures -\tcode{val_ == val} and \tcode{cat_ == \&cat}. +\effects +Initializes \tcode{val_} with \tcode{val} +and \tcode{cat_} with \tcode{\&cat}. \end{itemdescr} \indexlibraryctor{error_code}% @@ -1149,8 +1151,12 @@ \tcode{is_error_code_enum_v} is \tcode{true}. \pnum -\ensures -\tcode{*this == make_error_code(e)}. +\effects +Equivalent to: +\begin{codeblock} +error_code ec = make_error_code(e); +assign(ec.value(), ec.category()); +\end{codeblock} \end{itemdescr} \rSec3[syserr.errcode.modifiers]{Modifiers} @@ -1178,8 +1184,12 @@ \tcode{is_error_code_enum_v} is \tcode{true}. \pnum -\ensures -\tcode{*this == make_error_code(e)}. +\effects +Equivalent to: +\begin{codeblock} +error_code ec = make_error_code(e); +assign(ec.value(), ec.category()); +\end{codeblock} \pnum \returns @@ -1332,8 +1342,9 @@ \begin{itemdescr} \pnum -\ensures -\tcode{val_ == 0} and \tcode{cat_ == \&generic_category()}. +\effects +Initializes \tcode{val_} with \tcode{0} +and \tcode{cat_} with \tcode{\&generic_category()}. \end{itemdescr} \indexlibraryctor{error_condition}% @@ -1343,8 +1354,9 @@ \begin{itemdescr} \pnum -\ensures -\tcode{val_ == val} and \tcode{cat_ == \&cat}. +\effects +Initializes \tcode{val_} with \tcode{val} +and \tcode{cat_} with \tcode{\&cat}. \end{itemdescr} \indexlibraryctor{error_condition}% @@ -1359,8 +1371,12 @@ \tcode{is_error_condition_enum_v} is \tcode{true}. \pnum -\ensures -\tcode{*this == make_error_condition(e)}. +\effects +Equivalent to: +\begin{codeblock} +error_condition ec = make_error_condition(e); +assign(ec.value(), ec.category()); +\end{codeblock} \end{itemdescr} @@ -1389,8 +1405,12 @@ \tcode{is_error_condition_enum_v} is \tcode{true}. \pnum -\ensures -\tcode{*this == make_error_condition(e)}. +\effects +Equivalent to: +\begin{codeblock} +error_condition ec = make_error_condition(e); +assign(ec.value(), ec.category()); +\end{codeblock} \pnum \returns diff --git a/source/lib-intro.tex b/source/lib-intro.tex index f560613bdd..5fc5814457 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1024,8 +1024,9 @@ \end{footnote} \pnum -Whenever an unqualified name other than \tcode{swap} is used -in the specification of a declaration \tcode{D} +Whenever an unqualified name other than +\tcode{swap}, \tcode{make_error_code}, or \tcode{make_error_condition} +is used in the specification of a declaration \tcode{D} in \ref{\firstlibchapter} through \ref{\lastlibchapter} or \ref{depr}, its meaning is established as-if by performing unqualified name lookup\iref{basic.lookup.unqual} @@ -1046,6 +1047,10 @@ The meaning of the unqualified name \tcode{swap} is established in an overload resolution context for swappable values\iref{swappable.requirements}. +The meanings of the unqualified names +\tcode{make_error_code} and \tcode{make_error_condition} are established +as-if by performing argument-dependent lookup\iref{basic.lookup.argdep}. + \rSec3[headers]{Headers} From e64a5fbbd3e33f0be24d20144854d94708a9b8eb Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 14:36:53 -0800 Subject: [PATCH 167/257] LWG3646 std::ranges::view_interface::size returns a signed type --- source/ranges.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 31ec7a4d5a..43ccaf8f5f 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1726,11 +1726,11 @@ constexpr auto size() requires @\libconcept{forward_range}@ && @\libconcept{sized_sentinel_for}@, iterator_t> { - return ranges::end(@\exposid{derived}@()) - ranges::begin(@\exposid{derived}@()); + return @\exposid{to-unsigned-like}@(ranges::end(@\exposid{derived}@()) - ranges::begin(@\exposid{derived}@())); } constexpr auto size() const requires @\libconcept{forward_range}@ && @\libconcept{sized_sentinel_for}@, iterator_t> { - return ranges::end(@\exposid{derived}@()) - ranges::begin(@\exposid{derived}@()); + return @\exposid{to-unsigned-like}@(ranges::end(@\exposid{derived}@()) - ranges::begin(@\exposid{derived}@())); } constexpr decltype(auto) front() requires @\libconcept{forward_range}@; From 5001d5d3c101df0390ae8170590bcc60463e9aea Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 14:48:53 -0800 Subject: [PATCH 168/257] LWG3677 Is a cv-qualified pair specially handled in uses-allocator construction? --- source/memory.tex | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/source/memory.tex b/source/memory.tex index 5e86fb6b3d..7bb0f232dc 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -1043,18 +1043,18 @@ \begin{itemdescr} \pnum \constraints -\tcode{T} is not a specialization of \tcode{pair}. +\tcode{remove_cv_t} is not a specialization of \tcode{pair}. \pnum \returns A \tcode{tuple} value determined as follows: \begin{itemize} \item - If \tcode{uses_allocator_v} is \tcode{false} and - \tcode{is_constructible_v} is \tcode{true}, + If \tcode{uses_allocator_v, Alloc>} is \tcode{false} and + \tcode{is_constructible_v} is \tcode{true}, return \tcode{forward_as_tuple(std::forward(args)...)}. \item - Otherwise, if \tcode{uses_allocator_v} is \tcode{true} and + Otherwise, if \tcode{uses_allocator_v, Alloc>} is \tcode{true} and \tcode{is_constructible_v} is \tcode{true}, return @@ -1063,7 +1063,7 @@ allocator_arg, alloc, std::forward(args)...) \end{codeblock} \item - Otherwise, if \tcode{uses_allocator_v} is \tcode{true} and + Otherwise, if \tcode{uses_allocator_v, Alloc>} is \tcode{true} and \tcode{is_constructible_v} is \tcode{true}, return \tcode{forward_as_tuple(std::forward(args)..., alloc)}. \item @@ -1084,13 +1084,17 @@ \end{itemdecl} \begin{itemdescr} +\pnum +Let \tcode{T1} be \tcode{T::first_type}. +Let \tcode{T2} be \tcode{T::second_type}. + \pnum \constraints -\tcode{T} is a specialization of \tcode{pair}. +\tcode{remove_cv_t} is a specialization of \tcode{pair}. \pnum \effects -For \tcode{T} specified as \tcode{pair}, equivalent to: +Equivalent to: \begin{codeblock} return make_tuple( piecewise_construct, @@ -1114,7 +1118,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{T} is a specialization of \tcode{pair}. +\tcode{remove_cv_t} is a specialization of \tcode{pair}. \pnum \effects @@ -1135,7 +1139,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{T} is a specialization of \tcode{pair}. +\tcode{remove_cv_t} is a specialization of \tcode{pair}. \pnum \effects @@ -1160,7 +1164,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{T} is a specialization of \tcode{pair}. +\tcode{remove_cv_t} is a specialization of \tcode{pair}. \pnum \effects @@ -1185,7 +1189,7 @@ \begin{itemdescr} \pnum \constraints -\tcode{T} is a specialization of \tcode{pair}. +\tcode{remove_cv_t} is a specialization of \tcode{pair}. \pnum \effects @@ -1213,7 +1217,7 @@ \pnum \constraints -\tcode{T} is a specialization of \tcode{pair}, and +\tcode{remove_cv_t} is a specialization of \tcode{pair}, and the expression \tcode{\exposid{FUN}(u)} is not well-formed when considered as an unevaluated operand. From 2b33e1464d02da5554d8c0fb1acbe16784fe07eb Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 15:00:50 -0800 Subject: [PATCH 169/257] LWG3732 prepend_range and append_range can't be amortized constant time --- source/containers.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index 7b67e5bd7d..f34b7695ae 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -1826,7 +1826,8 @@ \pnum The following operations are provided for some types of sequence containers but not others. -An implementation shall implement them so as to take amortized constant time. +Operations other than \tcode{prepend_range} and \tcode{append_range} +are implemented so as to take amortized constant time. \begin{itemdecl} a.front() From ca38a0a1020a8198428861dacffe0828bb388f57 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 15:10:21 -0800 Subject: [PATCH 170/257] LWG3736 move_iterator missing disable_sized_sentinel_for specialization --- source/iterators.tex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/iterators.tex b/source/iterators.tex index 52f9c9544e..e1183ae0a5 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -402,6 +402,11 @@ template constexpr move_iterator make_move_iterator(Iterator i); // freestanding + template + requires (!@\libconcept{sized_sentinel_for}@) + inline constexpr bool disable_sized_sentinel_for, // freestanding + move_iterator> = true; + template<@\libconcept{semiregular}@ S> class move_sentinel; // freestanding // \ref{iterators.common}, common iterators From 3617d8340e31fd9c63087745efb81c633550304f Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 15:12:44 -0800 Subject: [PATCH 171/257] LWG3738 Missing preconditions for take_view constructor --- source/ranges.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/ranges.tex b/source/ranges.tex index 43ccaf8f5f..e022a47fb3 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -5806,6 +5806,10 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\expects +\tcode{count >= 0} is \tcode{true}. + \pnum \effects Initializes \exposid{base_} with \tcode{std::move(base)} and From cb86a18ec7926dc928afb1b0e603cd7da5d7418e Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 15:17:32 -0800 Subject: [PATCH 172/257] LWG3743 ranges::to's reserve may be ill-formed --- source/ranges.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index e022a47fb3..cbb30fb2e9 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2338,7 +2338,7 @@ \begin{codeblock} C c(std::forward(args)...); if constexpr (@\libconcept{sized_range}@ && @\exposid{reservable-container}@) - c.reserve(ranges::size(r)); + c.reserve(static_cast>(ranges::size(r))); ranges::copy(r, @\exposid{container-inserter}@>(c)); \end{codeblock} \end{itemize} From 2014b746676f0df26e4770b012fdb3b0b428cd4e Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 15:28:56 -0800 Subject: [PATCH 173/257] LWG3745 std::atomic_wait and its friends lack noexcept --- source/threads.tex | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/source/threads.tex b/source/threads.tex index 55dbadb167..d0ddcfb1ce 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -2222,24 +2222,25 @@ memory_order) noexcept; template - void atomic_wait(const volatile atomic*, typename atomic::value_type); // freestanding + void atomic_wait(const volatile atomic*, // freestanding + typename atomic::value_type) noexcept; template - void atomic_wait(const atomic*, typename atomic::value_type); // freestanding + void atomic_wait(const atomic*, typename atomic::value_type) noexcept; // freestanding template void atomic_wait_explicit(const volatile atomic*, // freestanding typename atomic::value_type, - memory_order); + memory_order) noexcept; template void atomic_wait_explicit(const atomic*, typename atomic::value_type, // freestanding - memory_order); + memory_order) noexcept; template - void atomic_notify_one(volatile atomic*); // freestanding + void atomic_notify_one(volatile atomic*) noexcept; // freestanding template - void atomic_notify_one(atomic*); // freestanding + void atomic_notify_one(atomic*) noexcept; // freestanding template - void atomic_notify_all(volatile atomic*); // freestanding + void atomic_notify_all(volatile atomic*) noexcept; // freestanding template - void atomic_notify_all(atomic*); // freestanding + void atomic_notify_all(atomic*) noexcept; // freestanding // \ref{atomics.alias}, type aliases using atomic_bool = atomic; // freestanding From 3a129f21a31f248089460280c5aba636559689d4 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 15:57:56 -0800 Subject: [PATCH 174/257] LWG3746 optional's spaceship with U with a type derived from optional causes infinite constraint meta-recursion --- source/utilities.tex | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index e5b0f8b081..9b7bba4b0c 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -3131,9 +3131,9 @@ class optional; template - constexpr bool @\exposid{is-optional}@ = false; // \expos - template - constexpr bool @\exposid{is-optional}@> = true; // \expos + concept @\defexposconcept{is-derived-from-optional}@ = requires(const T& t) { // \expos + [](const optional&){ }(t); + }; // \ref{optional.nullopt}, no-value state indicator struct nullopt_t{@\seebelow@}; @@ -3177,7 +3177,8 @@ template constexpr bool operator<=(const T&, const optional&); template constexpr bool operator>=(const optional&, const U&); template constexpr bool operator>=(const T&, const optional&); - template requires (!@\exposid{is-optional}@) && @\libconcept{three_way_comparable_with}@ + template + requires (!@\exposconcept{is-derived-from-optional}@) && @\libconcept{three_way_comparable_with}@ constexpr compare_three_way_result_t operator<=>(const optional&, const U&); @@ -4748,7 +4749,8 @@ \indexlibrarymember{operator<=>}{optional}% \begin{itemdecl} -template requires (!@\exposid{is-optional}@) && @\libconcept{three_way_comparable_with}@ +template + 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} From 12fb78311bfe8abb96490abc16db5c308a6caf35 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 16:23:03 -0800 Subject: [PATCH 175/257] LWG3747 ranges::uninitialized_copy_n, ranges::uninitialized_move_n, and ranges::destroy_n should use std::move --- source/algorithms.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 1b47c0b20b..0c6389b14e 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -11127,7 +11127,7 @@ \effects Equivalent to: \begin{codeblock} -auto t = uninitialized_copy(counted_iterator(ifirst, n), +auto t = uninitialized_copy(counted_iterator(std::move(ifirst), n), default_sentinel, ofirst, olast); return {std::move(t.in).base(), t.out}; \end{codeblock} @@ -11237,7 +11237,7 @@ \effects Equivalent to: \begin{codeblock} -auto t = uninitialized_move(counted_iterator(ifirst, n), +auto t = uninitialized_move(counted_iterator(std::move(ifirst), n), default_sentinel, ofirst, olast); return {std::move(t.in).base(), t.out}; \end{codeblock} @@ -11448,7 +11448,7 @@ \effects Equivalent to: \begin{codeblock} -return destroy(counted_iterator(first, n), default_sentinel).base(); +return destroy(counted_iterator(std::move(first), n), default_sentinel).base(); \end{codeblock} \end{itemdescr} From e80eb14e6f3d1d674089a7b8e39ab54d8c3951e0 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 16:26:01 -0800 Subject: [PATCH 176/257] LWG3750 Too many papers bump __cpp_lib_format --- source/support.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/support.tex b/source/support.tex index 3cba171dd8..86a01b6db7 100644 --- a/source/support.tex +++ b/source/support.tex @@ -624,6 +624,7 @@ #define @\defnlibxname{cpp_lib_find_last}@ 202207L // also in \libheader{algorithm} #define @\defnlibxname{cpp_lib_flat_map}@ 202207L // also in \libheader{flat_map} #define @\defnlibxname{cpp_lib_format}@ 202207L // also in \libheader{format} +#define @\defnlibxname{cpp_lib_format_ranges}@ 202207L // also in \libheader{format} #define @\defnlibxname{cpp_lib_forward_like}@ 202207L // also in \libheader{utility} #define @\defnlibxname{cpp_lib_gcd_lcm}@ 201606L // also in \libheader{numeric} #define @\defnlibxname{cpp_lib_generator}@ 202207L // also in \libheader{generator} From 91b26d3873bd85b124a68b6574a416cebc2e3f7f Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 16:27:19 -0800 Subject: [PATCH 177/257] LWG3751 Missing feature macro for flat_set --- source/support.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/support.tex b/source/support.tex index 86a01b6db7..924d9b45f2 100644 --- a/source/support.tex +++ b/source/support.tex @@ -623,6 +623,7 @@ #define @\defnlibxname{cpp_lib_filesystem}@ 201703L // also in \libheader{filesystem} #define @\defnlibxname{cpp_lib_find_last}@ 202207L // also in \libheader{algorithm} #define @\defnlibxname{cpp_lib_flat_map}@ 202207L // also in \libheader{flat_map} +#define @\defnlibxname{cpp_lib_flat_set}@ 202207L // also in \libheader{flat_set} #define @\defnlibxname{cpp_lib_format}@ 202207L // also in \libheader{format} #define @\defnlibxname{cpp_lib_format_ranges}@ 202207L // also in \libheader{format} #define @\defnlibxname{cpp_lib_forward_like}@ 202207L // also in \libheader{utility} From bdf9fd3ff9dab1c52813eef1aa6bd80811c9afed Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 16:29:03 -0800 Subject: [PATCH 178/257] LWG3755 tuple-for-each can call user-defined operator, --- source/ranges.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index cbb30fb2e9..32259f7195 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -4275,7 +4275,7 @@ template constexpr void @\exposid{tuple-for-each}@(F&& f, Tuple&& t) { // \expos apply([&](Ts&&... elements) { - (invoke(f, std::forward(elements)), ...); + (static_cast(invoke(f, std::forward(elements))), ...); }, std::forward(t)); } } From b69d4417b38230b1e3081602b44e193a21ba7a4a Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 16:33:51 -0800 Subject: [PATCH 179/257] LWG3757 What's the effect of std::forward_like(x)? --- source/utilities.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/utilities.tex b/source/utilities.tex index 9b7bba4b0c..97c2ba5f30 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -367,6 +367,10 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\mandates +\tcode{T} is a referenceable type\iref{defns.referenceable}. + \pnum \begin{itemize} \item From 96902274e0b5ea5da7e277a9ccc213ff4993d5e1 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 16:35:27 -0800 Subject: [PATCH 180/257] LWG3759 ranges::rotate_copy should use std::move --- source/algorithms.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index 0c6389b14e..ce678c8680 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -6293,7 +6293,7 @@ \effects Equivalent to: \begin{codeblock} -return ranges::rotate_copy(ranges::begin(r), middle, ranges::end(r), result); +return ranges::rotate_copy(ranges::begin(r), middle, ranges::end(r), std::move(result)); \end{codeblock} \end{itemdescr} From 387e3f596cfe5db9ff1bc3891eddcdd6ca47bb96 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 18:58:35 -0800 Subject: [PATCH 181/257] LWG3760 cartesian_product_view::iterator's parent_ is never valid [range.cartesian.iterator] Use \exposidnc on exposids when followed by an \expos comment. --- source/ranges.tex | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 32259f7195..f83cdc6140 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -14345,7 +14345,9 @@ \pnum \effects Equivalent to: -\tcode{return \exposid{iterator}(\exposid{tuple-transform}(ranges::begin, \exposid{bases_}));} +\begin{codeblock} +return @\exposid{iterator}@(*this, @\exposid{tuple-transform}@(ranges::begin, @\exposid{bases_}@)); +\end{codeblock} \end{itemdescr} \begin{itemdecl} @@ -14357,7 +14359,9 @@ \pnum \effects Equivalent to: -\tcode{return \exposid{iterator}(\exposid{tuple-transform}(ranges::begin, \exposid{bases_}));} +\begin{codeblock} +return @\exposid{iterator}@(*this, @\exposid{tuple-transform}@(ranges::begin, @\exposid{bases_}@)); +\end{codeblock} \end{itemdescr} \begin{itemdecl} @@ -14391,7 +14395,7 @@ \effects Equivalent to: \begin{codeblock} -@\exposid{iterator}@<@\exposid{is-const}@> it(@\exposid{tuple-transform}@( +@\exposid{iterator}@<@\exposid{is-const}@> it(*this, @\exposid{tuple-transform}@( [](auto& rng){ return @\exposid{begin-or-first-end}@(rng); }, @\exposid{bases_}@)); return it; \end{codeblock} @@ -14506,21 +14510,22 @@ @\libconcept{indirectly_swappable}@>>); private: - @\exposid{maybe-const}@* @\exposid{parent_}@ = nullptr; // \expos + using @\exposidnc{Parent}@ = @\exposidnc{maybe-const}@; // \expos + @\exposidnc{Parent}@* @\exposidnc{parent_}@ = nullptr; // \expos tuple>, - iterator_t<@\exposid{maybe-const}@>...> @\exposid{current_}@; // \expos + iterator_t<@\exposidnc{maybe-const}@>...> @\exposidnc{current_}@; // \expos template - constexpr void @\exposid{next}@(); // \expos + constexpr void @\exposidnc{next}@(); // \expos template - constexpr void @\exposid{prev}@(); // \expos + constexpr void @\exposidnc{prev}@(); // \expos template - constexpr difference_type @\exposid{distance-from}@(Tuple t); // \expos + constexpr difference_type @\exposidnc{distance-from}@(Tuple t); // \expos - constexpr explicit @\exposid{iterator}@(tuple>, - iterator_t<@\exposid{maybe-const}@>...> current); // \expos + constexpr @\exposid{iterator}@(@\exposid{Parent}@& parent, tuple>, + iterator_t<@\exposidnc{maybe-const}@>...> current); // \expos }; } \end{codeblock} @@ -14633,14 +14638,16 @@ \end{itemdescr} \begin{itemdecl} -constexpr explicit @\exposid{iterator}@(tuple>, +constexpr @\exposid{iterator}@(@\exposid{Parent}@& parent, tuple>, iterator_t<@\exposid{maybe-const}@>...> current); \end{itemdecl} \begin{itemdescr} \pnum \effects -Initializes \exposid{current_} with \tcode{std::move(current)}. +Initializes +\exposid{parent_} with \tcode{addressof(parent)} and +\exposid{current_} with \tcode{std::move(current)}. \end{itemdescr} \begin{itemdecl} @@ -14652,7 +14659,9 @@ \begin{itemdescr} \pnum \effects -Initializes \exposid{current_} with \tcode{std::move(i.\exposid{current_})}. +Initializes +\exposid{parent_} with \tcode{i.\exposid{parent_}} and +\exposid{current_} with \tcode{std::move(i.\exposid{current_})}. \end{itemdescr} \begin{itemdecl} From 6a3a7a3b5a755dc57c88261e1be8e7e1ecd52ce9 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 20:48:21 -0800 Subject: [PATCH 182/257] LWG3761 cartesian_product_view::iterator::operator- should pass by reference --- source/ranges.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index f83cdc6140..3ef50e15b6 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -14498,9 +14498,9 @@ friend constexpr difference_type operator-(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) requires @\exposconcept{cartesian-is-sized-sentinel}@; - friend constexpr difference_type operator-(@\exposid{iterator}@ i, default_sentinel_t) + friend constexpr difference_type operator-(const @\exposid{iterator}@& i, default_sentinel_t) requires @\exposconcept{cartesian-is-sized-sentinel}@; - friend constexpr difference_type operator-(default_sentinel_t, @\exposid{iterator}@ i) + friend constexpr difference_type operator-(default_sentinel_t, const @\exposid{iterator}@& i) requires @\exposconcept{cartesian-is-sized-sentinel}@; friend constexpr auto iter_move(const @\exposid{iterator}@& i) noexcept(@\seebelow@); @@ -14522,7 +14522,7 @@ constexpr void @\exposidnc{prev}@(); // \expos template - constexpr difference_type @\exposidnc{distance-from}@(Tuple t); // \expos + constexpr difference_type @\exposidnc{distance-from}@(const Tuple& t) const; // \expos constexpr @\exposid{iterator}@(@\exposid{Parent}@& parent, tuple>, iterator_t<@\exposidnc{maybe-const}@>...> current); // \expos @@ -14608,7 +14608,7 @@ \begin{itemdecl} template - constexpr difference_type @\exposid{distance-from}@(Tuple t); + constexpr difference_type @\exposid{distance-from}@(const Tuple& t) const; \end{itemdecl} \begin{itemdescr} @@ -14893,7 +14893,7 @@ \end{itemdescr} \begin{itemdecl} -friend constexpr difference_type operator-(@\exposid{iterator}@ i, default_sentinel_t) +friend constexpr difference_type operator-(const @\exposid{iterator}@& i, default_sentinel_t) requires @\exposconcept{cartesian-is-sized-sentinel}@; \end{itemdecl} @@ -14917,7 +14917,7 @@ \end{itemdescr} \begin{itemdecl} -friend constexpr difference_type operator-(default_sentinel_t s, @\exposid{iterator}@ i) +friend constexpr difference_type operator-(default_sentinel_t s, const @\exposid{iterator}@& i) requires @\exposconcept{cartesian-is-sized-sentinel}@; \end{itemdecl} From 89abc99495d7e945f6b352dd4ffacbe0e945c397 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 20:55:12 -0800 Subject: [PATCH 183/257] LWG3762 generator::iterator::operator== should pass by reference --- source/ranges.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 3ef50e15b6..83fa5087ec 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -15525,7 +15525,7 @@ @\exposid{iterator}@& operator++(); void operator++(int); - friend bool operator==(@\exposid{iterator}@ i, default_sentinel_t); + friend bool operator==(const @\exposid{iterator}@& i, default_sentinel_t); private: coroutine_handle @\exposid{coroutine_}@; // \expos @@ -15613,7 +15613,7 @@ \indexlibrarymember{operator==}{generator::\exposid{iterator}}% \begin{itemdecl} -friend bool operator==(@\exposid{iterator}@ i, default_sentinel_t); +friend bool operator==(const @\exposid{iterator}@& i, default_sentinel_t); \end{itemdecl} \begin{itemdescr} From f70fe4410e7ba877895b7d20dfabbefdf4ff9b9a Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 20:59:52 -0800 Subject: [PATCH 184/257] LWG3764 reference_wrapper::operator() should propagate noexcept --- source/utilities.tex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 97c2ba5f30..f815f22eab 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -10188,7 +10188,8 @@ // \ref{refwrap.invoke}, invocation template - constexpr invoke_result_t operator()(ArgTypes&&...) const; + constexpr invoke_result_t operator()(ArgTypes&&...) const + noexcept(is_nothrow_invocable_v); }; template @@ -10297,7 +10298,7 @@ \begin{itemdecl} template constexpr invoke_result_t - operator()(ArgTypes&&... args) const; + operator()(ArgTypes&&... args) const noexcept(is_nothrow_invocable_v); \end{itemdecl} \begin{itemdescr} From d7ed9ee77a702fe68abca6b0a3707a72b4e898ac Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 21:07:50 -0800 Subject: [PATCH 185/257] LWG3765 const_sentinel should be constrained --- source/iterators.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index e1183ae0a5..de89d31340 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -342,7 +342,7 @@ concept @\exposconcept{constant-iterator}@ = @\seebelow@; // \expos template<@\libconcept{input_iterator}@ I> using const_iterator = @\seebelow@; // freestanding - template + template<@\libconcept{semiregular}@ S> using const_sentinel = @\seebelow@; // freestanding // \ref{const.iterators.iterator}, class template \tcode{basic_const_iterator} @@ -365,7 +365,7 @@ template<@\libconcept{input_iterator}@ I> constexpr const_iterator make_const_iterator(I it) { return it; } // freestanding - template + template<@\libconcept{semiregular}@ S> constexpr const_sentinel make_const_sentinel(S s) { return s; } // freestanding // \ref{move.iterators}, move iterators and sentinels @@ -4199,7 +4199,7 @@ \end{itemdescr} \begin{itemdecl} -template +template<@\libconcept{semiregular}@ S> using @\libglobal{const_sentinel}@ = @\seebelow@; \end{itemdecl} From 3045e51fae5705123622f81e050dec64368e22b4 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 21:13:17 -0800 Subject: [PATCH 186/257] LWG3770 const_sentinel_t is missing --- source/ranges.tex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/ranges.tex b/source/ranges.tex index 83fa5087ec..2367218c37 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -66,6 +66,8 @@ using sentinel_t = decltype(ranges::end(declval())); // freestanding template<@\libconcept{range}@ R> using const_iterator_t = const_iterator>; // freestanding + template<@\libconcept{range}@ R> + using const_sentinel_t = const_sentinel>; // freestanding template<@\libconcept{range}@ R> using range_difference_t = iter_difference_t>; // freestanding template<@\libconcept{sized_range}@ R> From c83caad348c97a3000877df8db813d23a07da56f Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 21:16:21 -0800 Subject: [PATCH 187/257] LWG3773 views::zip_transform still requires F to be copy_constructible when empty pack --- source/ranges.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index 2367218c37..61b250fe1f 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -9995,7 +9995,7 @@ let \tcode{FD} be \tcode{decay_t}. \begin{itemize} \item -If \tcode{\libconcept{copy_constructible} \&\& +If \tcode{\libconcept{move_constructible} \&\& \libconcept{regular_invocable}} is \tcode{false}, or if \tcode{decay_t>} is not an object type, \tcode{views::zip_transform(F, Es...)} is ill-formed. From 60c60bb48da01db5276e02d8a254366bc98c16a8 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 21:18:13 -0800 Subject: [PATCH 188/257] LWG3774 should include --- source/containers.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/containers.tex b/source/containers.tex index f34b7695ae..3d02687b11 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -13297,6 +13297,7 @@ \indexheader{flat_set}% \begin{codeblock} +#include // see \ref{compare.syn} #include // see \ref{initializer.list.syn} namespace std { From 6b5633081d5aa029e404c7b53cc9f04002bfbd5a Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 21:45:26 -0800 Subject: [PATCH 189/257] LWG3775 Broken dependencies in the Cpp17Allocator requirements --- source/lib-intro.tex | 78 ++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 5fc5814457..69e0869379 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -2047,11 +2047,11 @@ \begin{itemdescr} \pnum \mandates -\tcode{X::pointer} is convertible to \tcode{X::const_pointer}. +\tcode{XX::pointer} is convertible to \tcode{XX::const_pointer}. \pnum \remarks -Default: \tcode{pointer_traits::rebind} +Default: \tcode{pointer_traits::rebind} \end{itemdescr} \begin{itemdecl} @@ -2062,13 +2062,13 @@ \begin{itemdescr} \pnum \mandates -\tcode{X::pointer} is convertible to \tcode{X::void_pointer}. -\tcode{X::void_pointer} and \tcode{Y::void_pointer} are the same type. +\tcode{XX::pointer} is convertible to \tcode{XX::void_pointer}. +\tcode{XX::void_pointer} and \tcode{YY::void_pointer} are the same type. \pnum \remarks Default: -\tcode{pointer_traits::rebind} +\tcode{pointer_traits::rebind} \end{itemdescr} \begin{itemdecl} @@ -2079,15 +2079,15 @@ \begin{itemdescr} \pnum \mandates -\tcode{X::pointer}, \tcode{X::const_pointer}, and \tcode{X::void_pointer} -are convertible to \tcode{X::const_void_pointer}. -\tcode{X::const_void_pointer} and \tcode{Y::const_void_pointer} +\tcode{XX::pointer}, \tcode{XX::const_pointer}, and \tcode{XX::void_pointer} +are convertible to \tcode{XX::const_void_pointer}. +\tcode{XX::const_void_pointer} and \tcode{YY::const_void_pointer} are the same type. \pnum \remarks Default: -\tcode{pointer_traits::rebind} +\tcode{pointer_traits::rebind} \end{itemdescr} \begin{itemdecl} @@ -2113,7 +2113,7 @@ \pnum \remarks Default: -\tcode{make_unsigned_t} +\tcode{make_unsigned_t} \end{itemdescr} \begin{itemdecl} @@ -2129,7 +2129,7 @@ \pnum \remarks Default: -\tcode{pointer_traits::difference_type} +\tcode{pointer_traits::difference_type} \end{itemdescr} \begin{itemdecl} @@ -2144,7 +2144,7 @@ \pnum \ensures For all \tcode{U} (including \tcode{T}), -\tcode{Y::template rebind::other} is \tcode{X}. +\tcode{YY::rebind_alloc} is \tcode{X}. \pnum \remarks @@ -2230,41 +2230,41 @@ \end{itemdescr} \begin{itemdecl} -static_cast(w) +static_cast(w) \end{itemdecl} \begin{itemdescr} \pnum \result -\tcode{X::pointer} +\tcode{XX::pointer} \pnum \ensures -\tcode{static_cast(w) == p}. +\tcode{static_cast(w) == p}. \end{itemdescr} \begin{itemdecl} -static_cast(x) +static_cast(x) \end{itemdecl} \begin{itemdescr} \pnum \result -\tcode{X::const_pointer} +\tcode{XX::const_pointer} \pnum \ensures -\tcode{static_cast(x) == q}. +\tcode{static_cast(x) == q}. \end{itemdescr} \begin{itemdecl} -pointer_traits::pointer_to(r) +pointer_traits::pointer_to(r) \end{itemdecl} \begin{itemdescr} \pnum \result -\tcode{X::pointer} +\tcode{XX::pointer} \pnum \ensures @@ -2278,7 +2278,7 @@ \begin{itemdescr} \pnum \result -\tcode{X::pointer} +\tcode{XX::pointer} \pnum \effects @@ -2316,7 +2316,7 @@ \begin{itemdescr} \pnum \result -\tcode{X::pointer} +\tcode{XX::pointer} \pnum \effects @@ -2335,11 +2335,11 @@ \begin{itemdescr} \pnum \result -\tcode{allocation_result} +\tcode{allocation_result} \pnum \returns -\tcode{allocation_result\{ptr, count\}} +\tcode{allocation_result\{ptr, count\}} where \tcode{ptr} is memory allocated for an array of \tcode{count} \tcode{T} and such an object is created but array elements are not constructed, such that $\tcode{count} \geq \tcode{n}$. @@ -2397,11 +2397,11 @@ \begin{itemdescr} \pnum \result -\tcode{X::size_type} +\tcode{XX::size_type} \pnum \returns -The largest value that can meaningfully be passed to \tcode{X::allocate()}. +The largest value \tcode{n} that can meaningfully be passed to \tcode{a.allocate(n)}. \pnum \remarks @@ -2458,7 +2458,7 @@ \pnum \returns -\tcode{a == Y::rebind::other(b)}. +\tcode{a == YY::rebind_alloc(b)}. \end{itemdescr} \begin{itemdecl} @@ -2677,43 +2677,43 @@ \pnum An allocator type \tcode{X} shall meet the \oldconcept{CopyConstructible} requirements (\tref{cpp17.copyconstructible}). -The \tcode{X::pointer}, \tcode{X::const_pointer}, \tcode{X::void_pointer}, and -\tcode{X::const_void_pointer} types shall meet the +The \tcode{XX::pointer}, \tcode{XX::const_pointer}, \tcode{XX::void_pointer}, and +\tcode{XX::const_void_pointer} types shall meet the \oldconcept{Nullable\-Pointer} requirements (\tref{cpp17.nullablepointer}). No constructor, comparison operator function, copy operation, move operation, or swap operation on -these pointer types shall exit via an exception. \tcode{X::pointer} and \tcode{X::const_pointer} shall also +these pointer types shall exit via an exception. \tcode{XX::pointer} and \tcode{XX::const_pointer} shall also meet the requirements for a \oldconcept{RandomAccessIterator}\iref{random.access.iterators} and -the additional requirement that, when \tcode{a} and \tcode{(a + n)} are +the additional requirement that, when \tcode{p} and \tcode{(p + n)} are dereferenceable pointer values for some integral value \tcode{n}, \begin{codeblock} -addressof(*(a + n)) == addressof(*a) + n +addressof(*(p + n)) == addressof(*p) + n \end{codeblock} is \tcode{true}. \pnum Let \tcode{x1} and \tcode{x2} denote objects of (possibly different) types -\tcode{X::void_pointer}, \tcode{X::const_void_pointer}, \tcode{X::pointer}, -or \tcode{X::const_pointer}. Then, \tcode{x1} and \tcode{x2} are +\tcode{XX::void_pointer}, \tcode{XX::const_void_pointer}, \tcode{XX::pointer}, +or \tcode{XX::const_pointer}. Then, \tcode{x1} and \tcode{x2} are \defn{equivalently-valued} pointer values, if and only if both \tcode{x1} and \tcode{x2} can be explicitly converted to the two corresponding objects \tcode{px1} and \tcode{px2} -of type \tcode{X::const_pointer}, using a sequence of \keyword{static_cast}s +of type \tcode{XX::const_pointer}, using a sequence of \keyword{static_cast}s using only these four types, and the expression \tcode{px1 == px2} evaluates to \tcode{true}. \pnum -Let \tcode{w1} and \tcode{w2} denote objects of type \tcode{X::void_pointer}. +Let \tcode{w1} and \tcode{w2} denote objects of type \tcode{XX::void_pointer}. Then for the expressions \begin{codeblock} w1 == w2 w1 != w2 \end{codeblock} either or both objects may be replaced by an equivalently-valued object of type -\tcode{X::const_void_pointer} with no change in semantics. +\tcode{XX::const_void_pointer} with no change in semantics. \pnum -Let \tcode{p1} and \tcode{p2} denote objects of type \tcode{X::pointer}. +Let \tcode{p1} and \tcode{p2} denote objects of type \tcode{XX::pointer}. Then for the expressions \begin{codeblock} p1 == p2 @@ -2725,7 +2725,7 @@ p1 - p2 \end{codeblock} either or both objects may be replaced by an equivalently-valued object of type -\tcode{X::const_pointer} with no change in semantics. +\tcode{XX::const_pointer} with no change in semantics. \pnum An allocator may constrain the types on which it can be instantiated and the From fc94532f86cbacf90ce54c5720823664b044e172 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 22:12:48 -0800 Subject: [PATCH 190/257] LWG3778 vector missing exception specifications --- source/containers.tex | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 3d02687b11..5c2e399ea2 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -9166,8 +9166,8 @@ }; // construct/copy/destroy - constexpr vector() : vector(Allocator()) { } - constexpr explicit vector(const Allocator&); + constexpr vector() noexcept(noexcept(Allocator())) : vector(Allocator()) { } + constexpr explicit vector(const Allocator&) noexcept; constexpr explicit vector(size_type n, const Allocator& = Allocator()); constexpr vector(size_type n, const bool& value, const Allocator& = Allocator()); template @@ -9175,13 +9175,15 @@ template<@\exposconcept{container-compatible-range}@ R> constexpr vector(from_range_t, R&& rg, const Allocator& = Allocator()); constexpr vector(const vector& x); - constexpr vector(vector&& x); + constexpr vector(vector&& x) noexcept; constexpr vector(const vector&, const type_identity_t&); constexpr vector(vector&&, const type_identity_t&); constexpr vector(initializer_list, const Allocator& = Allocator()); constexpr ~vector(); constexpr vector& operator=(const vector& x); - constexpr vector& operator=(vector&& x); + constexpr vector& operator=(vector&& x) + noexcept(allocator_traits::propagate_on_container_move_assignment::value || + allocator_traits::is_always_equal::value); constexpr vector& operator=(initializer_list); template constexpr void assign(InputIterator first, InputIterator last); @@ -9243,7 +9245,9 @@ constexpr iterator erase(const_iterator position); constexpr iterator erase(const_iterator first, const_iterator last); - constexpr void swap(vector&); + constexpr void swap(vector&) + noexcept(allocator_traits::propagate_on_container_swap::value || + allocator_traits::is_always_equal::value); static constexpr void swap(reference x, reference y) noexcept; constexpr void flip() noexcept; // flips all bits constexpr void clear() noexcept; From b660805376cda6d178e0426f1b2c3c2aa6a02a97 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 22:17:19 -0800 Subject: [PATCH 191/257] LWG3781 The exposition-only alias templates cont-key-type and cont-mapped-type should be removed --- source/containers.tex | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 5c2e399ea2..143eda4f32 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -13158,18 +13158,6 @@ defined in \ref{associative.general} may appear in deduction guides for container adaptors. -\pnum -The following exposition-only alias templates may appear in deduction guides -for container adaptors: -\begin{codeblock} -template - using @\exposid{cont-key-type}@ = // \expos - remove_const_t; -template - using @\exposid{cont-mapped-type}@ = // \expos - typename Container::value_type::second_type; -\end{codeblock} - \rSec2[queue.syn]{Header \tcode{} synopsis} \indexheader{queue} From 14dfafe0a959a8a69c525a84237952d60f52fbbf Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 22:21:51 -0800 Subject: [PATCH 192/257] LWG3782 Should declare ::lerp? --- source/support.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/support.tex b/source/support.tex index 924d9b45f2..635ea42d5c 100644 --- a/source/support.tex +++ b/source/support.tex @@ -6158,6 +6158,7 @@ header is placed within the global namespace scope, except for the functions described in \ref{sf.cmath}, +the \tcode{std::lerp} function overloads\iref{c.math.lerp}, the declaration of \tcode{std::byte}\iref{cstddef.syn}, and the functions and function templates described in \ref{support.types.byteops}. It is unspecified whether these names are first declared or defined within From ccc54fb20b15be879a921e45eff95bcd0e7b69cd Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 22:26:19 -0800 Subject: [PATCH 193/257] LWG3784 std.compat should not provide ::byte and its friends --- source/lib-intro.tex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 69e0869379..c7d62f3ce3 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1396,7 +1396,9 @@ additionally exports declarations in the global namespace corresponding to the declarations in namespace \tcode{std} that are provided by -the \Cpp{} headers for C library facilities~(\tref{headers.cpp.c}). +the \Cpp{} headers for C library facilities~(\tref{headers.cpp.c}), +except the explicitly excluded declarations +described in \ref{support.c.headers.other}. \pnum It is unspecified to which module a declaration in the standard library From 0077d295fa637c602965b679a116e8835fd873f3 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 22:32:11 -0800 Subject: [PATCH 194/257] LWG3785 ranges::to is over-constrained on the destination type being a range --- source/ranges.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index 61b250fe1f..4222324f20 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2300,7 +2300,8 @@ constructed from the elements of \tcode{r} in the following manner: \begin{itemize} \item -If \tcode{\libconcept{convertible_to}, range_value_t>} +If \tcode{C} does not satisfy \libconcept{input_range} or +\tcode{\libconcept{convertible_to}, range_value_t>} is \tcode{true}: \begin{itemize} \item From 75fdbc8f8c14c2bf66dd0247241c74465e5639b3 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 22:42:22 -0800 Subject: [PATCH 195/257] LWG3788 jthread::operator=(jthread&&) postconditions are unimplementable under self-assignment --- source/threads.tex | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/threads.tex b/source/threads.tex index d0ddcfb1ce..dcc3ae6006 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -1756,19 +1756,18 @@ \begin{itemdescr} \pnum \effects -If \tcode{joinable()} is \tcode{true}, -calls \tcode{request_stop()} and then \tcode{join()}. -Assigns the state of \tcode{x} to \tcode{*this} +If \tcode{\&x == this} is \tcode{true}, there are no effects. +Otherwise, if \tcode{joinable()} is \tcode{true}, +calls \tcode{request_stop()} and then \tcode{join()}, +then assigns the state of \tcode{x} to \tcode{*this} and sets \tcode{x} to a default constructed state. \pnum \ensures -\tcode{x.get_id() == id()} -and \tcode{get_id()} returns the value of \tcode{x.get_id()} +\tcode{get_id()} returns the value of \tcode{x.get_id()} prior to the assignment. \tcode{ssource} has the value of \tcode{x.ssource} -prior to the assignment -and \tcode{x.ssource.stop_possible()} is \tcode{false}. +prior to the assignment. \pnum \returns From 26f99d40618a50a23cc43c7a63048614db61c8fa Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 22:49:13 -0800 Subject: [PATCH 196/257] LWG3792 __cpp_lib_constexpr_algorithms should also be defined in --- source/support.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/support.tex b/source/support.tex index 635ea42d5c..f7e00951ff 100644 --- a/source/support.tex +++ b/source/support.tex @@ -591,7 +591,7 @@ #define @\defnlibxname{cpp_lib_clamp}@ 201603L // also in \libheader{algorithm} #define @\defnlibxname{cpp_lib_complex_udls}@ 201309L // also in \libheader{complex} #define @\defnlibxname{cpp_lib_concepts}@ 202207L // also in \libheader{concepts}, \libheader{compare} -#define @\defnlibxname{cpp_lib_constexpr_algorithms}@ 201806L // also in \libheader{algorithm} +#define @\defnlibxname{cpp_lib_constexpr_algorithms}@ 201806L // also in \libheader{algorithm}, \libheader{utility} #define @\defnlibxname{cpp_lib_constexpr_bitset}@ 202202L // also in \libheader{bitset} #define @\defnlibxname{cpp_lib_constexpr_charconv}@ 202207L // also in \libheader{charconv} #define @\defnlibxname{cpp_lib_constexpr_cmath}@ 202202L // also in \libheader{cmath}, \libheader{cstdlib} From 9839456b7cc5f771dac2a85ff53bf2d15d54f484 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 23:43:21 -0800 Subject: [PATCH 197/257] LWG3795 Self-move-assignment of std::future and std::shared_future have unimplementable postconditions --- source/threads.tex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/threads.tex b/source/threads.tex index dcc3ae6006..c40a7c6511 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -10576,6 +10576,8 @@ \begin{itemdescr} \pnum \effects +If \tcode{addressof(rhs) == this} is \tcode{true}, there are no effects. +Otherwise: \begin{itemize} \item Releases any shared state\iref{futures.state}. @@ -10591,6 +10593,7 @@ assignment. \item +If \tcode{addressof(rhs) == this} is \tcode{false}, \tcode{rhs.valid() == false}. \end{itemize} \end{itemdescr} @@ -10897,6 +10900,8 @@ \begin{itemdescr} \pnum \effects +If \tcode{addressof(rhs) == this} is \tcode{true}, there are no effects. +Otherwise: \begin{itemize} \item Releases any shared state\iref{futures.state}; @@ -10912,6 +10917,7 @@ the assignment. \item +If \tcode{addressof(rhs) == this} is \tcode{false}, \tcode{rhs.valid() == false}. \end{itemize} \end{itemdescr} @@ -10924,6 +10930,8 @@ \begin{itemdescr} \pnum \effects +If \tcode{addressof(rhs) == this} is \tcode{true}, there are no effects. +Otherwise: \begin{itemize} \item Releases any shared state\iref{futures.state}; From 9925f3a0519ca9f20b431d4041e1d4d67e5cadcb Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 23:55:23 -0800 Subject: [PATCH 198/257] LWG3796 movable-box as member should use default-initialization instead of copy-initialization --- source/ranges.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 4222324f20..7bf21b71a4 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -3416,7 +3416,7 @@ // \ref{range.repeat.iterator}, class \tcode{repeat_view::\exposid{iterator}} struct @\exposidnc{iterator}@; // \expos - @\exposidnc{movable-box}@ @\exposid{value_}@ = W(); // \expos, see \ref{range.move.wrap} + @\exposidnc{movable-box}@ @\exposid{value_}@; // \expos, see \ref{range.move.wrap} Bound @\exposid{bound_}@ = Bound(); // \expos public: @@ -13308,7 +13308,7 @@ requires @\libconcept{view}@ && is_object_v class chunk_by_view : public view_interface> { V @\exposid{base_}@ = V(); // \expos - @\exposidnc{movable-box}@ @\exposid{pred_}@ = Pred(); // \expos + @\exposidnc{movable-box}@ @\exposid{pred_}@; // \expos // \ref{range.chunk.by.iter}, class \tcode{chunk_by_view::\exposid{iterator}} class @\exposidnc{iterator}@; // \expos From 8b08ed27847db2c39ad7c334345a5b99c264776f Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 00:46:08 -0800 Subject: [PATCH 199/257] LWG3798 Rvalue reference and iterator_category --- source/iterators.tex | 2 +- source/ranges.tex | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index de89d31340..a0c8cbdb8b 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -946,7 +946,7 @@ template concept @\defexposconcept{cpp17-forward-iterator}@ = @\exposconcept{cpp17-input-iterator}@ && @\libconcept{constructible_from}@ && - is_lvalue_reference_v> && + is_reference_v> && @\libconcept{same_as}@>, typename indirectly_readable_traits::value_type> && requires(I i) { diff --git a/source/ranges.tex b/source/ranges.tex index 7bf21b71a4..21314d8f6b 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -5231,7 +5231,7 @@ \tcode{iterator_traits>::iterator_category}. \begin{itemize} \item -If \tcode{is_lvalue_reference_v\&, range_reference_t<\linebreak\exposid{Base}>>>} +If \tcode{is_reference_v\&, range_reference_t<\exposid{Base}>>>} is \tcode{true}, then \begin{itemize} \item @@ -7110,8 +7110,8 @@ \item If \begin{codeblock} -is_lvalue_reference_v, - iter_reference_t<@\exposid{PatternIter}@>>> +is_reference_v, + iter_reference_t<@\exposid{PatternIter}@>>> \end{codeblock} is \tcode{false}, \tcode{iterator_category} denotes \tcode{input_iterator_tag}. @@ -10180,7 +10180,7 @@ \begin{codeblock} invoke_result_t<@\exposid{maybe-const}@&, range_reference_t<@\exposid{maybe-const}@>...> \end{codeblock} -is not an lvalue reference, +is not a reference, \tcode{iterator_category} denotes \tcode{input_iterator_tag}. \item Otherwise, let \tcode{Cs} denote the pack of types @@ -11330,7 +11330,7 @@ \item If \tcode{invoke_result_t<\exposid{maybe-const}\&, \exposid{REPEAT}(range_reference_t<\exposid{Base}>, N)...>} -is\linebreak not an lvalue reference, +is\linebreak not a reference, \tcode{iterator_category} denotes \tcode{input_iterator_tag}. \item Otherwise, let \tcode{C} denote the type From 890ba0b6c527bf07b01064f433190a81070f693d Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 01:00:45 -0800 Subject: [PATCH 200/257] LWG3801 cartesian_product_view::iterator::distance-from ignores the size of last underlying range --- source/ranges.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index 21314d8f6b..32a887d8d0 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -14622,7 +14622,7 @@ $\exposid{scaled-size}(N)$ be the product of \tcode{static_cast(ranges::size(std::get<\brk{}$N$>(\exposid{parent_}->\exposid{bases_})))} and $\exposid{scaled-size}(N+1)$ -if $N < \tcode{sizeof...(Vs)}$, otherwise \tcode{static_cast(1)}; +if $N \le \tcode{sizeof...(Vs)}$, otherwise \tcode{static_cast(1)}; \item $\exposid{scaled-distance}(N)$ be the product of \tcode{static_cast(std::get<$N$>(\exposid{cur\-rent_}) - std::get<$N$>(t))} and $\exposid{scaled-size}(N+1)$; and From 86a1ffc1307806a1b963c954ed0dce8880c6f4f4 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 06:29:43 -0800 Subject: [PATCH 201/257] =?UTF-8?q?LWG3515=20=C2=A7[stacktrace.basic.nonme?= =?UTF-8?q?m]:=20operator<<=20should=20be=20less=20templatized?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/diagnostics.tex | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/source/diagnostics.tex b/source/diagnostics.tex index b9398520d0..8d86e3731d 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -1752,13 +1752,9 @@ template string to_string(const basic_stacktrace& st); - template - basic_ostream& - operator<<(basic_ostream& os, const stacktrace_entry& f); - - template - basic_ostream& - operator<<(basic_ostream& os, const basic_stacktrace& st); + ostream& operator<<(ostream& os, const stacktrace_entry& f); + template + ostream& operator<<(ostream& os, const basic_stacktrace& st); namespace pmr { using stacktrace = basic_stacktrace>; @@ -2391,9 +2387,7 @@ \indexlibrarymember{operator<<}{stacktrace_entry}% \begin{itemdecl} -template -basic_ostream& - operator<<(basic_ostream& os, const stacktrace_entry& f); +ostream& operator<<(ostream& os, const stacktrace_entry& f); \end{itemdecl} \begin{itemdescr} @@ -2404,9 +2398,8 @@ \indexlibrarymember{operator<<}{basic_stacktrace}% \begin{itemdecl} -template -basic_ostream& - operator<<(basic_ostream& os, const basic_stacktrace& st); +template + ostream& operator<<(ostream& os, const basic_stacktrace& st); \end{itemdecl} \begin{itemdescr} From 871cf9789fd09a9074e20a7a5acfc02071fe0f2c Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 07:15:38 -0800 Subject: [PATCH 202/257] LWG3569 join_view fails to support ranges of ranges with non-default_initializable iterators --- source/ranges.tex | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 32a887d8d0..0749777c5d 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -6497,7 +6497,7 @@ is_reference_v>; @\exposidnc{OuterIter}@ @\exposid{outer_}@ = @\exposidnc{OuterIter}@(); // \expos - @\exposidnc{InnerIter}@ @\exposid{inner_}@ = @\exposidnc{InnerIter}@(); // \expos + optional<@\exposidnc{InnerIter}@> @\exposid{inner_}@; // \expos @\exposidnc{Parent}@* @\exposid{parent_}@ = nullptr; // \expos constexpr void @\exposidnc{satisfy}@(); // \expos @@ -6508,15 +6508,14 @@ using value_type = range_value_t>; using difference_type = @\seebelow@; - @\exposid{iterator}@() requires @\libconcept{default_initializable}@<@\exposid{OuterIter}@> && - @\itcorr[-2]\libconcept{default_initializable}@<@\exposid{InnerIter}@> = default; + @\exposid{iterator}@() requires @\libconcept{default_initializable}@<@\exposid{OuterIter}@> = default; constexpr @\exposid{iterator}@(@\exposid{Parent}@& parent, @\exposid{OuterIter}@ outer); constexpr @\exposid{iterator}@(@\exposid{iterator}@ i) requires Const && @\libconcept{convertible_to}@, @\exposid{OuterIter}@> && @\libconcept{convertible_to}@, @\exposid{InnerIter}@>; - constexpr decltype(auto) operator*() const { return *@\exposid{inner_}@; } + constexpr decltype(auto) operator*() const { return **@\exposid{inner_}@; } constexpr @\exposid{InnerIter}@ operator->() const requires @\exposconcept{has-arrow}@<@\exposid{InnerIter}@> && @\libconcept{copyable}@<@\exposid{InnerIter}@>; @@ -6542,12 +6541,12 @@ @\libconcept{equality_comparable}@>>; friend constexpr decltype(auto) iter_move(const @\exposid{iterator}@& i) - noexcept(noexcept(ranges::iter_move(i.@\exposid{inner_}@))) { - return ranges::iter_move(i.@\exposid{inner_}@); + noexcept(noexcept(ranges::iter_move(*i.@\exposid{inner_}@))) { + return ranges::iter_move(*i.@\exposid{inner_}@); } friend constexpr void iter_swap(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) - noexcept(noexcept(ranges::iter_swap(x.@\exposid{inner_}@, y.@\exposid{inner_}@))) + noexcept(noexcept(ranges::iter_swap(*x.@\exposid{inner_}@, *y.@\exposid{inner_}@))) requires @\libconcept{indirectly_swappable}@<@\exposid{InnerIter}@>; }; } @@ -6624,11 +6623,11 @@ for (; @\exposid{outer_}@ != ranges::end(@\exposid{parent_}@->@\exposid{base_}@); ++@\exposid{outer_}@) { auto&& inner = update_inner(@\exposid{outer_}@); @\exposid{inner_}@ = ranges::begin(inner); - if (@\exposid{inner_}@ != ranges::end(inner)) + if (*@\exposid{inner_}@ != ranges::end(inner)) return; } if constexpr (@\exposid{ref-is-glvalue}@) - @\exposid{inner_}@ = @\exposid{InnerIter}@(); + @\exposid{inner_}@.reset(); \end{codeblock} \end{itemdescr} @@ -6669,7 +6668,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to \tcode{return \exposid{inner_};} +Equivalent to: \tcode{return *\exposid{inner_};} \end{itemdescr} \indexlibrarymember{operator++}{join_view::\exposid{iterator}}% @@ -6690,7 +6689,7 @@ Equivalent to: \begin{codeblock} auto&& inner_rng = @\placeholder{inner-range}@; -if (++@\exposid{inner_}@ == ranges::end(inner_rng)) { +if (++*@\exposid{inner_}@ == ranges::end(inner_rng)) { ++@\exposid{outer_}@; @\exposid{satisfy}@(); } @@ -6742,9 +6741,9 @@ \begin{codeblock} if (@\exposid{outer_}@ == ranges::end(@\exposid{parent_}@->@\exposid{base_}@)) @\exposid{inner_}@ = ranges::end(*--@\exposid{outer_}@); -while (@\exposid{inner_}@ == ranges::begin(*@\exposid{outer_}@)) - @\exposid{inner_}@ = ranges::end(*--@\exposid{outer_}@); ---@\exposid{inner_}@; +while (*@\exposid{inner_}@ == ranges::begin(*@\exposid{outer_}@)) + *@\exposid{inner_}@ = ranges::end(*--@\exposid{outer_}@); +--*@\exposid{inner_}@; return *this; \end{codeblock} \end{itemdescr} @@ -6785,14 +6784,14 @@ \indexlibrarymember{iter_swap}{join_view::\exposid{iterator}}% \begin{itemdecl} friend constexpr void iter_swap(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y) - noexcept(noexcept(ranges::iter_swap(x.@\exposid{inner_}@, y.@\exposid{inner_}@))) + noexcept(noexcept(ranges::iter_swap(*x.@\exposid{inner_}@, *y.@\exposid{inner_}@))) requires @\libconcept{indirectly_swappable}@<@\exposid{InnerIter}@>; \end{itemdecl} \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return ranges::iter_swap(x.\exposid{inner_}, y.\exposid{inner_});} +Equivalent to: \tcode{return ranges::iter_swap(*x.\exposid{inner_}, *y.\exposid{inner_});} \end{itemdescr} \rSec3[range.join.sentinel]{Class template \tcode{join_view::\exposid{sentinel}}} From e38d52197f5873c27276699327e36bfeca19849d Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 07:23:19 -0800 Subject: [PATCH 203/257] LWG3717 common_view::end should improve random_access_range case Partially fixes NB US 109 (C++23 CD). --- source/ranges.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 0749777c5d..0bcb802baf 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -8427,14 +8427,14 @@ constexpr auto end() { if constexpr (@\libconcept{random_access_range}@ && @\libconcept{sized_range}@) - return ranges::begin(@\exposid{base_}@) + ranges::size(@\exposid{base_}@); + return ranges::begin(@\exposid{base_}@) + ranges::distance(@\exposid{base_}@); else return common_iterator, sentinel_t>(ranges::end(@\exposid{base_}@)); } constexpr auto end() const requires @\libconcept{range}@ { if constexpr (@\libconcept{random_access_range}@ && @\libconcept{sized_range}@) - return ranges::begin(@\exposid{base_}@) + ranges::size(@\exposid{base_}@); + return ranges::begin(@\exposid{base_}@) + ranges::distance(@\exposid{base_}@); else return common_iterator, sentinel_t>(ranges::end(@\exposid{base_}@)); } From 75834850a4f4dba53617be6731ac5116e4b0e272 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 08:06:10 -0800 Subject: [PATCH 204/257] LWG3737 take_view::sentinel should provide operator- Partially fixes NB US 109 (C++23 CD). --- source/ranges.tex | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/ranges.tex b/source/ranges.tex index 0bcb802baf..a192f7c1d6 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -5746,6 +5746,10 @@ auto sz = range_difference_t(size()); return counted_iterator(ranges::begin(@\exposid{base_}@), sz); } + } else if constexpr (@\libconcept{sized_sentinel_for}@, iterator_t>) { + auto it = ranges::begin(@\exposid{base_}@); + auto sz = std::min(@\exposid{count_}@, ranges::end(@\exposid{base_}@) - it); + return counted_iterator(std::move(it), sz); } else { return counted_iterator(ranges::begin(@\exposid{base_}@), @\exposid{count_}@); } @@ -5759,6 +5763,10 @@ auto sz = range_difference_t(size()); return counted_iterator(ranges::begin(@\exposid{base_}@), sz); } + } else if constexpr (@\libconcept{sized_sentinel_for}@, iterator_t>) { + auto it = ranges::begin(@\exposid{base_}@); + auto sz = std::min(@\exposid{count_}@, ranges::end(@\exposid{base_}@) - it); + return counted_iterator(std::move(it), sz); } else { return counted_iterator(ranges::begin(@\exposid{base_}@), @\exposid{count_}@); } @@ -5770,6 +5778,8 @@ return ranges::begin(@\exposid{base_}@) + range_difference_t(size()); else return default_sentinel; + } else if constexpr (@\libconcept{sized_sentinel_for}@, iterator_t>) { + return default_sentinel; } else { return @\exposid{sentinel}@{ranges::end(@\exposid{base_}@)}; } @@ -5781,6 +5791,8 @@ return ranges::begin(@\exposid{base_}@) + range_difference_t(size()); else return default_sentinel; + } else if constexpr (@\libconcept{sized_sentinel_for}@, iterator_t>) { + return default_sentinel; } else { return @\exposid{sentinel}@{ranges::end(@\exposid{base_}@)}; } From 863a4c296af9db22222028070044d654bb195930 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 09:34:29 -0800 Subject: [PATCH 205/257] LWG3753 Clarify entity vs. freestanding entity Fixes NB GB 075 (C++23 CD). --- source/lib-intro.tex | 72 +++++++++++++++++++++++++++----------------- source/utilities.tex | 3 +- 2 files changed, 47 insertions(+), 28 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index c7d62f3ce3..66f19e5103 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -914,32 +914,63 @@ \pnum An implementation may use any technique that provides equivalent observable behavior. -\rSec3[freestanding.entity]{Freestanding entities} +\rSec3[freestanding.item]{Freestanding items} \pnum -\indextext{entity!freestanding|see{freestanding entity}}% -A \defn{freestanding entity} is a declaration or macro definition -that is present in a freestanding implementation and a hosted implementation. +\indextext{item!freestanding|see{freestanding item}}% +A \defn{freestanding item} is +a declaration, entity, \grammarterm{typedef-name}, or macro +that is required to be present in +a freestanding implementation and a hosted implementation. \pnum Unless otherwise specified, -the requirements on freestanding entities on a freestanding implementation -are the same as the corresponding requirements in a hosted implementation. +the requirements on freestanding items for a freestanding implementation +are the same as the corresponding requirements for a hosted implementation, +except that not all of the members of the namespaces are required to be present. +\begin{note} +This implies that freestanding item enumerations have the same enumerators on +freestanding implementations and hosted implementations. +Furthermore, class types have the same members and +class templates have the same deduction guides +on freestanding implementations and hosted implementations. +\end{note} + +\pnum +\indextext{declaration!freestanding item}% +A declaration in a header synopsis is a freestanding item if +\begin{itemize} +\item it is followed by a comment that includes \textit{freestanding}, or +\item the header synopsis begins with a comment that includes \textit{all freestanding}. +\end{itemize} + +\pnum +\indextext{entity!freestanding item}% +\indextext{\idxgram{typedef-name}!freestanding item}% +An entity or \grammarterm{typedef-name} is a freestanding item if it is: +\begin{itemize} +\item introduced by a declaration that is a freestanding item, +\item an enclosing namespace of a freestanding item, +\item a friend of a freestanding item, +\item denoted by a \grammarterm{typedef-name} that is a freestanding item, or +\item denoted by an alias template that is a freestanding item. +\end{itemize} + +\pnum +\indextext{macro!freestanding item}% +A macro is a freestanding item if it is defined in a header synopsis and +\begin{itemize} +\item the definition is followed by a comment that includes \textit{freestanding}, or +\item the header synopsis begins with a comment that includes \textit{all freestanding}. +\end{itemize} \pnum -In a header synopsis, entities followed with a comment -that includes \textit{freestanding} are freestanding entities. \begin{example} \begin{codeblock} #define NULL @\seebelow@ // freestanding \end{codeblock} \end{example} -\pnum -If a header synopsis begins with a comment -that includes \textit{all freestanding}, -then all of the declarations and macro definitions in the header synopsis -are freestanding entities. \begin{example} \begin{codeblock} // all freestanding @@ -947,19 +978,6 @@ \end{codeblock} \end{example} -\pnum -Deduction guides for freestanding entity class templates are freestanding entities. - -\pnum -Enclosing namespaces of freestanding entities are freestanding entities. - -\pnum -Friends of freestanding entities are freestanding entities. - -\pnum -Entities denoted by freestanding entity \grammarterm{typedef-name}{s} and -freestanding entity alias templates are freestanding entities. - \rSec1[requirements]{Library-wide requirements} \rSec2[requirements.general]{General} @@ -1480,7 +1498,7 @@ \pnum For each of the headers listed in \tref{headers.cpp.fs}, a freestanding implementation provides at least -the freestanding entities\iref{freestanding.entity} declared in the header. +the freestanding items\iref{freestanding.item} declared in the header. \indextext{implementation!freestanding|)}% \pnum diff --git a/source/utilities.tex b/source/utilities.tex index f815f22eab..9e832c9293 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -11833,7 +11833,8 @@ \indextext{function object!binders|)} \pnum -Placeholders are freestanding entities\iref{freestanding.entity}. +\indextext{placeholders!freestanding item}% +Placeholders are freestanding items\iref{freestanding.item}. \rSec2[func.memfn]{Function template \tcode{mem_fn}}% \indextext{function object!\idxcode{mem_fn}|(} From abe69470342669d5c26a14c679ecdbc4d0bc770c Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 09:53:10 -0800 Subject: [PATCH 206/257] LWG3766 view_interface::cbegin is underconstrained --- source/ranges.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index a192f7c1d6..dc9283b701 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1696,16 +1696,16 @@ return ranges::begin(@\exposid{derived}@()) == ranges::end(@\exposid{derived}@()); } - constexpr auto cbegin() { + constexpr auto cbegin() requires @\libconcept{input_range}@ { return ranges::cbegin(@\exposid{derived}@()); } - constexpr auto cbegin() const requires @\libconcept{range}@ { + constexpr auto cbegin() const requires @\libconcept{input_range}@ { return ranges::cbegin(@\exposid{derived}@()); } - constexpr auto cend() { + constexpr auto cend() requires @\libconcept{input_range}@ { return ranges::cend(@\exposid{derived}@()); } - constexpr auto cend() const requires @\libconcept{range}@ { + constexpr auto cend() const requires @\libconcept{input_range}@ { return ranges::cend(@\exposid{derived}@()); } From d4e29f50cf09a6a5f06b4545985ed95ac8372164 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 10:44:59 -0800 Subject: [PATCH 207/257] LWG3814 Add freestanding items requested by NB comments Fixes NB GB 085, GB 110, (partially) GB 130 (C++23 CD). --- source/memory.tex | 17 +++++++++-------- source/ranges.tex | 15 ++++++++------- source/threads.tex | 14 +++++++------- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/source/memory.tex b/source/memory.tex index 7bb0f232dc..b822977608 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -86,21 +86,22 @@ // \ref{obj.lifetime}, explicit lifetime management template - T* start_lifetime_as(void* p) noexcept; + T* start_lifetime_as(void* p) noexcept; // freestanding template - const T* start_lifetime_as(const void* p) noexcept; + const T* start_lifetime_as(const void* p) noexcept; // freestanding template - volatile T* start_lifetime_as(volatile void* p) noexcept; + volatile T* start_lifetime_as(volatile void* p) noexcept; // freestanding template - const volatile T* start_lifetime_as(const volatile void* p) noexcept; + const volatile T* start_lifetime_as(const volatile void* p) noexcept; // freestanding template - T* start_lifetime_as_array(void* p, size_t n) noexcept; + T* start_lifetime_as_array(void* p, size_t n) noexcept; // freestanding template - const T* start_lifetime_as_array(const void* p, size_t n) noexcept; + const T* start_lifetime_as_array(const void* p, size_t n) noexcept; // freestanding template - volatile T* start_lifetime_as_array(volatile void* p, size_t n) noexcept; + volatile T* start_lifetime_as_array(volatile void* p, size_t n) noexcept; // freestanding template - const volatile T* start_lifetime_as_array(const volatile void* p, size_t n) noexcept; + const volatile T* start_lifetime_as_array(const volatile void* p, // freestanding + size_t n) noexcept; // \ref{allocator.tag}, allocator argument tag struct allocator_arg_t { // freestanding diff --git a/source/ranges.tex b/source/ranges.tex index dc9283b701..f17487385c 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -214,9 +214,9 @@ template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t> requires (is_object_v && @\libconcept{same_as}@> && (@\exposid{is-integer-like}@ || @\libconcept{same_as}@)) - class repeat_view; + class repeat_view; // freestanding - namespace views { inline constexpr @\unspec@ repeat = @\unspec@; } + namespace views { inline constexpr @\unspecnc@ repeat = @\unspecnc@; } // freestanding // \ref{range.istream}, istream view template<@\libconcept{movable}@ Val, class CharT, class Traits = char_traits> @@ -513,19 +513,20 @@ // \ref{range.stride}, stride view template<@\libconcept{input_range}@ V> requires @\libconcept{view}@ - class stride_view; + class stride_view; // freestanding template - inline constexpr bool enable_borrowed_range> = enable_borrowed_range; + inline constexpr bool enable_borrowed_range> = // freestanding + enable_borrowed_range; - namespace views { inline constexpr @\unspecnc@ stride = @\unspecnc@; } + namespace views { inline constexpr @\unspecnc@ stride = @\unspecnc@; } // freestanding // \ref{range.cartesian}, cartesian product view template<@\libconcept{input_range}@ First, @\libconcept{forward_range}@... Vs> requires (@\libconcept{view}@ && ... && @\libconcept{view}@) - class cartesian_product_view; + class cartesian_product_view; // freestanding - namespace views { inline constexpr @\unspecnc@ cartesian_product = @\unspecnc@; } + namespace views { inline constexpr @\unspecnc@ cartesian_product = @\unspecnc@; } // freestanding } namespace std { diff --git a/source/threads.tex b/source/threads.tex index c40a7c6511..8e15c4c629 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -2049,13 +2049,13 @@ \begin{codeblock} namespace std { // \ref{atomics.order}, order and consistency - enum class memory_order : @\unspec@; // freestanding - inline constexpr memory_order memory_order_relaxed = memory_order::relaxed; - inline constexpr memory_order memory_order_consume = memory_order::consume; - inline constexpr memory_order memory_order_acquire = memory_order::acquire; - inline constexpr memory_order memory_order_release = memory_order::release; - inline constexpr memory_order memory_order_acq_rel = memory_order::acq_rel; - inline constexpr memory_order memory_order_seq_cst = memory_order::seq_cst; + enum class memory_order : @\unspecnc@; // freestanding + inline constexpr memory_order memory_order_relaxed = memory_order::relaxed; // freestanding + inline constexpr memory_order memory_order_consume = memory_order::consume; // freestanding + inline constexpr memory_order memory_order_acquire = memory_order::acquire; // freestanding + inline constexpr memory_order memory_order_release = memory_order::release; // freestanding + inline constexpr memory_order memory_order_acq_rel = memory_order::acq_rel; // freestanding + inline constexpr memory_order memory_order_seq_cst = memory_order::seq_cst; // freestanding template T kill_dependency(T y) noexcept; // freestanding From 40864020e5539cd3784a13e4682d26b84157cfba Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 11:09:42 -0800 Subject: [PATCH 208/257] LWG3816 flat_map and flat_multimap should impose sequence container requirements Fixes NB US 103 (C++23 CD). --- source/containers.tex | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index 143eda4f32..bf2e893458 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -14621,10 +14621,12 @@ \end{note} \pnum -Any sequence container\iref{sequence.reqmts} \tcode{C} -supporting \oldconcept{RandomAccessIterator} can be used -to instantiate \tcode{flat_map}, -as long as invocations of +Any type \tcode{C} +that meets the sequence container requirements\iref{sequence.reqmts} +can be used to instantiate \tcode{flat_map}, +as long as +\tcode{C::iterator} meets the \oldconcept{RandomAccessIterator} requirements and +invocations of member functions \tcode{C::size} and \tcode{C::max_size} do not exit via an exception. In particular, \tcode{vector}\iref{vector} and \tcode{deque}\iref{deque} can be used. @@ -15763,10 +15765,12 @@ \end{note} \pnum -Any sequence container\iref{sequence.reqmts} \tcode{C} -supporting \oldconcept{RandomAccessIterator} can be used to -instantiate \tcode{flat_multimap}, -as long as invocations of +Any type \tcode{C} +that meets the sequence container requirements\iref{sequence.reqmts} +can be used to instantiate \tcode{flat_multimap}, +as long as +\tcode{C::iterator} meets the \oldconcept{RandomAccessIterator} requirements and +invocations of member functions \tcode{C::size} and \tcode{C::max_size} do not exit via an exception. In particular, \tcode{vector}\iref{vector} and \tcode{deque}\iref{deque} can be used. From 10b87623bb236f5028b95ebb8f4a825a3ba431b9 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 13:18:02 -0800 Subject: [PATCH 209/257] LWG3817 Missing preconditions on forward_list modifiers Fixes NB GB 101 (C++23 CD). --- source/containers.tex | 46 +++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index bf2e893458..ca670748d3 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -7273,12 +7273,33 @@ \indexlibrarymember{insert_after}{forward_list}% \begin{itemdecl} iterator insert_after(const_iterator position, const T& x); +\end{itemdecl} + +\begin{itemdescr} +\pnum +\expects +\tcode{T} is \oldconcept{CopyInsertable} into \tcode{forward_list}. +\tcode{position} is \tcode{before_begin()} or is a dereferenceable +iterator in the range \range{begin()}{end()}. + +\pnum +\effects +Inserts a copy of \tcode{x} after \tcode{position}. + +\pnum +\returns +An iterator pointing to the copy of \tcode{x}. +\end{itemdescr} + +\indexlibrarymember{insert_after}{forward_list}% +\begin{itemdecl} iterator insert_after(const_iterator position, T&& x); \end{itemdecl} \begin{itemdescr} \pnum \expects +\tcode{T} is \oldconcept{MoveInsertable} into \tcode{forward_list}. \tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. @@ -7299,6 +7320,7 @@ \begin{itemdescr} \pnum \expects +\tcode{T} is \oldconcept{CopyInsertable} into \tcode{forward_list}. \tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. @@ -7308,7 +7330,8 @@ \pnum \returns -An iterator pointing to the last inserted copy of \tcode{x} or \tcode{position} if \tcode{n == 0}. +An iterator pointing to the last inserted copy of \tcode{x}, or +\tcode{position} if \tcode{n == 0} is \tcode{true}. \end{itemdescr} \indexlibrarymember{insert_after}{forward_list}% @@ -7320,6 +7343,8 @@ \begin{itemdescr} \pnum \expects +\tcode{T} is \oldconcept{EmplaceConstructible} into \tcode{forward_list} +from \tcode{*first}. \tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. Neither \tcode{first} nor \tcode{last} are iterators in \tcode{*this}. @@ -7330,7 +7355,8 @@ \pnum \returns -An iterator pointing to the last inserted element or \tcode{position} if \tcode{first == last}. +An iterator pointing to the last inserted element, or +\tcode{position} if \tcode{first == last} is \tcode{true}. \end{itemdescr} \indexlibrarymember{insert_range_after}{forward_list}% @@ -7342,7 +7368,9 @@ \begin{itemdescr} \pnum \expects -\tcode{position} is \tcode{before_begin()} or +\tcode{T} is \oldconcept{EmplaceConstructible} into \tcode{forward_list} +from \tcode{*ranges::begin(rg)}. +\tcode{posi\-tion} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. \tcode{rg} and \tcode{*this} do not overlap. @@ -7364,11 +7392,7 @@ \begin{itemdescr} \pnum \effects -\tcode{insert_after(position, il.begin(), il.end())}. - -\pnum -\returns -An iterator pointing to the last inserted element or \tcode{position} if \tcode{il} is empty. +Equivalent to: \tcode{return insert_after(position, il.begin(), il.end());} \end{itemdescr} @@ -7381,13 +7405,15 @@ \begin{itemdescr} \pnum \expects +\tcode{T} is \oldconcept{EmplaceConstructible} into \tcode{forward_list} +from \tcode{std::forward(\linebreak args)...}. \tcode{position} is \tcode{before_begin()} or is a dereferenceable iterator in the range \range{begin()}{end()}. \pnum \effects -Inserts an object of type \tcode{value_type} constructed with -\tcode{value_type(std::forward(\brk{}args)...)} after \tcode{position}. +Inserts an object of type \tcode{value_type} direct-non-list-initialized with +\tcode{std::forward(\linebreak args)...} after \tcode{position}. \pnum \returns From 29aeaf5197221634bcfa86aaa79c4274cbb6f670 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 13:47:21 -0800 Subject: [PATCH 210/257] LWG3818 Exposition-only concepts are not described in library intro Fixes NB GB 074 (C++23 CD). --- source/lib-intro.tex | 23 ++++------------------- source/xrefdelta.tex | 4 ++++ 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 66f19e5103..e0c0391224 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -478,13 +478,14 @@ implementation-defined types\iref{type.descriptions}, and member functions\iref{functions.within.classes}. -\rSec3[expos.only.func]{Exposition-only functions} +\rSec3[expos.only.entity]{Exposition-only entities, etc.} \pnum -Several function templates +Several entities and \grammarterm{typedef-name}{s} defined in \ref{\firstlibchapter} through \ref{\lastlibchapter} and \ref{depr} are only defined for the purpose of exposition. -The declaration of such a function is followed by a comment ending in \expos. +The declaration of such an entity or \grammarterm{typedef-name} +is followed by a comment ending in \expos. \pnum The following are defined for exposition only @@ -546,22 +547,6 @@ \indextext{types!implementation-defined}% They are based on other types, but with added constraints. -\rSec4[expos.only.types]{Exposition-only types} - -\pnum -Several types defined in \ref{\firstlibchapter} through \ref{\lastlibchapter} -and \ref{depr} are defined for the purpose of exposition. -The declaration of such a type is followed by a comment ending in \expos. -\begin{example} -\begin{codeblock} -namespace std { - extern "C" using @\placeholdernc{some-handler}@ = int(int, void*, double); // \expos -} -\end{codeblock} -The type placeholder \tcode{\placeholder{some-handler}} can now be used to specify a function -that takes a callback parameter with C language linkage. -\end{example} - \rSec4[enumerated.types]{Enumerated types} \pnum diff --git a/source/xrefdelta.tex b/source/xrefdelta.tex index 6145e0785c..d001fc93d8 100644 --- a/source/xrefdelta.tex +++ b/source/xrefdelta.tex @@ -106,5 +106,9 @@ % LWG3659 Consider ATOMIC_FLAG_INIT undeprecation \removedxref{depr.atomics.flag} +% LWG3818 Exposition-only concepts are not described in library intro +\movedxref{expos.only.func}{expos.only.entity} +\removedxref{expos.only.types} + % Deprecated features. %\deprxref{old.label} (if moved to depr.old.label, otherwise use \movedxref) From 6163fa74508457e43ea48389563c6ae3835035ec Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 13:49:56 -0800 Subject: [PATCH 211/257] LWG3822 Avoiding normalization in filesystem::weakly_canonical Fixes NB US 125 (C++23 CD). --- source/iostreams.tex | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index 0e5ccd6d64..c468dc261c 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -18327,12 +18327,6 @@ \pnum \throws As specified in~\ref{fs.err.report}. - -\pnum -\remarks -Implementations should - avoid unnecessary normalization such as - when \tcode{canonical} has already been called on the entirety of \tcode{p}. \end{itemdescr} \rSec1[c.files]{C library files} From cc63fcd8c85eef5ca600ad56bf09670ff5e3e0de Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 13:57:46 -0800 Subject: [PATCH 212/257] LWG3823 Unnecessary precondition for is_aggregate Fixes NB GB 090 (C++23 CD). --- source/meta.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/meta.tex b/source/meta.tex index 5010351af6..141ad65e7f 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -881,7 +881,7 @@ \tcode{template}\br \tcode{struct is_aggregate;} & \tcode{T} is an aggregate type\iref{dcl.init.aggr} & - \tcode{remove_all_extents_t} shall be a complete type or \cv~\keyword{void}. \\ \rowsep + \tcode{T} shall be an array type, a complete type, or \cv~\keyword{void}. \\ \rowsep \indexlibrary{\idxcode{is_signed}!class}% \tcode{template}\br From a3204c4bd7c3efd132836f59d7cd521eb5bbb1ed Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 16:04:10 -0800 Subject: [PATCH 213/257] LWG3824 Number of bind placeholders is underspecified Fixes NB GB 95 (C++23 CD). --- source/utilities.tex | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index 9e832c9293..6cc9b64480 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -11798,9 +11798,13 @@ \indexlibrary{8@\tcode{_8}}% \indexlibrary{9@\tcode{_9}}% \indexlibrary{10@\tcode{_10}}% +% FIXME: Fomatting for M and the members _1, _2, _M below, +% as well as their usages elsewhere is inconsistent. +% Should they all follow the formatting used in delcaration of +% "namespace placeholders" in [functional.syn]? \begin{codeblock} namespace std::placeholders { - // M is the \impldef{number of placeholders for bind expressions} number of placeholders + // M is the number of placeholders @\seebelow@ _1; @\seebelow@ _2; . @@ -11810,6 +11814,10 @@ } \end{codeblock} +\pnum +The number \tcode{\placeholder{M}} of placeholders is +\impldef{number of placeholders for bind expressions}. + \pnum All placeholder types meet the \oldconcept{DefaultConstructible} and \oldconcept{CopyConstructible} requirements, and From 60fb5037565706733e552d952f2d973c8ddbaa43 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Wed, 16 Nov 2022 16:07:07 -0800 Subject: [PATCH 214/257] LWG3826 Redundant specification [for overload of yield_value] Fixes NB US 118 (C++23 CD). --- source/ranges.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index f17487385c..daa84e60d3 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -15428,9 +15428,10 @@ \end{codeblock} \pnum -\remarks +\begin{note} A \grammarterm{yield-expression} that calls this function has type \tcode{void}\iref{expr.yield}. +\end{note} \end{itemdescr} \indexlibrarymember{unhandled_exception}{generator::promise_type}% From 12c97c5cb72f2cbb2d30f4340f3fae240a0df79a Mon Sep 17 00:00:00 2001 From: Dan Raviv Date: Sun, 20 Nov 2022 20:51:28 -0800 Subject: [PATCH 215/257] P2602R2 Poison Pills are Too Toxic Fixes NB US 111 (C++23 CD). --- source/iterators.tex | 13 ++++++----- source/lib-intro.tex | 15 ------------ source/ranges.tex | 55 ++++++++++++-------------------------------- source/support.tex | 14 +++++------ 4 files changed, 29 insertions(+), 68 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index a0c8cbdb8b..c803c4bb32 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -1133,12 +1133,8 @@ \item \tcode{iter_move(E)}, if \tcode{E} has class or enumeration type and \tcode{iter_move(E)} is a well-formed expression when treated as an unevaluated operand, -with overload resolution performed in a context -that does not include a declaration of \tcode{ranges::iter_move} -but does include the declaration -\begin{codeblock} -void iter_move(); -\end{codeblock} +where the meaning of \tcode{iter_move} is established as-if by performing +argument-dependent lookup only\iref{basic.lookup.argdep}. \item Otherwise, if the expression \tcode{*E} is well-formed: \begin{itemize} @@ -1203,6 +1199,11 @@ If the function selected by overload resolution does not exchange the values denoted by \tcode{E1} and \tcode{E2}, the program is ill-formed, no diagnostic required. +\begin{note} +This precludes calling unconstrained \tcode{std::iter_swap}. When the deleted +overload is viable, program-defined overloads need to be more +specialized\iref{temp.func.order} to be selected. +\end{note} \item Otherwise, if the types of \tcode{E1} and \tcode{E2} each model \libconcept{indirectly_readable}, and if the reference types of \tcode{E1} and \tcode{E2} diff --git a/source/lib-intro.tex b/source/lib-intro.tex index e0c0391224..fe27b8126a 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -845,21 +845,6 @@ Each customization point object type constrains its return type to model a particular concept. -\pnum -\begin{note} -Many of the customization point objects in the library evaluate function call -expressions with an unqualified name which results in a call to a -program-defined function found by argument dependent name -lookup\iref{basic.lookup.argdep}. To preclude such an expression resulting in a -call to unconstrained functions with the same name in namespace \tcode{std}, -customization point objects specify that lookup for these expressions is -performed in a context that includes deleted overloads matching the signatures -of overloads defined in namespace \tcode{std}. When the deleted overloads are -viable, program-defined overloads need to be more specialized\iref{temp.func.order} -or more constrained\iref{temp.constr.order} to be used by a customization point -object. -\end{note} - \rSec3[functions.within.classes]{Functions within classes} \pnum diff --git a/source/ranges.tex b/source/ranges.tex index daa84e60d3..9eaa93acd4 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -640,15 +640,10 @@ \tcode{auto(begin(t))} is a valid expression whose type models \libconcept{input_or_output_iterator} - with overload resolution performed in a context in which - unqualified lookup for \tcode{begin} finds only the declarations -\begin{codeblock} -void begin(auto&) = delete; -void begin(const auto&) = delete; -\end{codeblock} + where the meaning of \tcode{begin} is established as-if by performing + argument-dependent lookup only\iref{basic.lookup.argdep}, then \tcode{ranges::begin(E)} is expression-equivalent to - \tcode{auto(begin(t))} - with overload resolution performed in the above context. + that expression. \item Otherwise, \tcode{ranges::begin(E)} is ill-formed. @@ -711,15 +706,10 @@ \tcode{auto(end(t))} is a valid expression whose type models \tcode{\libconcept{sentinel_for}>} - with overload resolution performed in a context in which - unqualified lookup for \tcode{end} finds only the declarations -\begin{codeblock} -void end(auto&) = delete; -void end(const auto&) = delete; -\end{codeblock} + where the meaning of \tcode{end} is established as-if by performing + argument-dependent lookup only\iref{basic.lookup.argdep}, then \tcode{ranges::end(E)} is expression-equivalent to - \tcode{auto(end(t))} - with overload resolution performed in the above context. + that expression. \item Otherwise, \tcode{ranges::end(E)} is ill-formed. @@ -833,15 +823,10 @@ \tcode{auto(rbegin(t))} is a valid expression whose type models \libconcept{input_or_output_iterator} - with overload resolution performed in a context in which - unqualified lookup for \tcode{rbegin} finds only the declarations -\begin{codeblock} -void rbegin(auto&) = delete; -void rbegin(const auto&) = delete; -\end{codeblock} + where the meaning of \tcode{rbegin} is established as-if by performing + argument-dependent lookup only\iref{basic.lookup.argdep}, then \tcode{ranges::rbegin(E)} is expression-equivalent to - \tcode{auto(rbegin(t))} - with overload resolution performed in the above context. + that expression. \item Otherwise, if both \tcode{ranges::begin(t)} and \tcode{ranges::end(t)} @@ -902,15 +887,10 @@ \tcode{auto(rend(t))} is a valid expression whose type models \tcode{\libconcept{sentinel_for}} - with overload resolution performed in a context in which - unqualified lookup for \tcode{rend} finds only the declarations -\begin{codeblock} -void rend(auto&) = delete; -void rend(const auto&) = delete; -\end{codeblock} + where the meaning of \tcode{rend} is established as-if by performing + argument-dependent lookup only\iref{basic.lookup.argdep}, then \tcode{ranges::rend(E)} is expression-equivalent to - \tcode{auto(rend(t))} - with overload resolution performed in the above context. + that expression. \item Otherwise, if both \tcode{ranges::begin(t)} and \tcode{ranges::end(t)} @@ -1032,15 +1012,10 @@ \tcode{disable_sized_range>} is \tcode{false} and \tcode{auto(size(t))} is a valid expression of integer-like type - with overload resolution performed in a context in which - unqualified lookup for \tcode{size} finds only the declarations -\begin{codeblock} -void size(auto&) = delete; -void size(const auto&) = delete; -\end{codeblock} + where the meaning of \tcode{size} is established as-if by performing + argument-dependent lookup only\iref{basic.lookup.argdep}, then \tcode{ranges::size(E)} is expression-equivalent to - \tcode{auto(size(t))} - with overload resolution performed in the above context. + that expression. \item Otherwise, if diff --git a/source/support.tex b/source/support.tex index f7e00951ff..fc5381ec0e 100644 --- a/source/support.tex +++ b/source/support.tex @@ -684,7 +684,7 @@ #define @\defnlibxname{cpp_lib_polymorphic_allocator}@ 201902L // also in \libheader{memory_resource} #define @\defnlibxname{cpp_lib_print}@ 202207L // also in \libheader{print}, \libheader{ostream} #define @\defnlibxname{cpp_lib_quoted_string_io}@ 201304L // also in \libheader{iomanip} -#define @\defnlibxname{cpp_lib_ranges}@ 202207L +#define @\defnlibxname{cpp_lib_ranges}@ 202211L // also in \libheader{algorithm}, \libheader{functional}, \libheader{iterator}, \libheader{memory}, \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_as_const}@ 202207L // also in \libheader{ranges} #define @\defnlibxname{cpp_lib_ranges_as_rvalue}@ 202207L // also in \libheader{ranges} @@ -4924,8 +4924,8 @@ \item Otherwise, \tcode{strong_ordering(strong_order(E, F))} if it is a well-formed expression - with overload resolution performed in a context - that does not include a declaration of \tcode{std::strong_order}. + where the meaning of \tcode{strong_order} is established as-if by performing + argument-dependent lookup only\iref{basic.lookup.argdep}. \item Otherwise, if the decayed type \tcode{T} of \tcode{E} is a floating-point type, @@ -4962,8 +4962,8 @@ \item Otherwise, \tcode{weak_ordering(weak_order(E, F))} if it is a well-formed expression - with overload resolution performed in a context - that does not include a declaration of \tcode{std::weak_order}. + where the meaning of \tcode{weak_order} is established as-if by performing + argument-dependent lookup only\iref{basic.lookup.argdep}. \item Otherwise, if the decayed type \tcode{T} of \tcode{E} is a floating-point type, @@ -5014,8 +5014,8 @@ \item Otherwise, \tcode{partial_ordering(partial_order(E, F))} if it is a well-formed expression - with overload resolution performed in a context - that does not include a declaration of \tcode{std::partial_order}. + where the meaning of \tcode{partial_order} is established as-if by performing + argument-dependent lookup only\iref{basic.lookup.argdep}. \item Otherwise, \tcode{partial_ordering(compare_three_way()(E, F))} if it is a well-formed expression. From 12440ca9b3926d88f34fa19ee7585d3cf58c94c9 Mon Sep 17 00:00:00 2001 From: Dan Raviv Date: Sun, 20 Nov 2022 21:01:21 -0800 Subject: [PATCH 216/257] [concept.swappable] Add note explaining why swap poison pill is still needed --- source/concepts.tex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/concepts.tex b/source/concepts.tex index 801cb8ec57..5ff1db5028 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -620,6 +620,11 @@ exchange the values denoted by \tcode{E1} and \tcode{E2}, the program is ill-formed, no diagnostic required. + \begin{note} + This precludes calling unconstrained program-defined overloads of + \tcode{swap}. When the deleted overload is viable, program-defined overloads + need to be more specialized\iref{temp.func.order} to be selected. + \end{note} \item Otherwise, if \tcode{E1} and \tcode{E2} From 04ad290832790c6d2716fcabb20166f230a35c8e Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Thu, 17 Nov 2022 22:27:33 +0100 Subject: [PATCH 217/257] P2167R3 Improved Proposed Wording for LWG 2114 (contextually convertible to bool) Editorial notes: * Minor consistency fixes around the use of "each". * Some requested wording changes have already been applied as part of LWG 2114. Fixes NB US 073 (C++23 CD). --- source/algorithms.tex | 28 +++++++++++++++------------- source/containers.tex | 4 ++-- source/iterators.tex | 14 +++++--------- source/lib-intro.tex | 12 ++++++------ source/support.tex | 12 +++++++++--- source/threads.tex | 10 ++++++++-- source/utilities.tex | 13 +++++++++++-- 7 files changed, 56 insertions(+), 37 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index ce678c8680..b76b4eefc2 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -151,13 +151,13 @@ whenever an algorithm expects a function object\iref{function.objects} that, when applied to the result of dereferencing the corresponding iterator, returns a value testable as \tcode{true}. -In other words, -if an algorithm takes \tcode{Predicate pred} as its argument and +If an algorithm takes \tcode{Predicate pred} as its argument and \tcode{first} as its iterator argument with value type \tcode{T}, -it should work correctly in the construct -\tcode{pred(*first)} contextually converted to \tcode{bool}\iref{conv}. +the expression \tcode{pred(*first)} shall be well-formed and +the type \tcode{decltype(pred(*first))} shall model +\exposconcept{boolean-testable}\iref{concept.booleantestable}. The function object \tcode{pred} shall not apply any non-constant function -through the dereferenced iterator. +through its argument. Given a glvalue \tcode{u} of type (possibly \keyword{const}) \tcode{T} that designates the same object as \tcode{*first}, \tcode{pred(u)} shall be a valid expression @@ -170,19 +170,21 @@ to dereferencing an iterator and type \tcode{T} when \tcode{T} is part of the signature, returns a value testable as \tcode{true}. -In other words, -if an algorithm takes \tcode{BinaryPredicate binary_pred} as its argument and +If an algorithm takes \tcode{BinaryPredicate binary_pred} as its argument and \tcode{first1} and \tcode{first2} as its iterator arguments with respective value types \tcode{T1} and \tcode{T2}, -it should work correctly in the construct -\tcode{binary_pred(*first1, *first2)} contextually converted to \tcode{bool}\iref{conv}. +the expression \tcode{binary_pred(*first1, *first2)} shall be well-formed and +the type \tcode{decltype(binary_pred(*first1, *first2))} shall model +\exposconcept{boolean-testable}. Unless otherwise specified, \tcode{BinaryPredicate} always takes the first iterator's \tcode{value_type} as its first argument, that is, in those cases when \tcode{T value} -is part of the signature, it should work correctly in the construct -\tcode{binary_pred(*first1, value)} contextually converted to \tcode{bool}\iref{conv}. +is part of the signature, +the expression \tcode{binary_pred(*first1, value)} shall be well-formed and +the type \tcode{decltype(binary_pred(*first1, value))} shall model +\exposconcept{boolean-testable}. \tcode{binary_pred} shall not apply any non-constant function -through the dereferenced iterators. +through any of its arguments. Given a glvalue \tcode{u} of type (possibly \keyword{const}) \tcode{T1} that designates the same object as \tcode{*first1}, and a glvalue \tcode{v} of type (possibly \keyword{const}) \tcode{T2} @@ -6569,7 +6571,7 @@ named \tcode{BinaryPredicate}~\iref{algorithms.requirements}. The return value of the function call operation applied to an object of type \tcode{Compare}, -when contextually converted to \tcode{bool}\iref{conv}, +when converted to \tcode{bool}, yields \tcode{true} if the first argument of the call is less than the second, and \tcode{false} otherwise. diff --git a/source/containers.tex b/source/containers.tex index ca670748d3..fd527681c8 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -425,7 +425,7 @@ \pnum \result -Convertible to \tcode{bool}. +\tcode{bool}. \pnum \returns @@ -536,7 +536,7 @@ \begin{itemdescr} \pnum \result -Convertible to \tcode{bool}. +\tcode{bool}. \pnum \returns diff --git a/source/iterators.tex b/source/iterators.tex index c803c4bb32..3c825621f8 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -2095,7 +2095,7 @@ & & \chdr{semantics} & \rhdr{pre-/post-condition} \\ \capsep \endhead \tcode{a != b} & - contextually convertible to \tcode{bool} & + \tcode{decltype(a != b)} models \exposconceptx{boolean-test\-able}{boolean-testable} & \tcode{!(a == b)} & \expects \orange{a}{b} is in the domain of \tcode{==}. \\ \rowsep @@ -2383,25 +2383,21 @@ \tcode{*(a + n)} & \\ \rowsep \tcode{a < b} & - contextually - convertible to \tcode{bool} & + \tcode{decltype(a < b)} models \exposconceptx{boolean-test\-able}{boolean-testable} & \effects Equivalent to: \tcode{return b - a > 0;} & \tcode{<} is a total ordering relation \\ \rowsep \tcode{a > b} & - contextually - convertible to \tcode{bool} & + \tcode{decltype(a > b)} models \exposconceptx{boolean-test\-able}{boolean-testable} & \tcode{b < a} & \tcode{>} is a total ordering relation opposite to \tcode{<}. \\ \rowsep \tcode{a >= b} & - contextually - convertible to \tcode{bool} & + \tcode{decltype(a >= b)} models \exposconceptx{boolean-test\-able}{boolean-testable} & \tcode{!(a < b)} & \\ \rowsep \tcode{a <= b} & - contextually - convertible to \tcode{bool}. & + \tcode{decltype(a <= b)} models \exposconceptx{boolean-test\-able}{boolean-testable} & \tcode{!(a > b)} & \\ \end{libreqtab4b} diff --git a/source/lib-intro.tex b/source/lib-intro.tex index fe27b8126a..e250446322 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1622,7 +1622,7 @@ \topline \hdstyle{Expression} & \hdstyle{Return type} & \rhdr{Requirement} \\ \capsep \tcode{a == b} & -convertible to \tcode{bool} & +\tcode{decltype(a == b)} models \exposconceptx{boolean-testa\-ble}{boolean-testable} & \tcode{==} is an equivalence relation, that is, it has the following properties: \begin{itemize} @@ -1640,7 +1640,7 @@ \topline \hdstyle{Expression} & \hdstyle{Return type} & \hdstyle{Requirement} \\ \capsep \tcode{a < b} & -convertible to \tcode{bool} & +\tcode{decltype(a < b)} models \exposconceptx{boolean-testa\-ble}{boolean-testable} & \tcode{<} is a strict weak ordering relation\iref{alg.sorting} \\ \end{oldconcepttable} @@ -1863,7 +1863,7 @@ a value of type (possibly \keyword{const}) \tcode{std::nullptr_t}. \begin{oldconcepttable}{NullablePointer}{}{cpp17.nullablepointer} -{lll} +{lx{2in}l} \topline \lhdr{Expression} & \chdr{Return type} & \rhdr{Operational semantics} \\ \capsep \tcode{P u(np);}\br & @@ -1882,17 +1882,17 @@ \ensures \tcode{t == nullptr} \\ \rowsep \tcode{a != b} & - contextually convertible to \tcode{bool} & + \tcode{decltype(a != b)} models \exposconcept{boolean-testable} & \tcode{!(a == b)} \\ \rowsep \tcode{a == np} & - contextually convertible to \tcode{bool} & + \tcode{decltype(a == np)} and \tcode{decltype(np == a)} each model \exposconcept{boolean-testable} & \tcode{a == P()} \\ \tcode{np == a} & & \\ \rowsep \tcode{a != np} & - contextually convertible to \tcode{bool} & + \tcode{decltype(a != np)} and \tcode{decltype(np != a)} each model \exposconcept{boolean-testable} & \tcode{!(a == np)} \\ \tcode{np != a} & & diff --git a/source/support.tex b/source/support.tex index fc5381ec0e..4819bad9d8 100644 --- a/source/support.tex +++ b/source/support.tex @@ -5047,7 +5047,9 @@ Otherwise, \tcode{strong_order(E, F)} if it is a well-formed expression. \item Otherwise, if the expressions \tcode{E == F} and \tcode{E < F} - are both well-formed and convertible to \tcode{bool}, + are both well-formed and + each of \tcode{decltype(E == F)} and \tcode{decltype(E < F)} models + \exposconcept{boolean-testable}, \begin{codeblock} E == F ? strong_ordering::equal : E < F ? strong_ordering::less : @@ -5079,7 +5081,9 @@ Otherwise, \tcode{weak_order(E, F)} if it is a well-formed expression. \item Otherwise, if the expressions \tcode{E == F} and \tcode{E < F} - are both well-formed and convertible to \tcode{bool}, + are both well-formed and + each of \tcode{decltype(E == F)} and \tcode{decltype(E < F)} models + \exposconcept{boolean-testable}, \begin{codeblock} E == F ? weak_ordering::equivalent : E < F ? weak_ordering::less : @@ -5112,7 +5116,9 @@ \item Otherwise, if the expressions \tcode{E == F}, \tcode{E < F}, and \tcode{F < E} - are all well-formed and convertible to \tcode{bool}, + are all well-formed and + each of \tcode{decltype(E == F)} and \tcode{decltype(E < F)} models + \exposconcept{boolean-testable}, \begin{codeblock} E == F ? partial_ordering::equivalent : E < F ? partial_ordering::less : diff --git a/source/threads.tex b/source/threads.tex index 8e15c4c629..4f70a9a949 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -30,8 +30,14 @@ \pnum Throughout this Clause, the names of template parameters are used to express type requirements. -If a template parameter is named \tcode{Predicate}, \tcode{operator()} applied to -the template argument shall return a value that is convertible to \tcode{bool}. +\tcode{Predicate} is a function object type\iref{function.objects}. +Let \tcode{pred} denote an lvalue of type \tcode{Predicate}. +Then the expression \tcode{pred()} shall be well-formed and +the type \tcode{decltype(pred())} shall model +\exposconcept{boolean-testable}\iref{concept.booleantestable}. +The return value of \tcode{pred()}, converted to \tcode{bool}, +yields \tcode{true} if the corresponding test condition is satisfied, and +\tcode{false} otherwise. If a template parameter is named \tcode{Clock}, the corresponding template argument shall be a type \tcode{C} that meets the \oldconcept{Clock} requirements\iref{time.clock.req}; diff --git a/source/utilities.tex b/source/utilities.tex index 6cc9b64480..a7decf27db 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -1269,6 +1269,11 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\expects +Each of \tcode{decltype(x.first == y.first)} and +\tcode{decltype(x.second == y.second)} models \exposconcept{boolean-testable}. + \pnum \returns \tcode{x.first == y.first \&\& x.second == y.second}. @@ -2907,11 +2912,15 @@ \mandates For all \tcode{i}, where $0 \leq \tcode{i} < \tcode{sizeof...(TTypes)}$, -\tcode{get(t) == get(u)} is a valid expression -returning a type that is convertible to \tcode{bool}. +\tcode{get(t) == get(u)} is a valid expression. \tcode{sizeof...(TTypes)} equals \tcode{tuple_size_v}. +\pnum +\expects +For all \tcode{i}, \tcode{decltype(get(t) == get(u))} models +\exposconcept{boolean-testable}. + \pnum \returns \tcode{true} if \tcode{get(t) == get(u)} for all From 0cb7d4b98bc8c29886571b37b96191db95b6ce83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 16 Nov 2022 19:03:25 +0000 Subject: [PATCH 218/257] P2539R4 Should the output of std::print to a terminal be synchronized with the underlying stream? Fixes NB US 123, US 124, FR 019 (C++23 CD). --- source/iostreams.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/iostreams.tex b/source/iostreams.tex index c468dc261c..895a6ebccd 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -6883,6 +6883,8 @@ \indextext{undefined}% the behavior is undefined and implementations are encouraged to diagnose it. +If the native Unicode API is used, +the function flushes \tcode{os} before writing \tcode{out}. Otherwise (if \tcode{os} is not such a stream or the function is \tcode{vprint_nonunicode}), inserts the character sequence @@ -7809,6 +7811,8 @@ the behavior is undefined and implementations are encouraged to diagnose it. Otherwise writes \tcode{out} to \tcode{stream} unchanged. +If the native Unicode API is used, +the function flushes \tcode{stream} before writing \tcode{out}. \begin{note} On POSIX and Windows, \tcode{stream} referring to a terminal means that, respectively, From d8ed990d662dc76aee0b8ba29edbb66c2eade0fc Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 16:10:49 -0800 Subject: [PATCH 219/257] P1264R2 Revising the wording of stream input operations Partially fixes NB FR 004 (C++23 CD). --- source/iostreams.tex | 205 ++++++++++++++++--------------------------- source/strings.tex | 25 ++---- source/utilities.tex | 7 +- 3 files changed, 88 insertions(+), 149 deletions(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index 895a6ebccd..33c0009009 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -4391,32 +4391,6 @@ They may use other public members of \tcode{istream}. -\pnum -If -\tcode{rdbuf()->sbumpc()} -or -\tcode{rdbuf()->sgetc()} -returns -\tcode{traits::eof()}, -then the input function, except as explicitly noted otherwise, completes its actions and does -\tcode{setstate(eofbit)}, -which may throw -\tcode{ios_base::failure}\iref{iostate.flags}, before returning. - -\pnum -If one of these called functions throws an exception, then unless explicitly noted otherwise, -the input function sets -\tcode{badbit} -in the error state. -If -\tcode{badbit} -is set in -\tcode{exceptions()}, -the input function -rethrows the exception without completing its actions, otherwise -it does not throw anything and proceeds as if the called function had returned -a failure indication. - \rSec4[istream.cons]{Constructors} \indexlibraryctor{basic_istream}% @@ -4647,7 +4621,10 @@ \rSec4[istream.formatted.reqmts]{Common requirements} \pnum -Each formatted input function begins execution by constructing an object of class +Each formatted input function begins execution by constructing +an object of type \tcode{ios_base::iostate}, termed the local error state, and +initializing it to \tcode{ios_base::goodbit}. +It then creates an object of class \tcode{sentry} with the \tcode{noskipws} @@ -4661,20 +4638,22 @@ \tcode{bool}, the function endeavors to obtain the requested input. +Otherwise, +if the \tcode{sentry} constructor exits by throwing an exception or +if the \tcode{sentry} object produces \tcode{false} +when converted to a value of type \tcode{bool}, +the function returns without attempting to obtain any input. +If \tcode{rdbuf()->sbumpc()} or \tcode{rdbuf()->sgetc()} +returns \tcode{traits::eof()}, then +\tcode{ios_base::eofbit} is set in the local error state and +the input function stops trying to obtain the requested input. If an exception is thrown during input then -\tcode{ios_base::badbit} -is turned on -\begin{footnote} -This is done without causing an -\tcode{ios_base::failure} -to be thrown. -\end{footnote} -in -\tcode{*this}'s -error state. -If -\tcode{(exceptions()\&badbit) != 0} -then the exception is rethrown. +\tcode{ios_base::badbit} is set in the local error state, +\tcode{*this}'s error state is set to the local error state, and +the exception is rethrown if \tcode{(exceptions() \& badbit) != 0}. +After extraction is done, the input function calls \tcode{setstate}, which +sets \tcode{*this}'s error state to the local error state, and +may throw an exception. In any case, the formatted input function destroys the \tcode{sentry} object. @@ -4705,12 +4684,11 @@ \tcode{num_get<>}\iref{locale.num.get} object to perform parsing the input stream data. These extractors behave as formatted input functions (as described in~\ref{istream.formatted.reqmts}). After a \tcode{sentry} object is constructed, the -conversion occurs as if performed by the following code fragment: +conversion occurs as if performed by the following code fragment, +where \tcode{state} represents the input function's local error state: \begin{codeblock} using numget = num_get>; -iostate err = iostate::goodbit; -use_facet(loc).get(*this, 0, *this, err, val); -setstate(err); +use_facet(loc).get(*this, 0, *this, state, val); \end{codeblock} In the above fragment, \tcode{loc} @@ -4743,18 +4721,16 @@ (using the same notation as for the preceding code fragment): \begin{codeblock} using numget = num_get>; -iostate err = ios_base::goodbit; long lval; -use_facet(loc).get(*this, 0, *this, err, lval); +use_facet(loc).get(*this, 0, *this, state, lval); if (lval < numeric_limits::min()) { - err |= ios_base::failbit; + state |= ios_base::failbit; val = numeric_limits::min(); } else if (numeric_limits::max() < lval) { - err |= ios_base::failbit; + state |= ios_base::failbit; val = numeric_limits::max(); } else val = static_cast(lval); -setstate(err); \end{codeblock} \end{itemdescr} @@ -4769,18 +4745,16 @@ (using the same notation as for the preceding code fragment): \begin{codeblock} using numget = num_get>; -iostate err = ios_base::goodbit; long lval; -use_facet(loc).get(*this, 0, *this, err, lval); +use_facet(loc).get(*this, 0, *this, state, lval); if (lval < numeric_limits::min()) { - err |= ios_base::failbit; + state |= ios_base::failbit; val = numeric_limits::min(); } else if (numeric_limits::max() < lval) { - err |= ios_base::failbit; + state |= ios_base::failbit; val = numeric_limits::max(); } else val = static_cast(lval); -setstate(err); \end{codeblock} \end{itemdescr} @@ -4818,19 +4792,17 @@ (using the same notation as for the preceding code fragment): \begin{codeblock} using numget = num_get>; -iostate err = ios_base::goodbit; FP fval; -use_facet(loc).get(*this, 0, *this, err, fval); +use_facet(loc).get(*this, 0, *this, state, fval); if (fval < -numeric_limits<@\placeholder{extended-floating-point-type}@>::max()) { - err |= ios_base::failbit; + state |= ios_base::failbit; val = -numeric_limits<@\placeholder{extended-floating-point-type}@>::max(); } else if (numeric_limits<@\placeholder{extended-floating-point-type}@>::max() < fval) { - err |= ios_base::failbit; + state |= ios_base::failbit; val = numeric_limits<@\placeholder{extended-floating-point-type}@>::max(); } else { val = static_cast<@\placeholder{extended-floating-point-type}@>(fval); } -setstate(err); \end{codeblock} \begin{note} When the extended floating-point type has @@ -4954,10 +4926,9 @@ \tcode{width(0)}. \pnum -If the function extracted no characters, it calls -\tcode{setstate(failbit)}, -which may throw -\tcode{ios_base::\brk{}failure}\iref{iostate.flags}. +If the function extracted no characters, +\tcode{ios_base::failbit} is set in the input function's local error state +before \tcode{setstate} is called. \pnum \returns @@ -4979,12 +4950,10 @@ \effects Behaves like a formatted input member (as described in~\ref{istream.formatted.reqmts}) of \tcode{in}. -After a -\tcode{sentry} -object is constructed -a character is extracted from \tcode{in}, if one is available, and stored in \tcode{c}. -Otherwise, the function calls -\tcode{in.setstate(fail\-bit)}. +A character is extracted from \tcode{in}, if one is available, and stored in \tcode{c}. +Otherwise, +\tcode{ios_base::failbit} is set in the input function's local error state +before \tcode{setstate} is called. \pnum \returns @@ -5020,18 +4989,9 @@ \end{itemize} \pnum -If the function inserts no characters, it calls -\tcode{setstate(failbit)}, -which may throw -\tcode{ios_base::\brk{}failure}\iref{iostate.flags}. -If it inserted no characters because it caught -an exception thrown while extracting characters from -\tcode{*this} -and -\tcode{failbit} -is set in -\tcode{exceptions()}\iref{iostate.flags}, -then the caught exception is rethrown. +If the function inserts no characters, +\tcode{ios_base::failbit} is set in the input function's local error state +before \tcode{setstate} is called. \pnum \returns @@ -5041,7 +5001,10 @@ \rSec3[istream.unformatted]{Unformatted input functions} \pnum -Each unformatted input function begins execution by constructing an object of class +Each unformatted input function begins execution by constructing +an object of type \tcode{ios_base::iostate}, termed the local error state, and +initializing it to \tcode{ios_base::goodbit}. +It then creates an object of class \tcode{sentry} with the default argument \tcode{noskipws} @@ -5056,7 +5019,7 @@ the function endeavors to obtain the requested input. Otherwise, if the \tcode{sentry} constructor exits by throwing an exception or if -the \tcode{sentry} object returns \tcode{false}, when converted to a value of type +the \tcode{sentry} object produces \tcode{false}, when converted to a value of type \tcode{bool}, the function returns without attempting to obtain any input. In either case the number of extracted characters is set to 0; @@ -5064,27 +5027,20 @@ an argument shall also store a null character (using \tcode{charT()}) in the first location of the array. +If \tcode{rdbuf()->sbumpc()} or \tcode{rdbuf()->sgetc()} +returns \tcode{traits::eof()}, then +\tcode{ios_base::eofbit} is set in the local error state and +the input function stops trying to obtain the requested input. If an exception is thrown during input then -\tcode{ios_base::badbit} -is turned on -\begin{footnote} -This is done without causing an -\tcode{ios_base::failure} -to be thrown. -\end{footnote} -in -\tcode{*this}'s -error state. -(Exceptions thrown from -\tcode{basic_ios<>::clear()} -are not caught or rethrown.) -If -\tcode{(exceptions()\&badbit) != 0} -then the exception is rethrown. -It also counts the number of characters extracted. -If no exception has been thrown it ends -by storing the count in a member object -and returning the value specified. +\tcode{ios_base::badbit} is set in the local error state, +\tcode{*this}'s error state is set to the local error state, and +the exception is rethrown if \tcode{(exceptions() \& badbit) != 0}. +If no exception has been thrown it +stores the number of characters extracted +in a member object. +After extraction is done, the input function calls \tcode{setstate}, which +sets \tcode{*this}'s error state to the local error state, and +may throw an exception. In any event the \tcode{sentry} object @@ -5122,10 +5078,9 @@ (as described above). After constructing a \tcode{sentry} object, extracts a character \tcode{c}, if one is available. -Otherwise, the function calls -\tcode{setstate(failbit)}, -which may throw -\tcode{ios_base::failure}\iref{iostate.flags}. +Otherwise, +\tcode{ios_base::failbit} is set in the input function's local error state +before \tcode{setstate} is called. \pnum \returns @@ -5153,10 +5108,9 @@ and \tcode{unsigned char}. \end{footnote} -Otherwise, the function calls -\tcode{setstate(failbit)} -(which may throw -\tcode{ios_base::failure}\iref{iostate.flags}). +Otherwise, +\tcode{ios_base::failbit} is set in the input function's local error state +before \tcode{setstate} is called. \pnum \returns @@ -5189,9 +5143,7 @@ \tcode{n} is less than one or \tcode{n - 1} characters are stored; \item -end-of-file occurs on the input sequence -(in which case the function calls -\tcode{setstate(eofbit)}); +end-of-file occurs on the input sequence; \item \tcode{traits::eq(c, delim)} for the next available input @@ -5200,10 +5152,9 @@ \end{itemize} \pnum -If the function stores no characters, it calls -\tcode{setstate(failbit)} -(which may throw -\tcode{ios_base::\brk{}failure}\iref{iostate.flags}). +If the function stores no characters, +\tcode{ios_base::failbit} is set in the input function's local error state +before \tcode{setstate} is called. In any case, if \tcode{n} is greater than zero it then stores a null character into the next successive location of the array. @@ -5259,10 +5210,9 @@ \end{itemize} \pnum -If the function inserts no characters, it calls -\tcode{setstate(failbit)}, -which may throw -\tcode{ios_base::\brk{}failure}\iref{iostate.flags}. +If the function inserts no characters, +\tcode{ios_base::failbit} is set in the input function's local error state +before \tcode{setstate} is called. \pnum \returns @@ -5308,9 +5258,7 @@ Characters are extracted and stored until one of the following occurs: \begin{enumerate} \item -end-of-file occurs on the input sequence -(in which case the function calls -\tcode{setstate(eofbit)}); +end-of-file occurs on the input sequence; \item \tcode{traits::eq(c, delim)} for the next available input @@ -5340,10 +5288,9 @@ \end{footnote} \pnum -If the function extracts no characters, it calls -\tcode{setstate(failbit)} -(which may throw -\tcode{ios_base::\brk{}failure}\iref{iostate.flags}). +If the function extracts no characters, +\tcode{ios_base::failbit} is set in the input function's local error state +before \tcode{setstate} is called. \begin{footnote} This implies an empty input line will not cause diff --git a/source/strings.tex b/source/strings.tex index d9bd3cef43..9f6589af53 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -4961,10 +4961,9 @@ object is destroyed. \pnum -If the function extracts no characters, it calls -\tcode{is.setstate(ios_base::failbit)}, -which may throw -\tcode{ios_base::fail\-ure}\iref{iostate.flags}. +If the function extracts no characters, +\tcode{ios_base::failbit} is set in the input function's local error state +before \tcode{setstate} is called. \pnum \returns @@ -5015,24 +5014,19 @@ until any of the following occurs: \begin{itemize} \item -end-of-file occurs on the input sequence -(in which case, the -\tcode{getline} -function calls -\tcode{is.setstate(\brk{}ios_base::eofbit)}). +end-of-file occurs on the input sequence; \item \tcode{traits::eq(c, delim)} for the next available input character \textit{c} (in which case, \textit{c} -is extracted but not appended)\iref{iostate.flags} +is extracted but not appended); \item \tcode{str.max_size()} characters are stored (in which case, -the function calls -\tcode{is.setstate(ios_base::fail\-bit))}\iref{iostate.flags} +\tcode{ios_base::failbit} is set in the input function's local error state). \end{itemize} \pnum @@ -5043,10 +5037,9 @@ object is destroyed. \pnum -If the function extracts no characters, it calls -\tcode{is.setstate(ios_base::fail\-bit)} -which may throw -\tcode{ios_base::fail\-ure}\iref{iostate.flags}. +If the function extracts no characters, +\tcode{ios_base::failbit} is turned on in the input function's local error state +before \tcode{setstate} is called. \pnum \returns diff --git a/source/utilities.tex b/source/utilities.tex index a7decf27db..513d1b002e 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -9747,10 +9747,9 @@ \end{itemize} \pnum -If \tcode{N > 0} and no characters are stored in \tcode{str}, calls -\tcode{is.setstate(ios_base::failbit)} -(which may throw -\tcode{ios_base::failure}\iref{iostate.flags}). +If \tcode{N > 0} and no characters are stored in \tcode{str}, +\tcode{ios_base::failbit} is set in the input function's local error state +before \tcode{setstate} is called. \pnum \returns From 08413d7b434a563f71a87ff269971d45aa2dbb57 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Fri, 18 Nov 2022 17:58:47 -0800 Subject: [PATCH 220/257] [string.io] Replace "turned on" with "set" for consistency. --- source/strings.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/strings.tex b/source/strings.tex index 9f6589af53..0135346002 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -5038,7 +5038,7 @@ \pnum If the function extracts no characters, -\tcode{ios_base::failbit} is turned on in the input function's local error state +\tcode{ios_base::failbit} is set in the input function's local error state before \tcode{setstate} is called. \pnum From d48394ff8e438a9e3016b671a92e909b1d3eb4c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Thu, 15 Dec 2022 18:15:18 +0000 Subject: [PATCH 221/257] [ostream] Replace "turned on" with "set" for consistency. --- source/iostreams.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index 33c0009009..2dd834348f 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -6316,7 +6316,7 @@ which can throw an exception. If an exception is thrown during output, then \tcode{ios_base::badbit} -is turned on +is set \begin{footnote} This is done without causing an \tcode{ios_base::failure} @@ -6864,7 +6864,7 @@ to generate the requested output. If an exception is thrown during output, then \tcode{ios_base::badbit} -is turned on +is set \begin{footnote} This is done without causing an \tcode{ios_base::failure} From 1e02eb169792f06a4c6fc13ec96f6132d17f1f59 Mon Sep 17 00:00:00 2001 From: Robert Leahy Date: Sun, 20 Nov 2022 00:22:45 -0500 Subject: [PATCH 222/257] P2505R5 Monadic Functions for std::expected Fixes NB GB 093, US 091, US 092, FR 009 (C++23 CD). --- source/support.tex | 2 +- source/utilities.tex | 639 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 634 insertions(+), 7 deletions(-) diff --git a/source/support.tex b/source/support.tex index 4819bad9d8..9dc3877511 100644 --- a/source/support.tex +++ b/source/support.tex @@ -619,7 +619,7 @@ // \libheader{unordered_set} #define @\defnlibxname{cpp_lib_exchange_function}@ 201304L // also in \libheader{utility} #define @\defnlibxname{cpp_lib_execution}@ 201902L // also in \libheader{execution} -#define @\defnlibxname{cpp_lib_expected}@ 202202L // also in \libheader{expected} +#define @\defnlibxname{cpp_lib_expected}@ 202211L // also in \libheader{expected} #define @\defnlibxname{cpp_lib_filesystem}@ 201703L // also in \libheader{filesystem} #define @\defnlibxname{cpp_lib_find_last}@ 202207L // also in \libheader{algorithm} #define @\defnlibxname{cpp_lib_flat_map}@ 202207L // also in \libheader{flat_map} diff --git a/source/utilities.tex b/source/utilities.tex index 513d1b002e..8eb2412154 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -7305,6 +7305,26 @@ constexpr E&& error() && noexcept; template constexpr T value_or(U&&) const &; template constexpr T value_or(U&&) &&; + template constexpr E error_or(G&&) const &; + template constexpr E error_or(G&&) &&; + + // \ref{expected.object.monadic}, monadic operations + template constexpr auto and_then(F&& f) &; + template constexpr auto and_then(F&& f) &&; + template constexpr auto and_then(F&& f) const &; + template constexpr auto and_then(F&& f) const &&; + template constexpr auto or_else(F&& f) &; + template constexpr auto or_else(F&& f) &&; + template constexpr auto or_else(F&& f) const &; + template constexpr auto or_else(F&& f) const &&; + template constexpr auto transform(F&& f) &; + template constexpr auto transform(F&& f) &&; + template constexpr auto transform(F&& f) const &; + template constexpr auto transform(F&& f) const &&; + template constexpr auto transform_error(F&& f) &; + template constexpr auto transform_error(F&& f) &&; + template constexpr auto transform_error(F&& f) const &; + template constexpr auto transform_error(F&& f) const &&; // \ref{expected.object.eq}, equality operators template requires (!is_void_v) @@ -7335,12 +7355,14 @@ contains an object of type \tcode{T}. \pnum -A program -that instantiates the definition of template \tcode{expected} -for a reference type, a function type, or -for possibly cv-qualified types \tcode{in_place_t}, \tcode{unexpect_t}, or -a specialization of \tcode{unexpected} for the \tcode{T} parameter -is ill-formed. +A type \tcode{T} is a \term{valid value type for \tcode{expected}}, +if \tcode{remove_cv_t} is \tcode{void} +or a complete non-array object type that is not \tcode{in_place_t}, +\tcode{unexpect_t}, +or a specialization of \tcode{unexpected}. +A program which instantiates class template \tcode{expected} +with an argument \tcode{T} that is not a valid value +type for \tcode{expected} is ill-formed. A program that instantiates the definition of the template \tcode{expected} with a type for the \tcode{E} parameter @@ -8246,6 +8268,309 @@ \tcode{has_value() ? std::move(**this) : static_cast(std::forward(v))}. \end{itemdescr} +\indexlibrarymember{error_or}{expected}% +\begin{itemdecl} +template constexpr E error_or(G&& e) const &; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\mandates +\tcode{is_copy_constructible_v} is \tcode{true} and +\tcode{is_convertible_v} is \tcode{true}. + +\pnum +\returns +\tcode{std::forward(e)} if \tcode{has_value()} is \tcode{true}, +\tcode{error()} otherwise. +\end{itemdescr} + +\indexlibrarymember{error_or}{expected}% +\begin{itemdecl} +template constexpr E error_or(G&& e) &&; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\mandates +\tcode{is_move_constructible_v} is \tcode{true} and +\tcode{is_convertible_v} is \tcode{true}. + +\pnum +\returns +\tcode{std::forward(e)} if \tcode{has_value()} is \tcode{true}, +\tcode{std::move(error())} otherwise. +\end{itemdescr} + +\rSec3[expected.object.monadic]{Monadic operations} + +\indexlibrarymember{and_then}{expected}% +\begin{itemdecl} +template constexpr auto and_then(F&& f) &; +template constexpr auto and_then(F&& f) const &; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{U} be \tcode{remove_cvref_t>}. + +\pnum +\constraints +\tcode{is_copy_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{U} is a specialization of \tcode{expected} and +\tcode{is_same_v} is \tcode{true}. + +\pnum +\effects +Equivalent to: +\begin{codeblock} +if (has_value()) + return invoke(std::forward(f), value()); +else + return U(unexpect, error()); +\end{codeblock} +\end{itemdescr} + +\indexlibrarymember{and_then}{expected}% +\begin{itemdecl} +template constexpr auto and_then(F&& f) &&; +template constexpr auto and_then(F&& f) const &&; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{U} be +\tcode{remove_cvref_t>}. + +\pnum +\constraints +\tcode{is_move_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{U} is a specialization of \tcode{expected} and +\tcode{is_same_v} is \tcode{true}. + +\pnum +\effects +Equivalent to: +\begin{codeblock} +if (has_value()) + return invoke(std::forward(f), std::move(value())); +else + return U(unexpect, std::move(error())); +\end{codeblock} +\end{itemdescr} + +\indexlibrarymember{or_else}{expected}% +\begin{itemdecl} +template constexpr auto or_else(F&& f) &; +template constexpr auto or_else(F&& f) const &; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{G} be \tcode{remove_cvref_t>}. + +\pnum +\constraints +\tcode{is_copy_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{G} is a specialization of \tcode{expected} and +\tcode{is_same_v} is \tcode{true}. + +\pnum +\effects +Equivalent to: +\begin{codeblock} +if (has_value()) + return G(in_place, value()); +else + return invoke(std::forward(f), error()); +\end{codeblock} +\end{itemdescr} + +\indexlibrarymember{or_else}{expected}% +\begin{itemdecl} +template constexpr auto or_else(F&& f) &&; +template constexpr auto or_else(F&& f) const &&; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{G} be +\tcode{remove_cvref_t>}. + +\pnum +\constraints +\tcode{is_move_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{G} is a specialization of \tcode{expected} and +\tcode{is_same_v} is \tcode{true}. + +\pnum +\effects +Equivalent to: +\begin{codeblock} +if (has_value()) + return G(in_place, std::move(value())); +else + return invoke(std::forward(f), std::move(error())); +\end{codeblock} +\end{itemdescr} + +\indexlibrarymember{transform}{expected}% +\begin{itemdecl} +template constexpr auto transform(F&& f) &; +template constexpr auto transform(F&& f) const &; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{U} be +\tcode{remove_cv_t>}. + +\pnum +\constraints +\tcode{is_copy_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{U} is a valid value type for \tcode{expected}. +If \tcode{is_void_v} is \tcode{false}, +the declaration +\begin{codeblock} +U u(invoke(std::forward(f), value())); +\end{codeblock} +is well-formed. + +\pnum +\effects +\begin{itemize} +\item +If \tcode{has_value()} is \tcode{false}, returns +\tcode{expected(unexpect, error())}. +\item +Otherwise, if \tcode{is_void_v} is \tcode{false}, returns an +\tcode{expected} object whose \exposid{has_val} member is \tcode{true} +and \exposid{val} member is direct-non-list-initialized with +\tcode{invoke(std::forward(f), value())}. +\item +Otherwise, evaluates \tcode{invoke(std::forward(f), value())} and then +returns \tcode{expected()}. +\end{itemize} +\end{itemdescr} + +\indexlibrarymember{transform}{expected}% +\begin{itemdecl} +template constexpr auto transform(F&& f) &&; +template constexpr auto transform(F&& f) const &&; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{U} be +\tcode{remove_cv_t>}. + +\pnum +\constraints +\tcode{is_move_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{U} is a valid value type for \tcode{expected}. If \tcode{is_void_v} is +\tcode{false}, the declaration +\begin{codeblock} +U u(invoke(std::forward(f), std::move(value()))); +\end{codeblock} +is well-formed. + +\pnum +\effects +\begin{itemize} +\item +If \tcode{has_value()} is \tcode{false}, returns +\tcode{expected(unexpect, std::move(error()))}. +\item +Otherwise, if \tcode{is_void_v} is \tcode{false}, returns an +\tcode{expected} object whose \exposid{has_val} member is \tcode{true} +and \exposid{val} member is direct-non-list-initialized with +\tcode{invoke(std::forward(f), std::move(value()))}. +\item +Otherwise, evaluates \tcode{invoke(std::forward(f), std::move(value()))} and +then returns \tcode{expected()}. +\end{itemize} +\end{itemdescr} + +\indexlibrarymember{transform_error}{expected}% +\begin{itemdecl} +template constexpr auto transform_error(F&& f) &; +template constexpr auto transform_error(F&& f) const &; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{G} be \tcode{remove_cv_t>}. + +\pnum +\constraints +\tcode{is_copy_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{G} is a valid value type for \tcode{expected} and the declaration +\begin{codeblock} +G g(invoke(std::forward(f), error())); +\end{codeblock} +is well-formed. + +\pnum +\returns +If \tcode{has_value()} is \tcode{true}, +\tcode{expected(in_place, value())}; otherwise, an \tcode{expected} +object whose \exposid{has_val} member is \tcode{false} and \exposid{unex} member +is direct-non-list-initialized with \tcode{invoke(std::forward(f), error())}. +\end{itemdescr} + +\indexlibrarymember{transform_error}{expected}% +\begin{itemdecl} +template constexpr auto transform_error(F&& f) &&; +template constexpr auto transform_error(F&& f) const &&; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{G} be +\tcode{remove_cv_t>}. + +\pnum +\constraints +\tcode{is_move_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{G} is a valid value type for \tcode{expected} and the declaration +\begin{codeblock} +G g(invoke(std::forward(f), std::move(error()))); +\end{codeblock} +is well-formed. + +\pnum +\returns +If \tcode{has_value()} is \tcode{true}, +\tcode{expected(in_place, std::move(value()))}; otherwise, an +\tcode{expected} object whose \exposid{has_val} member is \tcode{false} +and \exposid{unex} member is direct-non-list-initialized with +\tcode{invoke(std::forward(f), std::move(error()))}. +\end{itemdescr} + \rSec3[expected.object.eq]{Equality operators} \indexlibrarymember{operator==}{expected}% @@ -8364,6 +8689,26 @@ constexpr E& error() & noexcept; constexpr const E&& error() const && noexcept; constexpr E&& error() && noexcept; + template constexpr E error_or(G&&) const &; + template constexpr E error_or(G&&) &&; + + // \ref{expected.void.monadic}, monadic operations + template constexpr auto and_then(F&& f) &; + template constexpr auto and_then(F&& f) &&; + template constexpr auto and_then(F&& f) const &; + template constexpr auto and_then(F&& f) const &&; + template constexpr auto or_else(F&& f) &; + template constexpr auto or_else(F&& f) &&; + template constexpr auto or_else(F&& f) const &; + template constexpr auto or_else(F&& f) const &&; + template constexpr auto transform(F&& f) &; + template constexpr auto transform(F&& f) &&; + template constexpr auto transform(F&& f) const &; + template constexpr auto transform(F&& f) const &&; + template constexpr auto transform_error(F&& f) &; + template constexpr auto transform_error(F&& f) &&; + template constexpr auto transform_error(F&& f) const &; + template constexpr auto transform_error(F&& f) const &&; // \ref{expected.void.eq}, equality operators template requires is_void_v @@ -8892,6 +9237,288 @@ \tcode{std::move(\exposid{unex})}. \end{itemdescr} +\indexlibrarymember{error_or}{expected}% +\begin{itemdecl} +template constexpr E error_or(G&& e) const &; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\mandates +\tcode{is_copy_constructible_v} is \tcode{true} and +\tcode{is_convertible_v} is \tcode{true}. + +\pnum +\returns +\tcode{std::forward(e)} if \tcode{has_value()} is \tcode{true}, +\tcode{error()} otherwise. +\end{itemdescr} + +\indexlibrarymember{error_or}{expected}% +\begin{itemdecl} +template constexpr E error_or(G&& e) &&; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\mandates +\tcode{is_move_constructible_v} is \tcode{true} and +\tcode{is_convertible_v} is \tcode{true}. + +\pnum +\returns +\tcode{std::forward(e)} if \tcode{has_value()} is \tcode{true}, +\tcode{std::move(error())} otherwise. +\end{itemdescr} + +\rSec3[expected.void.monadic]{Monadic operations} + +\indexlibrarymember{and_then}{expected}% +\begin{itemdecl} +template constexpr auto and_then(F&& f) &; +template constexpr auto and_then(F&& f) const &; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{U} be \tcode{remove_cvref_t>}. + +\pnum +\constraints +\tcode{is_copy_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{U} is a specialization of \tcode{expected} and +\tcode{is_same_v} is \tcode{true}. + +\pnum +\effects +Equivalent to: +\begin{codeblock} +if (has_value()) + return invoke(std::forward(f)); +else + return U(unexpect, error()); +\end{codeblock} +\end{itemdescr} + +\indexlibrarymember{and_then}{expected}% +\begin{itemdecl} +template constexpr auto and_then(F&& f) &&; +template constexpr auto and_then(F&& f) const &&; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{U} be \tcode{remove_cvref_t>}. + +\pnum +\constraints +\tcode{is_move_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{U} is a specialization of \tcode{expected} and +\tcode{is_same_v} is \tcode{true}. + +\pnum +\effects +Equivalent to: +\begin{codeblock} +if (has_value()) + return invoke(std::forward(f)); +else + return U(unexpect, std::move(error())); +\end{codeblock} +\end{itemdescr} + +\indexlibrarymember{or_else}{expected}% +\begin{itemdecl} +template constexpr auto or_else(F&& f) &; +template constexpr auto or_else(F&& f) const &; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{G} be \tcode{remove_cvref_t>}. + +\pnum +\mandates +\tcode{G} is a specialization of \tcode{expected} and +\tcode{is_same_v} is \tcode{true}. + +\pnum +\effects +Equivalent to: +\begin{codeblock} +if (has_value()) + return G(); +else + return invoke(std::forward(f), error()); +\end{codeblock} +\end{itemdescr} + +\indexlibrarymember{or_else}{expected}% +\begin{itemdecl} +template constexpr auto or_else(F&& f) &&; +template constexpr auto or_else(F&& f) const &&; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{G} be +\tcode{remove_cvref_t>}. + +\pnum +\mandates +\tcode{G} is a specialization of \tcode{expected} and +\tcode{is_same_v} is \tcode{true}. + +\pnum +\effects +Equivalent to: +\begin{codeblock} +if (has_value()) + return G(); +else + return invoke(std::forward(f), std::move(error())); +\end{codeblock} +\end{itemdescr} + +\indexlibrarymember{transform}{expected}% +\begin{itemdecl} +template constexpr auto transform(F&& f) &; +template constexpr auto transform(F&& f) const &; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{U} be \tcode{remove_cv_t>}. + +\pnum +\constraints +\tcode{is_copy_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{U} is a valid value type for \tcode{expected}. If \tcode{is_void_v} is +\tcode{false}, the declaration +\begin{codeblock} +U u(invoke(std::forward(f))); +\end{codeblock} +is well-formed. + +\pnum +\effects +\begin{itemize} +\item +If \tcode{has_value()} is \tcode{false}, returns +\tcode{expected(unexpect, error())}. +\item +Otherwise, if \tcode{is_void_v} is \tcode{false}, returns an +\tcode{expected} object whose \exposid{has_val} member is \tcode{true} and +\exposid{val} member is direct-non-list-initialized with +\tcode{invoke(std::forward(f))}. +\item +Otherwise, evaluates \tcode{invoke(std::forward(f))} and then returns +\tcode{expected()}. +\end{itemize} +\end{itemdescr} + +\indexlibrarymember{transform}{expected}% +\begin{itemdecl} +template constexpr auto transform(F&& f) &&; +template constexpr auto transform(F&& f) const &&; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{U} be \tcode{remove_cv_t>}. + +\pnum +\constraints +\tcode{is_move_constructible_v} is \tcode{true}. + +\pnum +\mandates +\tcode{U} is a valid value type for \tcode{expected}. If \tcode{is_void_v} is +\tcode{false}, the declaration +\begin{codeblock} +U u(invoke(std::forward(f))); +\end{codeblock} +is well-formed. + +\pnum +\effects +\begin{itemize} +\item +If \tcode{has_value()} is \tcode{false}, returns +\tcode{expected(unexpect, std::move(error()))}. +\item +Otherwise, if \tcode{is_void_v} is \tcode{false}, returns an +\tcode{expected} object whose \exposid{has_val} member is \tcode{true} and +\exposid{val} member is direct-non-list-initialized with +\tcode{invoke(std::forward(f))}. +\item +Otherwise, evaluates \tcode{invoke(std::forward(f))} and then returns +\tcode{expected()}. +\end{itemize} +\end{itemdescr} + +\indexlibrarymember{transform_error}{expected}% +\begin{itemdecl} +template constexpr auto transform_error(F&& f) &; +template constexpr auto transform_error(F&& f) const &; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{G} be \tcode{remove_cv_t>}. + +\pnum +\mandates +\tcode{G} is a valid value type for \tcode{expected} and the declaration +\begin{codeblock} +G g(invoke(std::forward(f), error())); +\end{codeblock} +is well-formed. + +\pnum +\returns +If \tcode{has_value()} is \tcode{true}, \tcode{expected()}; otherwise, an +\tcode{expected} object whose \exposid{has_val} member is \tcode{false} +and \exposid{unex} member is direct-non-list-initialized with +\tcode{invoke(std::for\-ward(f), error())}. +\end{itemdescr} + +\indexlibrarymember{transform_error}{expected}% +\begin{itemdecl} +template constexpr auto transform_error(F&& f) &&; +template constexpr auto transform_error(F&& f) const &&; +\end{itemdecl} + +\begin{itemdescr} +\pnum +Let \tcode{G} be +\tcode{remove_cv_t>}. + +\pnum +\mandates +\tcode{G} is a valid value type for \tcode{expected} and the declaration +\begin{codeblock} +G g(invoke(std::forward(f), std::move(error()))); +\end{codeblock} +is well-formed. + +\pnum +\returns +If \tcode{has_value()} is \tcode{true}, \tcode{expected()}; otherwise, an +\tcode{expected} object whose \exposid{has_val} member is \tcode{false} +and \exposid{unex} member is direct-non-list-initialized with +\tcode{invoke(std::for\-ward(f), std::move(error()))}. +\end{itemdescr} + \rSec3[expected.void.eq]{Equality operators} \indexlibrarymember{operator==}{expected}% From 53b8b3a97175fa6c823981e33ae762d461fb49d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Thu, 15 Dec 2022 18:40:55 +0000 Subject: [PATCH 223/257] [expected.object.monadic] Usual "for some invented variable" wording --- source/utilities.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index 8eb2412154..c5fd5c1a77 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -8490,7 +8490,7 @@ \begin{codeblock} U u(invoke(std::forward(f), std::move(value()))); \end{codeblock} -is well-formed. +is well-formed for some invented variable \tcode{u}. \pnum \effects From 63c3c1cb2224be610e9246eb920931dc976f1b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 16 Nov 2022 18:53:11 +0000 Subject: [PATCH 224/257] P2696R0 Introduce Cpp17Swappable as additional convenience requirements Editorial notes: * Added a cross-reference to [swappable.requirements] in [optional.swap]. * This change overwrites two earlier editorial improvements of the "swappable" wording from a7f17181ef5b59ad728b421a83975209406fa037. --- source/containers.tex | 14 ++++++++------ source/iterators.tex | 5 ++--- source/lib-intro.tex | 12 +++++++----- source/support.tex | 7 +++---- source/time.tex | 4 +--- source/utilities.tex | 23 +++++++++++------------ 6 files changed, 32 insertions(+), 33 deletions(-) diff --git a/source/containers.tex b/source/containers.tex index fd527681c8..bbe845b29e 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -612,13 +612,13 @@ container type other than \tcode{array}, shall exchange the values of \tcode{a} and \tcode{b} without invoking any move, copy, or swap operations on the individual container elements. -Lvalues of any \tcode{Compare}, \tcode{Pred}, or \tcode{Hash} types -belonging to \tcode{a} and \tcode{b} shall be swappable +Any \tcode{Compare}, \tcode{Pred}, or \tcode{Hash} types +belonging to \tcode{a} and \tcode{b} shall meet the \oldconcept{Swappable} requirements and shall be exchanged by calling \tcode{swap} as described in~\ref{swappable.requirements}. If \tcode{allocator_traits::propagate_on_container_swap::value} is \tcode{true}, then -lvalues of type \tcode{allocator_type} shall be swappable and +\tcode{allocator_type} shall meet the \oldconcept{Swap\-pable} requirements and the allocators of \tcode{a} and \tcode{b} shall also be exchanged by calling \tcode{swap} as described in~\ref{swappable.requirements}. Otherwise, the allocators shall not be swapped, and the behavior is @@ -1550,9 +1550,10 @@ For \tcode{vector} and \tcode{deque}, \tcode{T} is also \oldconcept{MoveInsertable} into \tcode{X}, +and \tcode{T} meets the \oldconcept{MoveConstructible}, \oldconcept{MoveAssignable}, and -lvalues of type \tcode{T} are swappable\iref{swappable.requirements}. +\oldconcept{Swappable}\iref{swappable.requirements} requirements. Neither \tcode{i} nor \tcode{j} are iterators into \tcode{a}. \pnum @@ -1584,9 +1585,10 @@ For \tcode{vector} and \tcode{deque}, \tcode{T} is also \oldconcept{MoveInsertable} into \tcode{X}, +and \tcode{T} meets the \oldconcept{MoveConstructible}, -\oldconcept{MoveAssignable}, and -lvalues of type \tcode{T} are swappable\iref{swappable.requirements}. +\oldconcept{Move\-Assignable}, and +\oldconcept{Swappable}\iref{swappable.requirements} requirements. \tcode{rg} and \tcode{a} do not overlap. \pnum diff --git a/source/iterators.tex b/source/iterators.tex index 3c825621f8..28b2c17380 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -2011,9 +2011,8 @@ \pnum A type \tcode{X} meets the \defnoldconcept{Iterator} requirements if: \begin{itemize} -\item \tcode{X} meets the \oldconcept{CopyConstructible}, \oldconcept{CopyAssignable}, and -\oldconcept{Destructible} requirements\iref{utility.arg.requirements} and lvalues -of type \tcode{X} are swappable\iref{swappable.requirements}, and +\item \tcode{X} meets the \oldconcept{CopyConstructible}, \oldconcept{CopyAssignable}, \oldconcept{Swappable}, and +\oldconcept{Destructible} requirements\iref{utility.arg.requirements,swappable.requirements}, and \item \tcode{iterator_traits::difference_type} is a signed integer type or \keyword{void}, and diff --git a/source/lib-intro.tex b/source/lib-intro.tex index e250446322..1d355057bf 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1766,6 +1766,10 @@ An rvalue or lvalue \tcode{t} is \defn{swappable} if and only if \tcode{t} is swappable with any rvalue or lvalue, respectively, of type \tcode{T}. +\pnum +A type \tcode{X} meets the \oldconcept{Swappable} requirements +if lvalues of type \tcode{X} are swappable. + \pnum A type \tcode{X} meeting any of the iterator requirements\iref{iterator.requirements} meets the \oldconcept{ValueSwappable} requirements if, @@ -1789,7 +1793,7 @@ // for rvalues and lvalues } -// Preconditions: lvalues of \tcode{T} are swappable. +// Preconditions: \tcode{T} meets the \oldconcept{Swappable} requirements. template void lv_swap(T& t1, T& t2) { using std::swap; @@ -1828,9 +1832,7 @@ \begin{itemize} \item \tcode{P} meets the \oldconcept{EqualityComparable}, \oldconcept{DefaultConstructible}, \oldconcept{CopyConstructible}, \oldconcept{\-Copy\-Assign\-able}, -and \oldconcept{Destructible} requirements, - -\item lvalues of type \tcode{P} are swappable\iref{swappable.requirements}, +\oldconcept{Swappable}, and \oldconcept{Destructible} requirements, \item the expressions shown in \tref{cpp17.nullablepointer} are valid and have the indicated semantics, and @@ -2636,7 +2638,7 @@ \tcode{true_type} only if an allocator of type \tcode{X} should be swapped when the client container is swapped; if so, -lvalues of type \tcode{X} shall be swappable\iref{swappable.requirements} and +\tcode{X} shall meet the \oldconcept{Swappable} requirements\iref{swappable.requirements} and the \tcode{swap} operation shall not throw exceptions. \pnum diff --git a/source/support.tex b/source/support.tex index 9dc3877511..62d366aca3 100644 --- a/source/support.tex +++ b/source/support.tex @@ -3397,11 +3397,10 @@ The type \tcode{source_location} meets the \oldconcept{DefaultConstructible}, \oldconcept{CopyConstructible}, -\oldconcept{Copy\-Assignable}, and +\oldconcept{Copy\-Assignable}, +\oldconcept{Swappable}, and \oldconcept{Destructible} -requirements\iref{utility.arg.requirements}. -Lvalues of type \tcode{source_location} -are swappable\iref{swappable.requirements}. +requirements\iref{utility.arg.requirements,swappable.requirements}. All of the following conditions are \tcode{true}: \begin{itemize} \item \tcode{is_nothrow_move_constructible_v} diff --git a/source/time.tex b/source/time.tex index f45b163df2..3b22590cd7 100644 --- a/source/time.tex +++ b/source/time.tex @@ -1017,6 +1017,7 @@ \item the types \tcode{TC::rep}, \tcode{TC::duration}, and \tcode{TC::time_point} meet the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) +and \oldconcept{Swappable}\iref{swappable.requirements} requirements and the requirements of numeric types\iref{numeric.requirements}. \begin{note} @@ -1024,9 +1025,6 @@ that operations on these types will not throw exceptions. \end{note} -\item lvalues of the types \tcode{TC::rep}, \tcode{TC::duration}, and -\tcode{TC::time_point} are swappable\iref{swappable.requirements}, - \item the function \tcode{TC::now()} does not throw exceptions, and \item the type \tcode{TC::time_point::clock} meets the \oldconcept{TrivialClock} diff --git a/source/utilities.tex b/source/utilities.tex index c5fd5c1a77..783dfc2326 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -2472,6 +2472,9 @@ \end{itemdecl} \begin{itemdescr} +\pnum +Let $i$ be in the range \range{0}{sizeof...(Types)} in order. + \pnum \mandates \begin{itemize} @@ -2485,13 +2488,11 @@ \pnum \expects -Each element in \tcode{*this} is swappable with\iref{swappable.requirements} -the corresponding element in \tcode{rhs}. +For all $i$, \tcode{get<$i$>(*this)} is swappable with\iref{swappable.requirements} \tcode{get<$i$>(rhs)}. \pnum \effects -Calls \tcode{swap} for each element in \tcode{*this} and its -corresponding element in \tcode{rhs}. +For each $i$, calls \tcode{swap} for \tcode{get<$i$>(*this)} with \tcode{get<$i$>(rhs)}. \pnum \throws @@ -3942,7 +3943,7 @@ \pnum \expects -Lvalues of type \tcode{T} are swappable. +\tcode{T} meets the \oldconcept{Swappable} requirements\iref{swappable.requirements}. \pnum \effects @@ -5713,7 +5714,7 @@ \pnum \expects -Lvalues of type $\tcode{T}_i$ are swappable\iref{swappable.requirements}. +Each $\tcode{T}_i$ meets the \oldconcept{Swappable} requirements\iref{swappable.requirements}. \pnum \effects @@ -13732,7 +13733,7 @@ with \tcode{Key} as the function call argument type, the \oldconcept{Default\-Constructible} requirements (\tref{cpp17.defaultconstructible}), the \oldconcept{CopyAssignable} requirements (\tref{cpp17.copyassignable}), -\item be swappable\iref{swappable.requirements} for lvalues, +the \oldconcept{Swappable} requirements\iref{swappable.requirements}, \item meet the requirement that if \tcode{k1 == k2} is \tcode{true}, \tcode{h(k1) == h(k2)} is also \tcode{true}, where \tcode{h} is an object of type \tcode{hash} and \tcode{k1} and \tcode{k2} are objects of type \tcode{Key}; @@ -15661,13 +15662,11 @@ \begin{itemize} \item \oldconcept{DefaultConstructible} (\tref{cpp17.defaultconstructible}), \item \oldconcept{CopyConstructible} (\tref{cpp17.copyconstructible}), -\item \oldconcept{CopyAssignable} (\tref{cpp17.copyassignable}), and +\item \oldconcept{CopyAssignable} (\tref{cpp17.copyassignable}), +\item \oldconcept{Swappable}\iref{swappable.requirements}, and \item \oldconcept{Destructible} (\tref{cpp17.destructible}) \end{itemize} -requirements, - -\item -it is swappable\iref{swappable.requirements} for lvalues, and +requirements, and \item the expressions shown in \tref{formatter.basic} are valid and From 0bb57d5ebffa7170fbc80724f55a6ac2a82f2e83 Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Fri, 25 Nov 2022 14:56:24 +0800 Subject: [PATCH 225/257] [format.arg] Add std:: for forward --- source/utilities.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index 783dfc2326..fa13fa6ae2 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -17236,7 +17236,7 @@ \begin{itemdescr} \pnum \effects -Equivalent to: \tcode{return visit(forward(vis), arg.value);} +Equivalent to: \tcode{return visit(std::forward(vis), arg.value);} \end{itemdescr} \rSec3[format.arg.store]{Class template \exposid{format-arg-store}} From c88fb46327d87d78d571b7e1076e1916eaf7e310 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Tue, 15 Nov 2022 07:46:41 -0800 Subject: [PATCH 226/257] [expr.unary.op] Say "the ~ operator" consistently, remove "unary" We are currently using the term "unary complement operator" to refer to the "~" operator without ever giving it that name. This change removes the use of that undefined term. --- source/expressions.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index ed3d56eda8..473fd2bafe 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -4664,7 +4664,7 @@ \pnum \indextext{operator!ones' complement}% -The operand of \tcode{\~{}} shall have integral or unscoped enumeration type. +The operand of the \tcode{\~{}} operator shall have integral or unscoped enumeration type. Integral promotions are performed. The type of the result is the type of the promoted operand. % FIXME: [basic.fundamental]/p5 uses $x_i$; [expr] uses $\tcode{x}_i$. @@ -4677,7 +4677,7 @@ There is an ambiguity in the grammar when \tcode{\~{}} is followed by a \grammarterm{type-name} or \grammarterm{decltype-specifier}. -The ambiguity is resolved by treating \tcode{\~{}} as the unary complement +The ambiguity is resolved by treating \tcode{\~{}} as the operator rather than as the start of an \grammarterm{unqualified-id} naming a destructor. \begin{note} From bef02b89464fe6f4be3926d62defc92986ae4532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Tue, 22 Nov 2022 16:28:42 +0000 Subject: [PATCH 227/257] [expr.unary.op] Notes naming unary ops as {ones',two's} complement The terms "one's complement" and "two's complement" are well-known, and it is useful to associate them with these operators. --- source/expressions.tex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/expressions.tex b/source/expressions.tex index 473fd2bafe..890c5fa796 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -4653,6 +4653,10 @@ of an unsigned quantity is computed by subtracting its value from $2^n$, where $n$ is the number of bits in the promoted operand. The type of the result is the type of the promoted operand. +\begin{note} +The result is the two's complement of the operand +(where operand and result are considered as unsigned). +\end{note} \pnum \indextext{operator!logical negation}% @@ -4674,6 +4678,10 @@ the coefficient $\tcode{r}_i$ of the base-2 representation of the result \tcode{r} is 1 if $\tcode{x}_i$ is 0, and 0 otherwise. +\begin{note} +The result is the ones' complement of the operand +(where operand and result are considered as unsigned). +\end{note} There is an ambiguity in the grammar when \tcode{\~{}} is followed by a \grammarterm{type-name} or \grammarterm{decltype-specifier}. From 020a312b2aa513a992e488d82db55fd0cd4fa025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 16 Nov 2022 17:48:12 +0000 Subject: [PATCH 228/257] [fs.rec.dir.itr.nonmembers] "for" is a keyword in "range-based for" --- source/iostreams.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/iostreams.tex b/source/iostreams.tex index 2dd834348f..70324454a1 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -16558,7 +16558,7 @@ \pnum These functions enable use of \tcode{recursive_directory_iterator} -with range-based for statements. +with range-based \keyword{for} statements. \indexlibrarymember{begin}{recursive_directory_iterator}% \begin{itemdecl} From 9296c05259da21c7cb9b233d5c05bbd75a01ca3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 23 Nov 2022 01:41:47 +0000 Subject: [PATCH 229/257] [uaxid, macros, etc.] Smaller capital-style glyphs The "hash"/"number" sign is reduced in size and placed on the baseline. This seems to look less distracting and disruptive. We also use the usual small-caps presentation for universal character names. --- source/back.tex | 4 ++-- source/compatibility.tex | 2 +- source/intro.tex | 2 +- source/lex.tex | 2 +- source/macros.tex | 1 + source/uax31.tex | 28 ++++++++++++++-------------- source/utilities.tex | 4 ++-- 7 files changed, 22 insertions(+), 21 deletions(-) diff --git a/source/back.tex b/source/back.tex index b55a47f7cf..40954fd628 100644 --- a/source/back.tex +++ b/source/back.tex @@ -21,12 +21,12 @@ \chapter{Bibliography} \item %%% Format for the following entry is based on that specified at %%% http://www.iec.ch/standardsdev/resources/draftingpublications/directives/principles/referencing.htm - The Unicode Consortium. Unicode Standard Annex, UAX \#29, + The Unicode Consortium. Unicode Standard Annex, \UAX{29}, \doccite{Unicode Text Segmentation} [online]. Edited by Mark Davis. Revision 35; issued for Unicode 12.0.0. 2019-02-15 [viewed 2020-02-23]. Available from: \url{http://www.unicode.org/reports/tr29/tr29-35.html} \item - The Unicode Consortium. Unicode Standard Annex, UAX \#31, + The Unicode Consortium. Unicode Standard Annex, \UAX{31}, \doccite{Unicode Identifier and Pattern Syntax} [online]. Edited by Mark Davis. Revision 33; issued for Unicode 13.0.0. 2020-02-13 [viewed 2021-06-08]. diff --git a/source/compatibility.tex b/source/compatibility.tex index 44a0fb5efb..fbf61627fb 100644 --- a/source/compatibility.tex +++ b/source/compatibility.tex @@ -16,7 +16,7 @@ \diffref{lex.name} \change Previously valid identifiers containing characters -not present in UAX \#44 properties XID_Start or XID_Continue, or +not present in \UAX{44} properties XID_Start or XID_Continue, or not in Normalization Form C, are now rejected. \rationale Prevent confusing characters in identifiers. diff --git a/source/intro.tex b/source/intro.tex index 977966c5b3..e14bda23af 100644 --- a/source/intro.tex +++ b/source/intro.tex @@ -76,7 +76,7 @@ Standard Ecma-262, third edition, 1999. \item The Unicode Consortium. -Unicode Standard Annex, UAX \#44, \doccite{Unicode Character Database}. +Unicode Standard Annex, \UAX{44}, \doccite{Unicode Character Database}. Edited by Ken Whistler and Lauren\c{t}iu Iancu. Available from: \url{http://www.unicode.org/reports/tr44/} \item diff --git a/source/lex.tex b/source/lex.tex index 668928caab..57e1e5ba62 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -914,7 +914,7 @@ \indextext{name!length of}% \indextext{name}% The character classes XID_Start and XID_Continue -are Derived Core Properties as described by UAX \#44. +are Derived Core Properties as described by \UAX{44}. \begin{footnote} On systems in which linkers cannot accept extended characters, an encoding of the \grammarterm{universal-character-name} can be used in diff --git a/source/macros.tex b/source/macros.tex index 9f2e6d15a8..c1ef31cada 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -406,6 +406,7 @@ } \newcommand{\uname}[1]{\textsc{#1}} \newcommand{\unicode}[2]{\ucode{#1} \uname{#2}} +\newcommand{\UAX}[1]{\texorpdfstring{UAX~\textsmaller[1]{\raisebox{0.35ex}{\#}}#1}{UAX \##1}} \newcommand{\NTS}[1]{\textsc{#1}} \newcommand{\ntbs}{\NTS{ntbs}} \newcommand{\ntmbs}{\NTS{ntmbs}} diff --git a/source/uax31.tex b/source/uax31.tex index d39674c374..aea6e6b5ba 100644 --- a/source/uax31.tex +++ b/source/uax31.tex @@ -1,14 +1,14 @@ %!TEX root = std.tex -\infannex{uaxid}{Conformance with UAX \#31} +\infannex{uaxid}{Conformance with \UAX{31}} \rSec1[uaxid.general]{General} \pnum This Annex describes the choices made in application of -UAX \#31 (``Unicode Identifier and Pattern Syntax'') -to \Cpp{} in terms of the requirements from UAX \#31 and +\UAX{31} (``Unicode Identifier and Pattern Syntax'') +to \Cpp{} in terms of the requirements from \UAX{31} and how they do or do not apply to \Cpp{}. -In terms of UAX \#31, +In terms of \UAX{31}, \Cpp{} conforms by meeting the requirements R1 ``Default Identifiers'' and R4 ``Equivalent Normalized Identifiers''. @@ -20,8 +20,8 @@ \rSec2[uaxid.def.general]{General} \pnum -UAX \#31 specifies a default syntax for identifiers -based on properties from the Unicode Character Database, UAX \#44. +\UAX{31} specifies a default syntax for identifiers +based on properties from the Unicode Character Database, \UAX{44}. The general syntax is \begin{codeblock} := * ( +)* @@ -33,7 +33,7 @@ to the set of permitted \tcode{} characters, the \tcode{} set is empty, and the \tcode{} characters are unmodified. -In the grammar used in UAX \#31, this is +In the grammar used in \UAX{31}, this is \begin{codeblock} := * := XID_Start + @\textrm{\ucode{005f}}@ @@ -49,8 +49,8 @@ \rSec2[uaxid.def.rfmt]{R1a Restricted format characters} \pnum -If an implementation of UAX \#31 wishes to allow format characters -such as ZERO WIDTH JOINER or ZERO WIDTH NON-JOINER +If an implementation of \UAX{31} wishes to allow format characters +such as \unicode{200d}{zero width joiner} or \unicode{200c}{zero width non-joiner} it must define a profile allowing them, or describe precisely which combinations are permitted. @@ -60,13 +60,13 @@ \rSec2[uaxid.def.stable]{R1b Stable identifiers} \pnum -An implementation of UAX \#31 may choose to guarantee +An implementation of \UAX{31} may choose to guarantee that identifiers are stable across versions of the Unicode Standard. Once a string qualifies as an identifier it does so in all future versions. \pnum \Cpp{} does not make this guarantee, -except to the extent that UAX \#31 guarantees +except to the extent that \UAX{31} guarantees the stability of the XID_Start and XID_Continue properties. \rSec1[uaxid.immutable]{R2 Immutable identifiers} @@ -85,7 +85,7 @@ \rSec1[uaxid.pattern]{R3 Pattern_White_Space and Pattern_Syntax characters} \pnum -UAX \#31 describes how formal languages +\UAX{31} describes how formal languages such as computer languages should describe and implement their use of whitespace and syntactically significant characters during the processes of lexing and parsing. @@ -96,7 +96,7 @@ \rSec1[uaxid.eqn]{R4 Equivalent normalized identifiers} \pnum -UAX \#31 requires that implementations describe +\UAX{31} requires that implementations describe how identifiers are compared and considered equivalent. \pnum @@ -115,7 +115,7 @@ \pnum If any characters are excluded from normalization, -UAX \#31 requires a precise specification of those exclusions. +\UAX{31} requires a precise specification of those exclusions. \pnum \Cpp{} does not make any such exclusions. diff --git a/source/utilities.tex b/source/utilities.tex index fa13fa6ae2..e8494700ff 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15017,7 +15017,7 @@ implementations should estimate the width of a string as the sum of estimated widths of the first code points in its extended grapheme clusters. -The extended grapheme clusters of a string are defined by UAX \#29. +The extended grapheme clusters of a string are defined by \UAX{29}. The estimated width of the following code points is 2: \begin{itemize} \item \ucode{1100} -- \ucode{115f} @@ -15963,7 +15963,7 @@ a UCS scalar value whose Unicode property \tcode{General_Category} has a value in the groups \tcode{Separator} (\tcode{Z}) or \tcode{Other} (\tcode{C}) or to a UCS scalar value which has the Unicode property \tcode{Grapheme_Extend=Yes}, -as described by table 12 of UAX \#44, or +as described by table 12 of \UAX{44}, or \item \placeholder{CE} is not a Unicode encoding and From cee095e75a97fb88a7053e360b3bc06d36a6b687 Mon Sep 17 00:00:00 2001 From: Alisdair Meredith Date: Fri, 16 Dec 2022 06:51:26 +0700 Subject: [PATCH 230/257] [depr.conversions.string] remove redundent respecification (#6004) There are several typedef names defined precisely in the deprecated code conversion facets classes that are redundantly respecified in text. Nowhere else in the library does this; any specified typedef names are _see below_ definitions, not repeats of the class definition. Needless redundancy is always a risk of divergence, however small, so remove the respecification in text form. --- source/future.tex | 56 +++++------------------------------------------ 1 file changed, 5 insertions(+), 51 deletions(-) diff --git a/source/future.tex b/source/future.tex index a674ec7901..094561712d 100644 --- a/source/future.tex +++ b/source/future.tex @@ -2133,6 +2133,10 @@ \end{example} \indexlibraryglobal{wstring_convert}% +\indexlibrarymember{byte_string}{wstring_convert}% +\indexlibrarymember{int_type}{wstring_convert}% +\indexlibrarymember{state_type}{wstring_convert}% +\indexlibrarymember{wide_string}{wstring_convert}% \begin{codeblock} namespace std { template, ByteAlloc>; -\end{itemdecl} - -\begin{itemdescr} -\pnum -The type shall be a synonym for \tcode{basic_string, ByteAlloc>}. -\end{itemdescr} - \indexlibrarymember{converted}{wstring_convert}% \begin{itemdecl} size_t converted() const noexcept; @@ -2261,16 +2255,6 @@ Otherwise, the member function throws an object of class \tcode{range_error}. \end{itemdescr} -\indexlibrarymember{int_type}{wstring_convert}% -\begin{itemdecl} -using int_type = typename wide_string::traits_type::int_type; -\end{itemdecl} - -\begin{itemdescr} -\pnum -The type shall be a synonym for \tcode{wide_string::traits_type::int_type}. -\end{itemdescr} - \indexlibrarymember{state}{wstring_convert}% \begin{itemdecl} state_type state() const; @@ -2282,16 +2266,6 @@ \tcode{cvtstate}. \end{itemdescr} -\indexlibrarymember{state_type}{wstring_convert}% -\begin{itemdecl} -using state_type = typename Codecvt::state_type; -\end{itemdecl} - -\begin{itemdescr} -\pnum -The type shall be a synonym for \tcode{Codecvt::state_type}. -\end{itemdescr} - \indexlibrarymember{to_bytes}{wstring_convert}% \begin{itemdecl} byte_string to_bytes(Elem wchar); @@ -2329,17 +2303,6 @@ Otherwise, the member function shall throw an object of class \tcode{range_error}. \end{itemdescr} -\indexlibrarymember{wide_string}{wstring_convert}% -\begin{itemdecl} -using wide_string = basic_string, WideAlloc>; -\end{itemdecl} - -\begin{itemdescr} -\pnum -The type shall be a synonym for \tcode{basic_string, WideAlloc>}. -\end{itemdescr} - \indexlibraryctor{wstring_convert}% \begin{itemdecl} explicit wstring_convert(Codecvt* pcvt); @@ -2390,6 +2353,7 @@ without affecting any streams or locales. \indexlibraryglobal{wbuffer_convert}% +\indexlibrarymember{state_type}{wbuffer_convert}% \begin{codeblock} namespace std { template> @@ -2476,16 +2440,6 @@ The previous value of \tcode{bufptr}. \end{itemdescr} -\indexlibrarymember{state_type}{wbuffer_convert}% -\begin{itemdecl} -using state_type = typename Codecvt::state_type; -\end{itemdecl} - -\begin{itemdescr} -\pnum -The type shall be a synonym for \tcode{Codecvt::state_type}. -\end{itemdescr} - \indexlibraryctor{wbuffer_convert}% \begin{itemdecl} explicit wbuffer_convert( From 6539709ad059215b5fe60136ccff3132e516ccbc Mon Sep 17 00:00:00 2001 From: Marc Mutz <94039187+marcmutz@users.noreply.github.com> Date: Fri, 16 Dec 2022 00:52:37 +0100 Subject: [PATCH 231/257] [ratio.syn, ratio.si] Add the SI prefixes to the index of library names (#6008) --- source/meta.tex | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/source/meta.tex b/source/meta.tex index 141ad65e7f..dca52ee477 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -2445,26 +2445,26 @@ inline constexpr bool @\libglobal{ratio_greater_equal_v}@ = ratio_greater_equal::value; // \ref{ratio.si}, convenience SI typedefs - using yocto = ratio<1, 1'000'000'000'000'000'000'000'000>; // see below - using zepto = ratio<1, 1'000'000'000'000'000'000'000>; // see below - using atto = ratio<1, 1'000'000'000'000'000'000>; - using femto = ratio<1, 1'000'000'000'000'000>; - using pico = ratio<1, 1'000'000'000'000>; - using nano = ratio<1, 1'000'000'000>; - using micro = ratio<1, 1'000'000>; - using milli = ratio<1, 1'000>; - using centi = ratio<1, 100>; - using deci = ratio<1, 10>; - using deca = ratio< 10, 1>; - using hecto = ratio< 100, 1>; - using kilo = ratio< 1'000, 1>; - using mega = ratio< 1'000'000, 1>; - using giga = ratio< 1'000'000'000, 1>; - using tera = ratio< 1'000'000'000'000, 1>; - using peta = ratio< 1'000'000'000'000'000, 1>; - using exa = ratio< 1'000'000'000'000'000'000, 1>; - using zetta = ratio< 1'000'000'000'000'000'000'000, 1>; // see below - using yotta = ratio<1'000'000'000'000'000'000'000'000, 1>; // see below + using @\libglobal{yocto}@ = ratio<1, 1'000'000'000'000'000'000'000'000>; // see below + using @\libglobal{zepto}@ = ratio<1, 1'000'000'000'000'000'000'000>; // see below + using @\libglobal{atto}@ = ratio<1, 1'000'000'000'000'000'000>; + using @\libglobal{femto}@ = ratio<1, 1'000'000'000'000'000>; + using @\libglobal{pico}@ = ratio<1, 1'000'000'000'000>; + using @\libglobal{nano}@ = ratio<1, 1'000'000'000>; + using @\libglobal{micro}@ = ratio<1, 1'000'000>; + using @\libglobal{milli}@ = ratio<1, 1'000>; + using @\libglobal{centi}@ = ratio<1, 100>; + using @\libglobal{deci}@ = ratio<1, 10>; + using @\libglobal{deca}@ = ratio< 10, 1>; + using @\libglobal{hecto}@ = ratio< 100, 1>; + using @\libglobal{kilo}@ = ratio< 1'000, 1>; + using @\libglobal{mega}@ = ratio< 1'000'000, 1>; + using @\libglobal{giga}@ = ratio< 1'000'000'000, 1>; + using @\libglobal{tera}@ = ratio< 1'000'000'000'000, 1>; + using @\libglobal{peta}@ = ratio< 1'000'000'000'000'000, 1>; + using @\libglobal{exa}@ = ratio< 1'000'000'000'000'000'000, 1>; + using @\libglobal{zetta}@ = ratio< 1'000'000'000'000'000'000'000, 1>; // see below + using @\libglobal{yotta}@ = ratio<1'000'000'000'000'000'000'000'000, 1>; // see below } \end{codeblockdigitsep} @@ -2626,6 +2626,10 @@ \rSec2[ratio.si]{SI types for \tcode{ratio}} \pnum +\indexlibraryglobal{yocto}% +\indexlibraryglobal{zepto}% +\indexlibraryglobal{zetta}% +\indexlibraryglobal{yotta}% For each of the \grammarterm{typedef-name}{s} \tcode{yocto}, \tcode{zepto}, \tcode{zetta}, and \tcode{yotta}, if both of the constants used in its specification are representable by \tcode{intmax_t}, the typedef is From 1bb52db31be002f04ea5977f9900ba4174c7155e Mon Sep 17 00:00:00 2001 From: Anoop Rana <93918384+ranaanoop@users.noreply.github.com> Date: Fri, 16 Dec 2022 05:23:57 +0530 Subject: [PATCH 232/257] [concepts.object] Change "built-in" to "fundamental" types (#6012) --- source/concepts.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 5ff1db5028..e0035ecf2e 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -1205,14 +1205,14 @@ \pnum \begin{note} The \libconcept{semiregular} concept is modeled by types that behave similarly -to built-in types like \tcode{int}, except that they need not +to fundamental types like \tcode{int}, except that they need not be comparable with \tcode{==}. \end{note} \pnum \begin{note} The \libconcept{regular} concept is modeled by types that behave similarly to -built-in types like \tcode{int} and that are comparable with +fundamental types like \tcode{int} and that are comparable with \tcode{==}. \end{note} \end{itemdescr} From ce1cc3b011099b6228b18dad937911c6ea67d309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Sun, 11 Dec 2022 17:03:41 -0400 Subject: [PATCH 233/257] [expr.const] Remove redundant "ill-formed" in "error" comment --- source/expressions.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/expressions.tex b/source/expressions.tex index 890c5fa796..7c9539462d 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -7955,7 +7955,7 @@ return h(); } -int i = hh(); // error: ill-formed, \tcode{hh()} is an immediate-escalating expression +int i = hh(); // error: \tcode{hh()} is an immediate-escalating expression // outside of an immediate-escalating function struct A { From 5d43f0137776fa112d0ffd6ba0e34df34a4cb820 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 13 Dec 2022 12:52:00 +0000 Subject: [PATCH 234/257] [time.zone.leap.members] update note about leap seconds --- source/time.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/time.tex b/source/time.tex index 3b22590cd7..90d82a1048 100644 --- a/source/time.tex +++ b/source/time.tex @@ -10192,7 +10192,7 @@ \tcode{+1s} to indicate a positive leap second or \tcode{-1s} to indicate a negative leap second. \begin{note} -All leap seconds inserted up through 2019 were positive leap seconds. +All leap seconds inserted up through 2022 were positive leap seconds. \end{note} \end{itemdescr} From fd20d4ea9f3ea8653b17169aad61eec843b71718 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Wed, 23 Nov 2022 14:45:43 +0000 Subject: [PATCH 235/257] [time.zone.zonedtime.overview] Rename parameters to match later definitions --- source/time.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/time.tex b/source/time.tex index 90d82a1048..70f6f9a52a 100644 --- a/source/time.tex +++ b/source/time.tex @@ -9620,7 +9620,7 @@ explicit zoned_time(string_view name); template - zoned_time(const zoned_time& zt); + zoned_time(const zoned_time& y); zoned_time(TimeZonePtr z, const sys_time& st); zoned_time(string_view name, const sys_time& st); @@ -9631,17 +9631,17 @@ zoned_time(string_view name, const local_time& tp, choose c); template - zoned_time(TimeZonePtr z, const zoned_time& zt); + zoned_time(TimeZonePtr z, const zoned_time& y); template - zoned_time(TimeZonePtr z, const zoned_time& zt, choose); + zoned_time(TimeZonePtr z, const zoned_time& y, choose); template - zoned_time(string_view name, const zoned_time& zt); + zoned_time(string_view name, const zoned_time& y); template - zoned_time(string_view name, const zoned_time& zt, choose); + zoned_time(string_view name, const zoned_time& y, choose c); zoned_time& operator=(const sys_time& st); - zoned_time& operator=(const local_time& ut); + zoned_time& operator=(const local_time& lt); operator sys_time() const; explicit operator local_time() const; From 9779d4d9fab4519c52e4d78d6e847b19c4c4518c Mon Sep 17 00:00:00 2001 From: Eelis van der Weegen Date: Wed, 16 Nov 2022 10:28:20 +0100 Subject: [PATCH 236/257] [meta.trans.other] Add index entry for invoke_result. --- source/meta.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/meta.tex b/source/meta.tex index dca52ee477..d6d5818296 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -1896,6 +1896,7 @@ otherwise, there is no member \tcode{type}.\br \mandates \tcode{T} is not an incomplete enumeration type. \\ \rowsep +\indexlibraryglobal{invoke_result}% \tcode{template}\br \tcode{struct invoke_result;} From 137728f0830824c6058648a846376eec80e5cab3 Mon Sep 17 00:00:00 2001 From: Michael Florian Hava Date: Fri, 16 Dec 2022 02:10:55 +0100 Subject: [PATCH 237/257] [coro.generator.promise] Fix template parameters (#6009) Some of the template parameters of `yield_value` were inconsistent, and the synopsis contained an outright typo. This change uses `R2` consistently since the parameter is a reference. --- source/ranges.tex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 9eaa93acd4..02d8762806 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -15215,8 +15215,8 @@ @\libconcept{constructible_from}@, const remove_reference_t&>; template - requires @\libconcept{same_as}@::yielded, yielded> - auto yield_value(ranges::elements_of&&, Unused> g) noexcept; + requires @\libconcept{same_as}@::yielded, yielded> + auto yield_value(ranges::elements_of&&, Unused> g) noexcept; template requires @\libconcept{convertible_to}@, yielded> @@ -15341,9 +15341,9 @@ \indexlibrarymember{yield_value}{generator::promise_type}% \begin{itemdecl} -template - requires @\libconcept{same_as}@::yielded, yielded> - auto yield_value(ranges::elements_of&&, Unused> g) noexcept; +template + requires @\libconcept{same_as}@::yielded, yielded> + auto yield_value(ranges::elements_of&&, Unused> g) noexcept; \end{itemdecl} \begin{itemdescr} From 5d6099c3df78922ee5b5f1d1c42a5c762d246df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Thu, 15 Dec 2022 23:31:26 +0000 Subject: [PATCH 238/257] [formatter.requirements] Remove one level of list nesting --- source/utilities.tex | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index e8494700ff..1cd05b226c 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15655,9 +15655,7 @@ \rSec3[formatter.requirements]{Formatter requirements} \pnum -A type \tcode{F} meets the \defnnewoldconcept{BasicFormatter} requirements if: -\begin{itemize} -\item +A type \tcode{F} meets the \defnnewoldconcept{BasicFormatter} requirements if it meets the \begin{itemize} \item \oldconcept{DefaultConstructible} (\tref{cpp17.defaultconstructible}), @@ -15667,11 +15665,8 @@ \item \oldconcept{Destructible} (\tref{cpp17.destructible}) \end{itemize} requirements, and - -\item the expressions shown in \tref{formatter.basic} are valid and have the indicated semantics. -\end{itemize} \pnum A type \tcode{F} meets the \defnnewoldconcept{Formatter} requirements From 9e41a1c27de2f676badacbe0c1aac783063b7cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 16 Nov 2022 19:43:58 +0000 Subject: [PATCH 239/257] [time.clock.req] Make list item end with comma, not full stop. Also reformat the itemization source to be more edit-friendly. --- source/time.tex | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/source/time.tex b/source/time.tex index 70f6f9a52a..28bf443fc6 100644 --- a/source/time.tex +++ b/source/time.tex @@ -1012,22 +1012,24 @@ \pnum A type \tcode{TC} meets the \oldconcept{TrivialClock} requirements if: \begin{itemize} -\item \tcode{TC} meets the \oldconcept{Clock} requirements, +\item +\tcode{TC} meets the \oldconcept{Clock} requirements, -\item the types \tcode{TC::rep}, \tcode{TC::duration}, and \tcode{TC::time_point} +\item +the types \tcode{TC::rep}, \tcode{TC::duration}, and \tcode{TC::time_point} meet the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) and \oldconcept{LessThanComparable} (\tref{cpp17.lessthancomparable}) and \oldconcept{Swappable}\iref{swappable.requirements} requirements and the requirements of -numeric types\iref{numeric.requirements}. +numeric types\iref{numeric.requirements}, \begin{note} This means, in particular, that operations on these types will not throw exceptions. \end{note} - -\item the function \tcode{TC::now()} does not throw exceptions, and - -\item the type \tcode{TC::time_point::clock} meets the \oldconcept{TrivialClock} +\item +the function \tcode{TC::now()} does not throw exceptions, and +\item +the type \tcode{TC::time_point::clock} meets the \oldconcept{TrivialClock} requirements, recursively. \end{itemize} From 5ef31f3fc1531d9e6e923cb57bf6e5ecec59ed4e Mon Sep 17 00:00:00 2001 From: languagelawyer Date: Thu, 25 Jun 2020 10:54:17 +0300 Subject: [PATCH 240/257] [expr.unary.op] Fix usage of "result" --- source/expressions.tex | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index 7c9539462d..67edaeebf1 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -4548,13 +4548,12 @@ \pnum \indextext{expression!unary operator}% \indextext{operator!unary}% -The unary \tcode{*} operator performs \defn{indirection}: +The unary \tcode{*} operator performs \defn{indirection}. \indextext{dereferencing|see{indirection}}% -the expression to which it is applied shall be a pointer to an object -type, or a pointer to a function type and the result is an lvalue -referring to the object or function to which the expression points. If -the type of the expression is ``pointer to \tcode{T}'', the type of the -result is ``\tcode{T}''. +Its operand shall be a prvalue of type ``pointer to \tcode{T}'', +where \tcode{T} is an object or function type. +The operator yields an lvalue of type \tcode{T} +denoting the object or function to which the operand points. \begin{note} \indextext{type!incomplete}% Indirection through a pointer to an incomplete type (other than @@ -4564,7 +4563,7 @@ \end{note} \pnum -The result of each of the following unary operators is a prvalue. +Each of the following unary operators yields a prvalue. \pnum \indextext{name!address of cv-qualified}% From 8c60752c7eb28e1ff1cc9e088d7836957356f559 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 26 Apr 2022 10:18:11 +0100 Subject: [PATCH 241/257] [optional.ctor], [expected.object.ctor] Add converts-from-any-cvref --- source/utilities.tex | 73 +++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 49 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index 1cd05b226c..6a04cc4dbd 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -3319,6 +3319,18 @@ \rSec3[optional.ctor]{Constructors} +\pnum +The exposition-only variable template \exposid{converts-from-any-cvref} +is used by some constructors for \tcode{optional}. +\begin{codeblock} +template +constexpr bool @\exposid{converts-from-any-cvref}@ = // \expos + disjunction_v, is_convertible, + is_constructible, is_convertible, + is_constructible, is_convertible, + is_constructible, is_convertible>; +\end{codeblock} + \indexlibraryctor{optional}% \begin{itemdecl} constexpr optional() noexcept; @@ -3493,15 +3505,8 @@ \pnum \constraints \begin{itemize} -\item \tcode{is_constructible_v} is \tcode{true}, -\item \tcode{is_constructible_v\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&\&>} is \tcode{false}, -\item \tcode{is_convertible_v\&, T>} is \tcode{false}, -\item \tcode{is_convertible_v\&\&, T>} is \tcode{false}, -\item \tcode{is_convertible_v\&, T>} is \tcode{false}, and -\item \tcode{is_convertible_v\&\&, T>} is \tcode{false}. +\item \tcode{is_constructible_v} is \tcode{true}, and +\item \tcode{\exposid{converts-from-any-cvref}>} is \tcode{false}. \end{itemize} \pnum @@ -3534,15 +3539,8 @@ \pnum \constraints \begin{itemize} -\item \tcode{is_constructible_v} is \tcode{true}, -\item \tcode{is_constructible_v\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&\&>} is \tcode{false}, -\item \tcode{is_convertible_v\&, T>} is \tcode{false}, -\item \tcode{is_convertible_v\&\&, T>} is \tcode{false}, -\item \tcode{is_convertible_v\&, T>} is \tcode{false}, and -\item \tcode{is_convertible_v\&\&, T>} is \tcode{false}. +\item \tcode{is_constructible_v} is \tcode{true}, and +\item \tcode{\exposid{converts-from-any-cvref}>} is \tcode{false}. \end{itemize} \pnum @@ -3751,14 +3749,7 @@ \begin{itemize} \item \tcode{is_constructible_v} is \tcode{true}, \item \tcode{is_assignable_v} is \tcode{true}, -\item \tcode{is_constructible_v\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&\&>} is \tcode{false}, -\item \tcode{is_convertible_v\&, T>} is \tcode{false}, -\item \tcode{is_convertible_v\&\&, T>} is \tcode{false}, -\item \tcode{is_convertible_v\&, T>} is \tcode{false}, -\item \tcode{is_convertible_v\&\&, T>} is \tcode{false}, +\item \tcode{\exposid{converts-from-any-cvref}>} is \tcode{false}, \item \tcode{is_assignable_v\&>} is \tcode{false}, \item \tcode{is_assignable_v\&\&>} is \tcode{false}, \item \tcode{is_assignable_v\&>} is \tcode{false}, and @@ -3813,14 +3804,7 @@ \begin{itemize} \item \tcode{is_constructible_v} is \tcode{true}, \item \tcode{is_assignable_v} is \tcode{true}, -\item \tcode{is_constructible_v\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&>} is \tcode{false}, -\item \tcode{is_constructible_v\&\&>} is \tcode{false}, -\item \tcode{is_convertible_v\&, T>} is \tcode{false}, -\item \tcode{is_convertible_v\&\&, T>} is \tcode{false}, -\item \tcode{is_convertible_v\&, T>} is \tcode{false}, -\item \tcode{is_convertible_v\&\&, T>} is \tcode{false}, +\item \tcode{\exposid{converts-from-any-cvref}>} is \tcode{false}, \item \tcode{is_assignable_v\&>} is \tcode{false}, \item \tcode{is_assignable_v\&\&>} is \tcode{false}, \item \tcode{is_assignable_v\&>} is \tcode{false}, and @@ -7377,6 +7361,11 @@ \rSec3[expected.object.cons]{Constructors} +\pnum +The exposition-only variable template \exposid{converts-from-any-cvref} +defined in \ref{optional.ctor} +is used by some constructors for \tcode{expected}. + \indexlibraryctor{expected}% \begin{itemdecl} constexpr expected(); @@ -7515,21 +7504,7 @@ \item \tcode{is_constructible_v} is \tcode{true}; and \item -\tcode{is_constructible_v\&>} is \tcode{false}; and -\item -\tcode{is_constructible_v>} is \tcode{false}; and -\item -\tcode{is_constructible_v\&>} is \tcode{false}; and -\item -\tcode{is_constructible_v>} is \tcode{false}; and -\item -\tcode{is_convertible_v\&, T>} is \tcode{false}; and -\item -\tcode{is_convertible_v\&\&, T>} is \tcode{false}; and -\item -\tcode{is_convertible_v\&, T>} is \tcode{false}; and -\item -\tcode{is_convertible_v\&\&, T>} is \tcode{false}; and +\tcode{\exposid{converts-from-any-cvref}>} is \tcode{false}; and \item \tcode{is_constructible_v, expected\&>} is \tcode{false}; and \item From bbf85f437f22d8871453fda7ccd575ba615a332a Mon Sep 17 00:00:00 2001 From: Blackteahamburger Date: Fri, 7 Oct 2022 19:31:40 +0800 Subject: [PATCH 242/257] [containers] Blank line between the private and public members --- source/containers.tex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/containers.tex b/source/containers.tex index bbe845b29e..f94aeea939 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -9183,6 +9183,7 @@ class @\libmember{reference}{vector}@ { friend class vector; constexpr reference() noexcept; + public: constexpr reference(const reference&) = default; constexpr ~reference(); @@ -9642,6 +9643,7 @@ protected: Compare comp; value_compare(Compare c) : comp(c) {} + public: bool operator()(const value_type& x, const value_type& y) const { return comp(x.first, y.first); @@ -10224,6 +10226,7 @@ protected: Compare comp; value_compare(Compare c) : comp(c) { } + public: bool operator()(const value_type& x, const value_type& y) const { return comp(x.first, y.first); @@ -14709,6 +14712,7 @@ private: key_compare comp; // \expos value_compare(key_compare c) : comp(c) { } // \expos + public: bool operator()(const_reference x, const_reference y) const { return comp(x.first, y.first); @@ -15851,6 +15855,7 @@ private: key_compare comp; // \expos value_compare(key_compare c) : comp(c) { } // \expos + public: bool operator()(const_reference x, const_reference y) const { return comp(x.first, y.first); From 7253212d2c37d0b7a008a37cb3f8c59114540aca Mon Sep 17 00:00:00 2001 From: Blackteahamburger Date: Sat, 12 Nov 2022 03:35:34 +0000 Subject: [PATCH 243/257] [iterators] Blank line between the private and public members --- source/iterators.tex | 1 + 1 file changed, 1 insertion(+) diff --git a/source/iterators.tex b/source/iterators.tex index 28b2c17380..4e32a85012 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -5280,6 +5280,7 @@ constexpr move_sentinel& operator=(const move_sentinel& s); constexpr S base() const; + private: S last; // \expos }; From 8e393c5d3a8c0d2d1863ad5ded5853c697b6b393 Mon Sep 17 00:00:00 2001 From: Blackteahamburger Date: Sat, 12 Nov 2022 01:49:50 +0000 Subject: [PATCH 244/257] [ranges] Blank line between the private and public members --- source/ranges.tex | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/ranges.tex b/source/ranges.tex index 02d8762806..35fdf3d0d1 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -2917,6 +2917,7 @@ struct iota_view::@\exposid{iterator}@ { private: W @\exposid{value_}@ = W(); // \expos + public: using iterator_concept = @\seebelow@; using iterator_category = input_iterator_tag; // present only if \tcode{W} models \libconcept{incrementable} and @@ -3296,6 +3297,7 @@ struct iota_view::@\exposid{sentinel}@ { private: Bound @\exposid{bound_}@ = Bound(); // \expos + public: @\exposid{sentinel}@() = default; constexpr explicit @\exposid{sentinel}@(Bound bound); @@ -4295,6 +4297,7 @@ class ref_view : public view_interface> { private: R* @\exposid{r_}@; // \expos + public: template<@\exposconcept{different-from}@ T> requires @\seebelow@ @@ -4359,6 +4362,7 @@ class owning_view : public view_interface> { private: R @\exposid{r_}@ = R(); // \expos + public: owning_view() requires @\libconcept{default_initializable}@ = default; constexpr owning_view(R&& t); @@ -5500,6 +5504,7 @@ using @\exposid{Parent}@ = @\exposid{maybe-const}@; // \expos using @\exposid{Base}@ = @\exposid{maybe-const}@; // \expos sentinel_t<@\exposid{Base}@> @\exposid{end_}@ = sentinel_t<@\exposid{Base}@>(); // \expos + public: @\exposid{sentinel}@() = default; constexpr explicit @\exposid{sentinel}@(sentinel_t<@\exposid{Base}@> end); @@ -5819,6 +5824,7 @@ template using @\exposid{CI}@ = counted_iterator>>; // \expos sentinel_t<@\exposid{Base}@> @\exposid{end_}@ = sentinel_t<@\exposid{Base}@>(); // \expos + public: @\exposid{sentinel}@() = default; constexpr explicit @\exposid{sentinel}@(sentinel_t<@\exposid{Base}@> end); @@ -7767,6 +7773,7 @@ : view_interface { private: @\exposid{outer-iterator}@ @\exposid{i_}@ = @\exposid{outer-iterator}@(); // \expos + public: value_type() = default; constexpr explicit value_type(@\exposid{outer-iterator}@ i); @@ -8391,6 +8398,7 @@ class common_view : public view_interface> { private: V @\exposid{base_}@ = V(); // \expos + public: common_view() requires @\libconcept{default_initializable}@ = default; @@ -8512,6 +8520,7 @@ class reverse_view : public view_interface> { private: V @\exposid{base_}@ = V(); // \expos + public: reverse_view() requires @\libconcept{default_initializable}@ = default; @@ -9231,6 +9240,7 @@ private: using @\exposid{Base}@ = @\exposid{maybe-const}@; // \expos sentinel_t<@\exposid{Base}@> @\exposid{end_}@ = sentinel_t<@\exposid{Base}@>(); // \expos + public: @\exposid{sentinel}@() = default; constexpr explicit @\exposid{sentinel}@(sentinel_t<@\exposid{Base}@> end); @@ -14288,6 +14298,7 @@ tuple @\exposid{bases_}@; // \expos // \ref{range.cartesian.iterator}, class template \tcode{cartesian_product_view::\exposid{iterator}} template class @\exposid{iterator}@; // \expos + public: constexpr cartesian_product_view() = default; constexpr explicit cartesian_product_view(First first_base, Vs... bases); From 8094f867d8a8d774346584ce91063a8e79875e85 Mon Sep 17 00:00:00 2001 From: Blackteahamburger Date: Sat, 12 Nov 2022 04:02:41 +0000 Subject: [PATCH 245/257] [algorithms] Blank line between the private and public members --- source/utilities.tex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/utilities.tex b/source/utilities.tex index 6a04cc4dbd..404456f26a 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -7120,6 +7120,7 @@ const E& error() const & noexcept; E&& error() && noexcept; const E&& error() const && noexcept; + private: E @\exposidnc{unex}@; // \expos }; @@ -7191,6 +7192,7 @@ bad_expected_access& operator=(const bad_expected_access&); bad_expected_access& operator=(bad_expected_access&&); ~bad_expected_access(); + public: const char* what() const noexcept override; }; @@ -16705,6 +16707,7 @@ using @\exposidnc{element-type}@ = // \expos remove_cvref_t>; range_formatter<@\exposidnc{element-type}@, charT> @\exposid{underlying_}@; // \expos + public: constexpr @\exposid{range-default-formatter}@(); From 2868ab4c6adeca4575878f7d56e85525c700bbce Mon Sep 17 00:00:00 2001 From: Blackteahamburger Date: Fri, 11 Nov 2022 12:35:30 +0000 Subject: [PATCH 246/257] [input.output] Blank line between the private and public members --- source/iostreams.tex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/iostreams.tex b/source/iostreams.tex index 70324454a1..74fa410fcc 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -1116,6 +1116,7 @@ Init(const Init&) = default; ~Init(); Init& operator=(const Init&) = default; + private: static int init_cnt; // \expos }; @@ -1636,6 +1637,7 @@ // \ref{fpos.members}, members stateT state() const; void state(stateT); + private: stateT st; // \expos }; @@ -4476,6 +4478,7 @@ template class basic_istream::sentry { bool ok_; // \expos + public: explicit sentry(basic_istream& is, bool noskipws = false); ~sentry(); @@ -6143,6 +6146,7 @@ template class basic_ostream::sentry { bool ok_; // \expos + public: explicit sentry(basic_ostream& os); ~sentry(); @@ -9765,6 +9769,7 @@ ios_base::openmode which = ios_base::in | ios_base::out) override; pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in | ios_base::out) override; + private: ios_base::openmode @\exposid{mode}@; // \expos std::span @\exposid{buf}@; // \expos @@ -10271,6 +10276,7 @@ std::span span() const noexcept; void span(std::span s) noexcept; + private: basic_spanbuf sb; // \expos }; @@ -10409,6 +10415,7 @@ std::span span() const noexcept; void span(std::span s) noexcept; + private: basic_spanbuf sb; // \expos }; @@ -11412,6 +11419,7 @@ void open(const string& s, ios_base::openmode mode = ios_base::in); void open(const filesystem::path& s, ios_base::openmode mode = ios_base::in); void close(); + private: basic_filebuf sb; // \expos }; @@ -11657,6 +11665,7 @@ void open(const string& s, ios_base::openmode mode = ios_base::out); void open(const filesystem::path& s, ios_base::openmode mode = ios_base::out); void close(); + private: basic_filebuf sb; // \expos }; From d12066ad34c7809fb3a561f94d02cc10b896131e Mon Sep 17 00:00:00 2001 From: Blackteahamburger Date: Sat, 12 Nov 2022 11:38:19 +0000 Subject: [PATCH 247/257] [thread] Blank line between the private and public members --- source/threads.tex | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/threads.tex b/source/threads.tex index 4f70a9a949..accde75f3e 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -2758,6 +2758,7 @@ template struct atomic_ref { private: T* ptr; // \expos + public: using value_type = T; static constexpr size_t required_alignment = @\impdefx{required alignment for \tcode{atomic_ref} type's operations}@; @@ -3197,7 +3198,8 @@ namespace std { template<> struct atomic_ref<@\placeholder{integral-type}@> { private: - @\placeholder{integral-type}@* ptr; // \expos + @\placeholder{integral-type}@* ptr; // \expos + public: using value_type = @\placeholder{integral-type}@; using difference_type = value_type; @@ -3330,7 +3332,8 @@ namespace std { template<> struct atomic_ref<@\placeholder{floating-point-type}@> { private: - @\placeholder{floating-point-type}@* ptr; // \expos + @\placeholder{floating-point-type}@* ptr; // \expos + public: using value_type = @\placeholder{floating-point-type}@; using difference_type = value_type; @@ -3438,6 +3441,7 @@ template struct atomic_ref { private: T** ptr; // \expos + public: using value_type = T*; using difference_type = ptrdiff_t; From de65fd01af6423966495d25eab8cbd9d3b9f5dc8 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sat, 26 Sep 2020 00:34:09 +0200 Subject: [PATCH 248/257] [macros] Prefer a page break after note or example. --- source/macros.tex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/macros.tex b/source/macros.tex index c1ef31cada..2bf9d28192 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -303,7 +303,9 @@ {\noteoutro{#3}} \newenvironment{#1} {\begin{tail#1}} -{\end{tail#1}\small\par} % \small\par is for C++20 post-DIS compatibility +% \small\par is for C++20 post-DIS compatibility +{\end{tail#1}\small\par\penalty -200} + } \newnoteenvironment{note}{Note \arabic{note}}{end note} From 405b46f50ce6c7458e94db7b4528fc267e2b67c3 Mon Sep 17 00:00:00 2001 From: Hewill Kang <67143766+hewillk@users.noreply.github.com> Date: Sat, 17 Dec 2022 00:14:51 +0800 Subject: [PATCH 249/257] [mdspan.mdspan.overview] Add default template arguments for mdspan (#6018) We usually restate the default template arguments in the class synopsis, so that the information is in one place and one does not need to also refer to the header synopsis. --- source/containers.tex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/containers.tex b/source/containers.tex index f94aeea939..33ce36dc52 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -20149,7 +20149,8 @@ \begin{codeblock} namespace std { - template + template> class mdspan { public: using extents_type = Extents; From ae88bb581d32f1939987c0a834fe3f6011a9d003 Mon Sep 17 00:00:00 2001 From: frederick-vs-ja Date: Fri, 16 Dec 2022 21:25:31 +0800 Subject: [PATCH 250/257] [range.repeat] Change `W`/`WArgs` to `T`/`TArgs` --- source/ranges.tex | 66 +++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index 35fdf3d0d1..61c7619360 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -211,8 +211,8 @@ namespace views { inline constexpr @\unspecnc@ iota = @\unspecnc@; } // freestanding // \ref{range.repeat}, repeat view - template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t> - requires (is_object_v && @\libconcept{same_as}@> + template<@\libconcept{move_constructible}@ T, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t> + requires (is_object_v && @\libconcept{same_as}@> && (@\exposid{is-integer-like}@ || @\libconcept{same_as}@)) class repeat_view; // freestanding @@ -3386,28 +3386,28 @@ \begin{codeblock} namespace std::ranges { - template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t> - requires (is_object_v && @\libconcept{same_as}@> && + template<@\libconcept{move_constructible}@ T, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t> + requires (is_object_v && @\libconcept{same_as}@> && (@\exposid{is-integer-like}@ || @\libconcept{same_as}@)) - class @\libglobal{repeat_view}@ : public view_interface> { + class @\libglobal{repeat_view}@ : public view_interface> { private: // \ref{range.repeat.iterator}, class \tcode{repeat_view::\exposid{iterator}} struct @\exposidnc{iterator}@; // \expos - @\exposidnc{movable-box}@ @\exposid{value_}@; // \expos, see \ref{range.move.wrap} + @\exposidnc{movable-box}@ @\exposid{value_}@; // \expos, see \ref{range.move.wrap} Bound @\exposid{bound_}@ = Bound(); // \expos public: - repeat_view() requires @\libconcept{default_initializable}@ = default; + repeat_view() requires @\libconcept{default_initializable}@ = default; - constexpr explicit repeat_view(const W& value, Bound bound = Bound()) - requires @\libconcept{copy_constructible}@; - constexpr explicit repeat_view(W&& value, Bound bound = Bound()); - template - requires @\libconcept{constructible_from}@ && + constexpr explicit repeat_view(const T& value, Bound bound = Bound()) + requires @\libconcept{copy_constructible}@; + constexpr explicit repeat_view(T&& value, Bound bound = Bound()); + template + requires @\libconcept{constructible_from}@ && @\libconcept{constructible_from}@ constexpr explicit repeat_view(piecewise_construct_t, - tuple value_args, tuple bound_args = tuple<>{}); + tuple value_args, tuple bound_args = tuple<>{}); constexpr @\exposid{iterator}@ begin() const; constexpr @\exposid{iterator}@ end() const requires (!@\libconcept{same_as}@); @@ -3416,15 +3416,15 @@ constexpr auto size() const requires (!@\libconcept{same_as}@); }; - template - repeat_view(W, Bound) -> repeat_view; + template + repeat_view(T, Bound) -> repeat_view; } \end{codeblock} \indexlibraryctor{repeat_view}% \begin{itemdecl} -constexpr explicit repeat_view(const W& value, Bound bound = Bound()) - requires @\libconcept{copy_constructible}@; +constexpr explicit repeat_view(const T& value, Bound bound = Bound()) + requires @\libconcept{copy_constructible}@; \end{itemdecl} \begin{itemdescr} @@ -3441,7 +3441,7 @@ \indexlibraryctor{repeat_view}% \begin{itemdecl} -constexpr explicit repeat_view(W&& value, Bound bound = Bound()); +constexpr explicit repeat_view(T&& value, Bound bound = Bound()); \end{itemdecl} \begin{itemdescr} @@ -3457,17 +3457,17 @@ \indexlibraryctor{repeat_view}% \begin{itemdecl} -template - requires @\libconcept{constructible_from}@ && +template + requires @\libconcept{constructible_from}@ && @\libconcept{constructible_from}@ constexpr explicit repeat_view(piecewise_construct_t, - tuple value_args, tuple bound_args = tuple<>{}); + tuple value_args, tuple bound_args = tuple<>{}); \end{itemdecl} \begin{itemdescr} \pnum \effects -Initializes \exposid{value_} with arguments of types \tcode{WArgs...} +Initializes \exposid{value_} with arguments of types \tcode{TArgs...} obtained by forwarding the elements of \tcode{value_args} and initializes \exposid{bound_} with arguments of types \tcode{BoundArgs...} obtained by forwarding the elements of \tcode{bound_args}. @@ -3523,29 +3523,29 @@ \begin{codeblock} namespace std::ranges { - template<@\libconcept{move_constructible}@ W, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t> - requires (is_object_v && @\libconcept{same_as}@> && + template<@\libconcept{move_constructible}@ T, @\libconcept{semiregular}@ Bound = unreachable_sentinel_t> + requires (is_object_v && @\libconcept{same_as}@> && (@\exposid{is-integer-like}@ || @\libconcept{same_as}@)) - class repeat_view::@\exposid{iterator}@ { + class repeat_view::@\exposid{iterator}@ { private: using @\exposidnc{index-type}@ = // \expos conditional_t<@\libconcept{same_as}@, ptrdiff_t, Bound>; - const W* @\exposidnc{value_}@ = nullptr; // \expos + const T* @\exposidnc{value_}@ = nullptr; // \expos @\exposidnc{index-type}@ @\exposidnc{current_}@ = @\exposidnc{index-type}@(); // \expos - constexpr explicit @\exposid{iterator}@(const W* value, @\exposid{index-type}@ b = @\exposidnc{index-type}@()); // \expos + constexpr explicit @\exposid{iterator}@(const T* value, @\exposid{index-type}@ b = @\exposidnc{index-type}@()); // \expos public: using iterator_concept = random_access_iterator_tag; using iterator_category = random_access_iterator_tag; - using value_type = W; + using value_type = T; using difference_type = conditional_t<@\exposid{is-signed-integer-like}@<@\exposid{index-type}@>, @\exposid{index-type}@, @\placeholdernc{IOTA-DIFF-T}@(@\exposid{index-type}@)>; @\exposid{iterator}@() = default; - constexpr const W& operator*() const noexcept; + constexpr const T& operator*() const noexcept; constexpr @\exposid{iterator}@& operator++(); constexpr @\exposid{iterator}@ operator++(int); @@ -3555,7 +3555,7 @@ constexpr @\exposid{iterator}@& operator+=(difference_type n); constexpr @\exposid{iterator}@& operator-=(difference_type n); - constexpr const W& operator[](difference_type n) const noexcept; + constexpr const T& operator[](difference_type n) const noexcept; friend constexpr bool operator==(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y); friend constexpr auto operator<=>(const @\exposid{iterator}@& x, const @\exposid{iterator}@& y); @@ -3571,7 +3571,7 @@ \indexlibraryctor{repeat_view::\exposid{iterator}}% \begin{itemdecl} -constexpr explicit @\exposid{iterator}@(const W* value, @\exposid{index-type}@ b = @\exposid{index-type}@()); +constexpr explicit @\exposid{iterator}@(const T* value, @\exposid{index-type}@ b = @\exposid{index-type}@()); \end{itemdecl} \begin{itemdescr} @@ -3587,7 +3587,7 @@ \indexlibrarymember{operator*}{repeat_view::\exposid{iterator}}% \begin{itemdecl} -constexpr const W& operator*() const noexcept; +constexpr const T& operator*() const noexcept; \end{itemdecl} \begin{itemdescr} @@ -3705,7 +3705,7 @@ \indexlibrarymember{operator[]}{repeat_view::\exposid{iterator}}% \begin{itemdecl} -constexpr const W& operator[](difference_type n) const noexcept; +constexpr const T& operator[](difference_type n) const noexcept; \end{itemdecl} \begin{itemdescr} From 0a1f1e147c75ce9220de3488103ca880b6b8e49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Fri, 16 Dec 2022 17:19:08 +0000 Subject: [PATCH 251/257] [concept.copyconstructible] Avoid "possibly \tcode{const}" A small rewrite avoids the phrase "possibly \tcode{const}", which we would like to remove entirely in favour of just "possibly const". --- source/concepts.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/concepts.tex b/source/concepts.tex index e0035ecf2e..915a6677a9 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -833,7 +833,7 @@ \begin{itemdescr} \pnum If \tcode{T} is an object type, then let \tcode{v} be an lvalue of type -(possibly \keyword{const}) \tcode{T} or an rvalue of type \tcode{const T}. +\tcode{T} or \tcode{\keyword{const} T} or an rvalue of type \tcode{\keyword{const} T}. \tcode{T} models \libconcept{copy_constructible} only if \begin{itemize} From f058decdf9c7dea0461f723df72f5093f5e92b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Fri, 16 Dec 2022 17:31:47 +0000 Subject: [PATCH 252/257] Replace "possibly \tcode{const}" with "possibly const" The "const" here is not syntax, but just normal text. This is similar to "inline" and "public", which have previously been cleaned up similarly. --- source/algorithms.tex | 6 +++--- source/iostreams.tex | 2 +- source/lib-intro.tex | 16 ++++++++-------- source/numerics.tex | 6 +++--- source/utilities.tex | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/source/algorithms.tex b/source/algorithms.tex index b76b4eefc2..61a5eb3713 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -158,7 +158,7 @@ \exposconcept{boolean-testable}\iref{concept.booleantestable}. The function object \tcode{pred} shall not apply any non-constant function through its argument. -Given a glvalue \tcode{u} of type (possibly \keyword{const}) \tcode{T} +Given a glvalue \tcode{u} of type (possibly const) \tcode{T} that designates the same object as \tcode{*first}, \tcode{pred(u)} shall be a valid expression that is equal to \tcode{pred(*first)}. @@ -185,9 +185,9 @@ \exposconcept{boolean-testable}. \tcode{binary_pred} shall not apply any non-constant function through any of its arguments. -Given a glvalue \tcode{u} of type (possibly \keyword{const}) \tcode{T1} +Given a glvalue \tcode{u} of type (possibly const) \tcode{T1} that designates the same object as \tcode{*first1}, and -a glvalue \tcode{v} of type (possibly \keyword{const}) \tcode{T2} +a glvalue \tcode{v} of type (possibly const) \tcode{T2} that designates the same object as \tcode{*first2}, \tcode{binary_pred(u, *first2)}, \tcode{binary_pred(*first1, v)}, and diff --git a/source/iostreams.tex b/source/iostreams.tex index 74fa410fcc..c6851793ab 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -13667,7 +13667,7 @@ \tcode{basic_string} or \tcode{basic_string_view}, or \item the \grammarterm{qualified-id} \tcode{iterator_traits>::value_type} is valid and -denotes a possibly \keyword{const} encoded character type\iref{temp.deduct}. +denotes a possibly const encoded character type\iref{temp.deduct}. \end{itemize} \pnum diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 1d355057bf..266d411852 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -1599,7 +1599,7 @@ \item \tcode{a}, \tcode{b}, and -\tcode{c} denote values of type (possibly \keyword{const}) \tcode{T}, +\tcode{c} denote values of type (possibly const) \tcode{T}, \item \tcode{s} and \tcode{t} denote modifiable lvalues of type \tcode{T}, \item @@ -1607,7 +1607,7 @@ \item \tcode{rv} denotes an rvalue of type \tcode{T}, and \item -\tcode{v} denotes an lvalue of type (possibly \keyword{const}) \tcode{T} or an +\tcode{v} denotes an lvalue of type (possibly const) \tcode{T} or an rvalue of type \tcode{const T}. \end{itemize} @@ -1861,8 +1861,8 @@ \pnum In \tref{cpp17.nullablepointer}, \tcode{u} denotes an identifier, \tcode{t} denotes a non-\keyword{const} lvalue of type \tcode{P}, \tcode{a} and \tcode{b} -denote values of type (possibly \keyword{const}) \tcode{P}, and \tcode{np} denotes -a value of type (possibly \keyword{const}) \tcode{std::nullptr_t}. +denote values of type (possibly const) \tcode{P}, and \tcode{np} denotes +a value of type (possibly const) \tcode{std::nullptr_t}. \begin{oldconcepttable}{NullablePointer}{}{cpp17.nullablepointer} {lx{2in}l} @@ -1915,9 +1915,9 @@ \pnum Given \tcode{Key} is an argument type for function objects of type \tcode{H}, in -\tref{cpp17.hash} \tcode{h} is a value of type (possibly \keyword{const}) \tcode{H}, +\tref{cpp17.hash} \tcode{h} is a value of type (possibly const) \tcode{H}, \tcode{u} is an lvalue of type \tcode{Key}, and \tcode{k} is a value of a type convertible to -(possibly \keyword{const}) \tcode{Key}. +(possibly const) \tcode{Key}. \begin{oldconcepttable}{Hash}{}{cpp17.hash} {llp{.55\hsize}} @@ -1998,7 +1998,7 @@ \item \tcode{y} denotes a value of type \tcode{XX::const_void_pointer} obtained by conversion from a result value of \tcode{YY::allocate}, or else -a value of type (possibly \tcode{const}) \tcode{std::nullptr_t}, +a value of type (possibly const) \tcode{std::nullptr_t}, \item \tcode{n} denotes a value of type \tcode{XX::size_type}, \item @@ -2658,7 +2658,7 @@ \pnum \returns \tcode{true_type} only if the expression \tcode{a1 == a2} is guaranteed -to be \tcode{true} for any two (possibly \tcode{const}) values +to be \tcode{true} for any two (possibly const) values \tcode{a1}, \tcode{a2} of type \tcode{X}. \pnum diff --git a/source/numerics.tex b/source/numerics.tex index bd86eee84d..e7f9efd029 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -1789,7 +1789,7 @@ \item \tcode{e} is a value of \tcode{E}, \tcode{v} is an lvalue of \tcode{E}, - \tcode{x} and \tcode{y} are (possibly \keyword{const}) values of \tcode{E}; + \tcode{x} and \tcode{y} are (possibly const) values of \tcode{E}; \item \tcode{s} is a value of \tcode{T}; \item @@ -2172,7 +2172,7 @@ \tcode{d} is a value of \tcode{D}, and - \tcode{x} and \tcode{y} are (possibly \keyword{const}) values of \tcode{D}; + \tcode{x} and \tcode{y} are (possibly const) values of \tcode{D}; \item \tcode{glb} and \tcode{lub} are values of \tcode{T} @@ -2181,7 +2181,7 @@ on the values potentially returned by \tcode{d}'s \tcode{operator()}, as determined by the current values of \tcode{d}'s parameters; \item - \tcode{p} is a (possibly \keyword{const}) value of \tcode{P}; + \tcode{p} is a (possibly const) value of \tcode{P}; \item \tcode{g}, \tcode{g1}, and \tcode{g2} are lvalues of a type meeting the requirements diff --git a/source/utilities.tex b/source/utilities.tex index 404456f26a..f67090e9c7 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15656,7 +15656,7 @@ \tcode{Out}, and formatting argument type \tcode{T}, in \tref{formatter.basic} and \tref{formatter}: \begin{itemize} -\item \tcode{f} is a value of type (possibly \tcode{const}) \tcode{F}, +\item \tcode{f} is a value of type (possibly const) \tcode{F}, \item \tcode{g} is an lvalue of type \tcode{F}, \item \tcode{u} is an lvalue of type \tcode{T}, \item \tcode{t} is a value of a type convertible to (possibly const) \tcode{T}, From b96fcafef1d413899561dc91d7a686301cedaabb Mon Sep 17 00:00:00 2001 From: Eelis van der Weegen Date: Fri, 16 Dec 2022 02:50:12 +0100 Subject: [PATCH 253/257] [lex.string] Remove link to non-existing "zero, null" index entry. --- source/lex.tex | 1 - 1 file changed, 1 deletion(-) diff --git a/source/lex.tex b/source/lex.tex index 57e1e5ba62..0439a0de01 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -2075,7 +2075,6 @@ \end{note} \pnum -\indextext{\idxcode{0}|seealso{zero, null}}% \indextext{\idxcode{0}!string terminator}% \indextext{\idxcode{0}!null character|see {character, null}}% String literal objects are initialized with From 75f3876a146a61420a9aba685b3015dad5ad6622 Mon Sep 17 00:00:00 2001 From: Ukilele Date: Fri, 16 Dec 2022 18:48:50 +0000 Subject: [PATCH 254/257] [iterators] Add missing definitions from the iterators library to the library index --- source/iterators.tex | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/iterators.tex b/source/iterators.tex index 4e32a85012..b864bee260 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -59,7 +59,7 @@ template requires is_object_v struct iterator_traits; // freestanding template<@\exposconcept{dereferenceable}@ T> - using iter_reference_t = decltype(*declval()); // freestanding + using @\libglobal{iter_reference_t}@ = decltype(*declval()); // freestanding namespace ranges { // \ref{iterator.cust}, customization point objects @@ -76,7 +76,7 @@ requires requires(T& t) { { ranges::iter_move(t) } -> @\exposconcept{can-reference}@; } - using iter_rvalue_reference_t // freestanding + using @\libglobal{iter_rvalue_reference_t}@ // freestanding = decltype(ranges::iter_move(declval())); // \ref{iterator.concepts}, iterator concepts @@ -85,7 +85,7 @@ concept indirectly_readable = @\seebelow@; // freestanding template<@\libconcept{indirectly_readable}@ T> - using iter_common_reference_t = // freestanding + using @\libglobal{iter_common_reference_t}@ = // freestanding common_reference_t, iter_value_t&>; // \ref{iterator.concept.writable}, concept \libconcept{indirectly_writable} @@ -161,7 +161,7 @@ template requires (@\libconcept{indirectly_readable}@ && ...) && @\libconcept{invocable}@...> - using indirect_result_t = invoke_result_t...>; // freestanding + using @\libglobal{indirect_result_t}@ = invoke_result_t...>; // freestanding // \ref{projected}, projected template<@\libconcept{indirectly_readable}@ I, @\libconcept{indirectly_regular_unary_invocable}@ Proj> @@ -363,10 +363,10 @@ }; template<@\libconcept{input_iterator}@ I> - constexpr const_iterator make_const_iterator(I it) { return it; } // freestanding + constexpr const_iterator @\libglobal{make_const_iterator}@(I it) { return it; } // freestanding template<@\libconcept{semiregular}@ S> - constexpr const_sentinel make_const_sentinel(S s) { return s; } // freestanding + constexpr const_sentinel @\libglobal{make_const_sentinel}@(S s) { return s; } // freestanding // \ref{move.iterators}, move iterators and sentinels template class move_iterator; // freestanding @@ -4176,7 +4176,7 @@ \begin{itemdecl} template<@\libconcept{indirectly_readable}@ It> - using iter_const_reference_t = + using @\libglobal{iter_const_reference_t}@ = common_reference_t&&, iter_reference_t>; template From 4b622b793e0480cc35d2faeefa68d64a181d7f7e Mon Sep 17 00:00:00 2001 From: Ukilele Date: Sat, 17 Dec 2022 18:18:24 +0000 Subject: [PATCH 255/257] [ranges] Add subrange_kind to the library index --- source/ranges.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ranges.tex b/source/ranges.tex index 61c7619360..9388c29ac1 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -131,7 +131,7 @@ class view_interface; // freestanding // \ref{range.subrange}, sub-ranges - enum class subrange_kind : bool { unsized, sized }; // freestanding + enum class @\libglobal{subrange_kind}@ : bool { @\libmember{unsized}{subrange_kind}@, @\libmember{sized}{subrange_kind}@ }; // freestanding template<@\libconcept{input_or_output_iterator}@ I, @\libconcept{sentinel_for}@ S = I, subrange_kind K = @\seebelow@> requires (K == subrange_kind::sized || !@\libconcept{sized_sentinel_for}@) From 9ac55553459e15c84db6d8072c93787d41ef7ccf Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Fri, 4 Jun 2021 00:29:30 +0200 Subject: [PATCH 256/257] [lib] Drop 'inline' from 'inline constexpr' variable templates. Since CWG2387, constexpr variable templates have external linkage. --- source/concepts.tex | 2 +- source/containers.tex | 8 +- source/diagnostics.tex | 4 +- source/future.tex | 2 +- source/iterators.tex | 14 ++-- source/memory.tex | 2 +- source/meta.tex | 180 ++++++++++++++++++++--------------------- source/numerics.tex | 54 ++++++------- source/ranges.tex | 56 ++++++------- source/strings.tex | 4 +- source/time.tex | 4 +- source/utilities.tex | 14 ++-- 12 files changed, 172 insertions(+), 172 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index 915a6677a9..0508cb542b 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -775,7 +775,7 @@ \begin{itemdecl} template - inline constexpr bool @\exposid{is-default-initializable}@ = @\seebelow@; // \expos + constexpr bool @\exposid{is-default-initializable}@ = @\seebelow@; // \expos template concept @\deflibconcept{default_initializable}@ = @\libconcept{constructible_from}@ && diff --git a/source/containers.tex b/source/containers.tex index 33ce36dc52..7a15185cc8 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -6118,7 +6118,7 @@ class vector; template - inline constexpr bool @\exposid{is-vector-bool-reference}@ = @\seebelow@; // \expos + constexpr bool @\exposid{is-vector-bool-reference}@ = @\seebelow@; // \expos // hash support template struct hash; @@ -9346,7 +9346,7 @@ \indexlibrary{is-vector-bool-reference@\exposid{is-vector-bool-reference}}% \begin{itemdecl} template - inline constexpr bool @\exposid{is-vector-bool-reference}@ = @\seebelow@; + constexpr bool @\exposid{is-vector-bool-reference}@ = @\seebelow@; \end{itemdecl} \begin{itemdescr} @@ -17520,9 +17520,9 @@ class span; template - inline constexpr bool ranges::enable_view> = true; + constexpr bool ranges::enable_view> = true; template - inline constexpr bool ranges::enable_borrowed_range> = true; + constexpr bool ranges::enable_borrowed_range> = true; // \ref{span.objectrep}, views of object representation template diff --git a/source/diagnostics.tex b/source/diagnostics.tex index 8d86e3731d..f1648bcb2d 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -816,9 +816,9 @@ // \ref{syserr}, system error support template - inline constexpr bool is_error_code_enum_v = is_error_code_enum::value; + constexpr bool is_error_code_enum_v = is_error_code_enum::value; template - inline constexpr bool is_error_condition_enum_v = is_error_condition_enum::value; + constexpr bool is_error_condition_enum_v = is_error_condition_enum::value; } \end{codeblock} diff --git a/source/future.tex b/source/future.tex index 094561712d..65a3c4ac6c 100644 --- a/source/future.tex +++ b/source/future.tex @@ -1368,7 +1368,7 @@ \begin{codeblock} namespace std { template struct is_pod; - template inline constexpr bool is_pod_v = is_pod::value; + template constexpr bool is_pod_v = is_pod::value; template // \seebelow struct aligned_storage; template // \seebelow diff --git a/source/iterators.tex b/source/iterators.tex index b864bee260..01768a7257 100644 --- a/source/iterators.tex +++ b/source/iterators.tex @@ -110,7 +110,7 @@ // \ref{iterator.concept.sizedsentinel}, concept \libconcept{sized_sentinel_for} template - inline constexpr bool disable_sized_sentinel_for = false; // freestanding + constexpr bool disable_sized_sentinel_for = false; // freestanding template concept sized_sentinel_for = @\seebelow@; // freestanding @@ -317,7 +317,7 @@ template requires (!@\libconcept{sized_sentinel_for}@) - inline constexpr bool disable_sized_sentinel_for, // freestanding + constexpr bool disable_sized_sentinel_for, // freestanding reverse_iterator> = true; // \ref{insert.iterators}, insert iterators @@ -404,8 +404,8 @@ template requires (!@\libconcept{sized_sentinel_for}@) - inline constexpr bool disable_sized_sentinel_for, // freestanding - move_iterator> = true; + constexpr bool disable_sized_sentinel_for, // freestanding + move_iterator> = true; template<@\libconcept{semiregular}@ S> class move_sentinel; // freestanding @@ -1366,10 +1366,10 @@ \begin{codeblock} template - inline constexpr bool @\exposid{is-integer-like}@ = @\seebelow@; @\itcorr[-2]@ // \expos + constexpr bool @\exposid{is-integer-like}@ = @\seebelow@; @\itcorr[-2]@ // \expos template - inline constexpr bool @\exposid{is-signed-integer-like}@ = @\seebelow@; @\itcorr[-2]@ // \expos + constexpr bool @\exposid{is-signed-integer-like}@ = @\seebelow@; @\itcorr[-2]@ // \expos template concept @\deflibconcept{weakly_incrementable}@ = @@ -1700,7 +1700,7 @@ \indexlibraryglobal{disable_sized_sentinel_for}% \begin{itemdecl} template - inline constexpr bool disable_sized_sentinel_for = false; + constexpr bool disable_sized_sentinel_for = false; \end{itemdecl} \begin{itemdescr} diff --git a/source/memory.tex b/source/memory.tex index b822977608..8419e02b91 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -114,7 +114,7 @@ // \ref{allocator.uses.trait}, \tcode{uses_allocator} template - inline constexpr bool @\libglobal{uses_allocator_v}@ = uses_allocator::value; // freestanding + constexpr bool @\libglobal{uses_allocator_v}@ = uses_allocator::value; // freestanding // \ref{allocator.uses.construction}, uses-allocator construction template diff --git a/source/meta.tex b/source/meta.tex index d6d5818296..3ff3f99edb 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -378,198 +378,198 @@ // \ref{meta.unary.cat}, primary type categories template - inline constexpr bool @\libglobal{is_void_v}@ = is_void::value; + constexpr bool @\libglobal{is_void_v}@ = is_void::value; template - inline constexpr bool @\libglobal{is_null_pointer_v}@ = is_null_pointer::value; + constexpr bool @\libglobal{is_null_pointer_v}@ = is_null_pointer::value; template - inline constexpr bool @\libglobal{is_integral_v}@ = is_integral::value; + constexpr bool @\libglobal{is_integral_v}@ = is_integral::value; template - inline constexpr bool @\libglobal{is_floating_point_v}@ = is_floating_point::value; + constexpr bool @\libglobal{is_floating_point_v}@ = is_floating_point::value; template - inline constexpr bool @\libglobal{is_array_v}@ = is_array::value; + constexpr bool @\libglobal{is_array_v}@ = is_array::value; template - inline constexpr bool @\libglobal{is_pointer_v}@ = is_pointer::value; + constexpr bool @\libglobal{is_pointer_v}@ = is_pointer::value; template - inline constexpr bool @\libglobal{is_lvalue_reference_v}@ = is_lvalue_reference::value; + constexpr bool @\libglobal{is_lvalue_reference_v}@ = is_lvalue_reference::value; template - inline constexpr bool @\libglobal{is_rvalue_reference_v}@ = is_rvalue_reference::value; + constexpr bool @\libglobal{is_rvalue_reference_v}@ = is_rvalue_reference::value; template - inline constexpr bool @\libglobal{is_member_object_pointer_v}@ = is_member_object_pointer::value; + constexpr bool @\libglobal{is_member_object_pointer_v}@ = is_member_object_pointer::value; template - inline constexpr bool @\libglobal{is_member_function_pointer_v}@ = is_member_function_pointer::value; + constexpr bool @\libglobal{is_member_function_pointer_v}@ = is_member_function_pointer::value; template - inline constexpr bool @\libglobal{is_enum_v}@ = is_enum::value; + constexpr bool @\libglobal{is_enum_v}@ = is_enum::value; template - inline constexpr bool @\libglobal{is_union_v}@ = is_union::value; + constexpr bool @\libglobal{is_union_v}@ = is_union::value; template - inline constexpr bool @\libglobal{is_class_v}@ = is_class::value; + constexpr bool @\libglobal{is_class_v}@ = is_class::value; template - inline constexpr bool @\libglobal{is_function_v}@ = is_function::value; + constexpr bool @\libglobal{is_function_v}@ = is_function::value; // \ref{meta.unary.comp}, composite type categories template - inline constexpr bool @\libglobal{is_reference_v}@ = is_reference::value; + constexpr bool @\libglobal{is_reference_v}@ = is_reference::value; template - inline constexpr bool @\libglobal{is_arithmetic_v}@ = is_arithmetic::value; + constexpr bool @\libglobal{is_arithmetic_v}@ = is_arithmetic::value; template - inline constexpr bool @\libglobal{is_fundamental_v}@ = is_fundamental::value; + constexpr bool @\libglobal{is_fundamental_v}@ = is_fundamental::value; template - inline constexpr bool @\libglobal{is_object_v}@ = is_object::value; + constexpr bool @\libglobal{is_object_v}@ = is_object::value; template - inline constexpr bool @\libglobal{is_scalar_v}@ = is_scalar::value; + constexpr bool @\libglobal{is_scalar_v}@ = is_scalar::value; template - inline constexpr bool @\libglobal{is_compound_v}@ = is_compound::value; + constexpr bool @\libglobal{is_compound_v}@ = is_compound::value; template - inline constexpr bool @\libglobal{is_member_pointer_v}@ = is_member_pointer::value; + constexpr bool @\libglobal{is_member_pointer_v}@ = is_member_pointer::value; // \ref{meta.unary.prop}, type properties template - inline constexpr bool @\libglobal{is_const_v}@ = is_const::value; + constexpr bool @\libglobal{is_const_v}@ = is_const::value; template - inline constexpr bool @\libglobal{is_volatile_v}@ = is_volatile::value; + constexpr bool @\libglobal{is_volatile_v}@ = is_volatile::value; template - inline constexpr bool @\libglobal{is_trivial_v}@ = is_trivial::value; + constexpr bool @\libglobal{is_trivial_v}@ = is_trivial::value; template - inline constexpr bool @\libglobal{is_trivially_copyable_v}@ = is_trivially_copyable::value; + constexpr bool @\libglobal{is_trivially_copyable_v}@ = is_trivially_copyable::value; template - inline constexpr bool @\libglobal{is_standard_layout_v}@ = is_standard_layout::value; + constexpr bool @\libglobal{is_standard_layout_v}@ = is_standard_layout::value; template - inline constexpr bool @\libglobal{is_empty_v}@ = is_empty::value; + constexpr bool @\libglobal{is_empty_v}@ = is_empty::value; template - inline constexpr bool @\libglobal{is_polymorphic_v}@ = is_polymorphic::value; + constexpr bool @\libglobal{is_polymorphic_v}@ = is_polymorphic::value; template - inline constexpr bool @\libglobal{is_abstract_v}@ = is_abstract::value; + constexpr bool @\libglobal{is_abstract_v}@ = is_abstract::value; template - inline constexpr bool @\libglobal{is_final_v}@ = is_final::value; + constexpr bool @\libglobal{is_final_v}@ = is_final::value; template - inline constexpr bool @\libglobal{is_aggregate_v}@ = is_aggregate::value; + constexpr bool @\libglobal{is_aggregate_v}@ = is_aggregate::value; template - inline constexpr bool @\libglobal{is_signed_v}@ = is_signed::value; + constexpr bool @\libglobal{is_signed_v}@ = is_signed::value; template - inline constexpr bool @\libglobal{is_unsigned_v}@ = is_unsigned::value; + constexpr bool @\libglobal{is_unsigned_v}@ = is_unsigned::value; template - inline constexpr bool @\libglobal{is_bounded_array_v}@ = is_bounded_array::value; + constexpr bool @\libglobal{is_bounded_array_v}@ = is_bounded_array::value; template - inline constexpr bool @\libglobal{is_unbounded_array_v}@ = is_unbounded_array::value; + constexpr bool @\libglobal{is_unbounded_array_v}@ = is_unbounded_array::value; template - inline constexpr bool @\libglobal{is_scoped_enum_v}@ = is_scoped_enum::value; + constexpr bool @\libglobal{is_scoped_enum_v}@ = is_scoped_enum::value; template - inline constexpr bool @\libglobal{is_constructible_v}@ = is_constructible::value; + constexpr bool @\libglobal{is_constructible_v}@ = is_constructible::value; template - inline constexpr bool @\libglobal{is_default_constructible_v}@ = is_default_constructible::value; + constexpr bool @\libglobal{is_default_constructible_v}@ = is_default_constructible::value; template - inline constexpr bool @\libglobal{is_copy_constructible_v}@ = is_copy_constructible::value; + constexpr bool @\libglobal{is_copy_constructible_v}@ = is_copy_constructible::value; template - inline constexpr bool @\libglobal{is_move_constructible_v}@ = is_move_constructible::value; + constexpr bool @\libglobal{is_move_constructible_v}@ = is_move_constructible::value; template - inline constexpr bool @\libglobal{is_assignable_v}@ = is_assignable::value; + constexpr bool @\libglobal{is_assignable_v}@ = is_assignable::value; template - inline constexpr bool @\libglobal{is_copy_assignable_v}@ = is_copy_assignable::value; + constexpr bool @\libglobal{is_copy_assignable_v}@ = is_copy_assignable::value; template - inline constexpr bool @\libglobal{is_move_assignable_v}@ = is_move_assignable::value; + constexpr bool @\libglobal{is_move_assignable_v}@ = is_move_assignable::value; template - inline constexpr bool @\libglobal{is_swappable_with_v}@ = is_swappable_with::value; + constexpr bool @\libglobal{is_swappable_with_v}@ = is_swappable_with::value; template - inline constexpr bool @\libglobal{is_swappable_v}@ = is_swappable::value; + constexpr bool @\libglobal{is_swappable_v}@ = is_swappable::value; template - inline constexpr bool @\libglobal{is_destructible_v}@ = is_destructible::value; + constexpr bool @\libglobal{is_destructible_v}@ = is_destructible::value; template - inline constexpr bool is_trivially_constructible_v + constexpr bool is_trivially_constructible_v = is_trivially_constructible::value; template - inline constexpr bool is_trivially_default_constructible_v + constexpr bool is_trivially_default_constructible_v = is_trivially_default_constructible::value; template - inline constexpr bool is_trivially_copy_constructible_v + constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible::value; template - inline constexpr bool is_trivially_move_constructible_v + constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible::value; template - inline constexpr bool @\libglobal{is_trivially_assignable_v}@ = is_trivially_assignable::value; + constexpr bool @\libglobal{is_trivially_assignable_v}@ = is_trivially_assignable::value; template - inline constexpr bool is_trivially_copy_assignable_v + constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable::value; template - inline constexpr bool is_trivially_move_assignable_v + constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable::value; template - inline constexpr bool @\libglobal{is_trivially_destructible_v}@ = is_trivially_destructible::value; + constexpr bool @\libglobal{is_trivially_destructible_v}@ = is_trivially_destructible::value; template - inline constexpr bool is_nothrow_constructible_v + constexpr bool is_nothrow_constructible_v = is_nothrow_constructible::value; template - inline constexpr bool is_nothrow_default_constructible_v + constexpr bool is_nothrow_default_constructible_v = is_nothrow_default_constructible::value; template - inline constexpr bool is_nothrow_copy_constructible_v + constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible::value; template - inline constexpr bool is_nothrow_move_constructible_v + constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible::value; template - inline constexpr bool @\libglobal{is_nothrow_assignable_v}@ = is_nothrow_assignable::value; + constexpr bool @\libglobal{is_nothrow_assignable_v}@ = is_nothrow_assignable::value; template - inline constexpr bool @\libglobal{is_nothrow_copy_assignable_v}@ = is_nothrow_copy_assignable::value; + constexpr bool @\libglobal{is_nothrow_copy_assignable_v}@ = is_nothrow_copy_assignable::value; template - inline constexpr bool @\libglobal{is_nothrow_move_assignable_v}@ = is_nothrow_move_assignable::value; + constexpr bool @\libglobal{is_nothrow_move_assignable_v}@ = is_nothrow_move_assignable::value; template - inline constexpr bool @\libglobal{is_nothrow_swappable_with_v}@ = is_nothrow_swappable_with::value; + constexpr bool @\libglobal{is_nothrow_swappable_with_v}@ = is_nothrow_swappable_with::value; template - inline constexpr bool @\libglobal{is_nothrow_swappable_v}@ = is_nothrow_swappable::value; + constexpr bool @\libglobal{is_nothrow_swappable_v}@ = is_nothrow_swappable::value; template - inline constexpr bool @\libglobal{is_nothrow_destructible_v}@ = is_nothrow_destructible::value; + constexpr bool @\libglobal{is_nothrow_destructible_v}@ = is_nothrow_destructible::value; template - inline constexpr bool @\libglobal{has_virtual_destructor_v}@ = has_virtual_destructor::value; + constexpr bool @\libglobal{has_virtual_destructor_v}@ = has_virtual_destructor::value; template - inline constexpr bool has_unique_object_representations_v + constexpr bool has_unique_object_representations_v = has_unique_object_representations::value; template - inline constexpr bool @\libglobal{reference_constructs_from_temporary_v}@ + constexpr bool @\libglobal{reference_constructs_from_temporary_v}@ = reference_constructs_from_temporary::value; template - inline constexpr bool @\libglobal{reference_converts_from_temporary_v}@ + constexpr bool @\libglobal{reference_converts_from_temporary_v}@ = reference_converts_from_temporary::value; // \ref{meta.unary.prop.query}, type property queries template - inline constexpr size_t @\libglobal{alignment_of_v}@ = alignment_of::value; + constexpr size_t @\libglobal{alignment_of_v}@ = alignment_of::value; template - inline constexpr size_t @\libglobal{rank_v}@ = rank::value; + constexpr size_t @\libglobal{rank_v}@ = rank::value; template - inline constexpr size_t @\libglobal{extent_v}@ = extent::value; + constexpr size_t @\libglobal{extent_v}@ = extent::value; // \ref{meta.rel}, type relations template - inline constexpr bool @\libglobal{is_same_v}@ = is_same::value; + constexpr bool @\libglobal{is_same_v}@ = is_same::value; template - inline constexpr bool @\libglobal{is_base_of_v}@ = is_base_of::value; + constexpr bool @\libglobal{is_base_of_v}@ = is_base_of::value; template - inline constexpr bool @\libglobal{is_convertible_v}@ = is_convertible::value; + constexpr bool @\libglobal{is_convertible_v}@ = is_convertible::value; template - inline constexpr bool @\libglobal{is_nothrow_convertible_v}@ = is_nothrow_convertible::value; + constexpr bool @\libglobal{is_nothrow_convertible_v}@ = is_nothrow_convertible::value; template - inline constexpr bool @\libglobal{is_layout_compatible_v}@ = is_layout_compatible::value; + constexpr bool @\libglobal{is_layout_compatible_v}@ = is_layout_compatible::value; template - inline constexpr bool is_pointer_interconvertible_base_of_v + constexpr bool is_pointer_interconvertible_base_of_v = is_pointer_interconvertible_base_of::value; template - inline constexpr bool @\libglobal{is_invocable_v}@ = is_invocable::value; + constexpr bool @\libglobal{is_invocable_v}@ = is_invocable::value; template - inline constexpr bool @\libglobal{is_invocable_r_v}@ = is_invocable_r::value; + constexpr bool @\libglobal{is_invocable_r_v}@ = is_invocable_r::value; template - inline constexpr bool @\libglobal{is_nothrow_invocable_v}@ = is_nothrow_invocable::value; + constexpr bool @\libglobal{is_nothrow_invocable_v}@ = is_nothrow_invocable::value; template - inline constexpr bool is_nothrow_invocable_r_v + constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r::value; // \ref{meta.logical}, logical operator traits template - inline constexpr bool @\libglobal{conjunction_v}@ = conjunction::value; + constexpr bool @\libglobal{conjunction_v}@ = conjunction::value; template - inline constexpr bool @\libglobal{disjunction_v}@ = disjunction::value; + constexpr bool @\libglobal{disjunction_v}@ = disjunction::value; template - inline constexpr bool @\libglobal{negation_v}@ = negation::value; + constexpr bool @\libglobal{negation_v}@ = negation::value; // \ref{meta.member}, member relationships template @@ -2433,17 +2433,17 @@ template struct ratio_greater_equal; template - inline constexpr bool @\libglobal{ratio_equal_v}@ = ratio_equal::value; + constexpr bool @\libglobal{ratio_equal_v}@ = ratio_equal::value; template - inline constexpr bool @\libglobal{ratio_not_equal_v}@ = ratio_not_equal::value; + constexpr bool @\libglobal{ratio_not_equal_v}@ = ratio_not_equal::value; template - inline constexpr bool @\libglobal{ratio_less_v}@ = ratio_less::value; + constexpr bool @\libglobal{ratio_less_v}@ = ratio_less::value; template - inline constexpr bool @\libglobal{ratio_less_equal_v}@ = ratio_less_equal::value; + constexpr bool @\libglobal{ratio_less_equal_v}@ = ratio_less_equal::value; template - inline constexpr bool @\libglobal{ratio_greater_v}@ = ratio_greater::value; + constexpr bool @\libglobal{ratio_greater_v}@ = ratio_greater::value; template - inline constexpr bool @\libglobal{ratio_greater_equal_v}@ = ratio_greater_equal::value; + constexpr bool @\libglobal{ratio_greater_equal_v}@ = ratio_greater_equal::value; // \ref{ratio.si}, convenience SI typedefs using @\libglobal{yocto}@ = ratio<1, 1'000'000'000'000'000'000'000'000>; // see below diff --git a/source/numerics.tex b/source/numerics.tex index e7f9efd029..e5b998e1ed 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -10301,33 +10301,33 @@ \indexheader{numbers}% \begin{codeblock} namespace std::numbers { - template inline constexpr T e_v = @\unspec@; - template inline constexpr T log2e_v = @\unspec@; - template inline constexpr T log10e_v = @\unspec@; - template inline constexpr T pi_v = @\unspec@; - template inline constexpr T inv_pi_v = @\unspec@; - template inline constexpr T inv_sqrtpi_v = @\unspec@; - template inline constexpr T ln2_v = @\unspec@; - template inline constexpr T ln10_v = @\unspec@; - template inline constexpr T sqrt2_v = @\unspec@; - template inline constexpr T sqrt3_v = @\unspec@; - template inline constexpr T inv_sqrt3_v = @\unspec@; - template inline constexpr T egamma_v = @\unspec@; - template inline constexpr T phi_v = @\unspec@; - - template<@\libconcept{floating_point}@ T> inline constexpr T e_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T log2e_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T log10e_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T pi_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T inv_pi_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T inv_sqrtpi_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T ln2_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T ln10_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T sqrt2_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T sqrt3_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T inv_sqrt3_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T egamma_v = @\seebelow@; - template<@\libconcept{floating_point}@ T> inline constexpr T phi_v = @\seebelow@; + template constexpr T e_v = @\unspec@; + template constexpr T log2e_v = @\unspec@; + template constexpr T log10e_v = @\unspec@; + template constexpr T pi_v = @\unspec@; + template constexpr T inv_pi_v = @\unspec@; + template constexpr T inv_sqrtpi_v = @\unspec@; + template constexpr T ln2_v = @\unspec@; + template constexpr T ln10_v = @\unspec@; + template constexpr T sqrt2_v = @\unspec@; + template constexpr T sqrt3_v = @\unspec@; + template constexpr T inv_sqrt3_v = @\unspec@; + template constexpr T egamma_v = @\unspec@; + template constexpr T phi_v = @\unspec@; + + template<@\libconcept{floating_point}@ T> constexpr T e_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T log2e_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T log10e_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T pi_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T inv_pi_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T inv_sqrtpi_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T ln2_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T ln10_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T sqrt2_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T sqrt3_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T inv_sqrt3_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T egamma_v = @\seebelow@; + template<@\libconcept{floating_point}@ T> constexpr T phi_v = @\seebelow@; inline constexpr double e = e_v; inline constexpr double log2e = log2e_v; diff --git a/source/ranges.tex b/source/ranges.tex index 9388c29ac1..33bf7dd175 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -55,7 +55,7 @@ concept range = @\seebelow@; // freestanding template - inline constexpr bool enable_borrowed_range = false; // freestanding + constexpr bool enable_borrowed_range = false; // freestanding template concept borrowed_range = @\seebelow@; // freestanding @@ -83,14 +83,14 @@ // \ref{range.sized}, sized ranges template - inline constexpr bool disable_sized_range = false; // freestanding + constexpr bool disable_sized_range = false; // freestanding template concept sized_range = @\seebelow@; // freestanding // \ref{range.view}, views template - inline constexpr bool enable_view = @\seebelow@; // freestanding + constexpr bool enable_view = @\seebelow@; // freestanding struct view_base {}; // freestanding @@ -138,7 +138,7 @@ class subrange; // freestanding template - inline constexpr bool enable_borrowed_range> = true; // freestanding + constexpr bool enable_borrowed_range> = true; // freestanding template requires ((N == 0 && @\libconcept{copyable}@) || N == 1) @@ -183,11 +183,11 @@ class empty_view; // freestanding template - inline constexpr bool enable_borrowed_range> = true; // freestanding + constexpr bool enable_borrowed_range> = true; // freestanding namespace views { template - inline constexpr empty_view @\libmember{empty}{views}@{}; // freestanding + constexpr empty_view @\libmember{empty}{views}@{}; // freestanding } // \ref{range.single}, single view @@ -206,7 +206,7 @@ class iota_view; // freestanding template - inline constexpr bool enable_borrowed_range> = true; // freestanding + constexpr bool enable_borrowed_range> = true; // freestanding namespace views { inline constexpr @\unspecnc@ iota = @\unspecnc@; } // freestanding @@ -227,7 +227,7 @@ template using wistream_view = basic_istream_view; - namespace views { template inline constexpr @\unspecnc@ istream = @\unspecnc@; } + namespace views { template constexpr @\unspecnc@ istream = @\unspecnc@; } // \ref{range.adaptor.object}, range adaptor objects template @@ -248,7 +248,7 @@ class ref_view; // freestanding template - inline constexpr bool enable_borrowed_range> = true; // freestanding + constexpr bool enable_borrowed_range> = true; // freestanding // \ref{range.owning.view}, owning view template<@\libconcept{range}@ R> @@ -256,7 +256,7 @@ class owning_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding enable_borrowed_range; // \ref{range.as.rvalue}, as rvalue view @@ -265,7 +265,7 @@ class as_rvalue_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ as_rvalue = @\unspecnc@; } // freestanding @@ -290,7 +290,7 @@ template<@\libconcept{view}@> class take_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ take = @\unspecnc@; } // freestanding @@ -308,7 +308,7 @@ class drop_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ drop = @\unspecnc@; } // freestanding @@ -320,7 +320,7 @@ class drop_while_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ drop_while = @\unspecnc@; } // freestanding @@ -374,7 +374,7 @@ class common_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ common = @\unspecnc@; } // freestanding @@ -385,7 +385,7 @@ class reverse_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ reverse = @\unspecnc@; } // freestanding @@ -405,7 +405,7 @@ class as_const_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ as_const = @\unspecnc@; } // freestanding @@ -416,7 +416,7 @@ class elements_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding enable_borrowed_range; template @@ -426,7 +426,7 @@ namespace views { template - inline constexpr @\unspecnc@ elements = @\unspecnc@; // freestanding + constexpr @\unspecnc@ elements = @\unspecnc@; // freestanding inline constexpr auto @\libmember{keys}{views}@ = elements<0>; // freestanding inline constexpr auto @\libmember{values}{views}@ = elements<1>; // freestanding } @@ -437,7 +437,7 @@ class zip_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding (enable_borrowed_range && ...); namespace views { inline constexpr @\unspecnc@ zip = @\unspecnc@; } // freestanding @@ -457,7 +457,7 @@ class adjacent_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding enable_borrowed_range; namespace views { @@ -487,7 +487,7 @@ class chunk_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding @\libconcept{forward_range}@ && enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ chunk = @\unspecnc@; } // freestanding @@ -498,7 +498,7 @@ class slide_view; // freestanding template - inline constexpr bool enable_borrowed_range> = + constexpr bool enable_borrowed_range> = enable_borrowed_range; // freestanding namespace views { inline constexpr @\unspecnc@ slide = @\unspecnc@; } // freestanding @@ -516,7 +516,7 @@ class stride_view; // freestanding template - inline constexpr bool enable_borrowed_range> = // freestanding + constexpr bool enable_borrowed_range> = // freestanding enable_borrowed_range; namespace views { inline constexpr @\unspecnc@ stride = @\unspecnc@; } // freestanding @@ -1319,7 +1319,7 @@ \indexlibraryglobal{enable_borrowed_range}% \begin{itemdecl} template - inline constexpr bool enable_borrowed_range = false; + constexpr bool enable_borrowed_range = false; \end{itemdecl} \begin{itemdescr} @@ -1386,7 +1386,7 @@ \indexlibraryglobal{disable_sized_range}% \begin{itemdecl} template - inline constexpr bool disable_sized_range = false; + constexpr bool disable_sized_range = false; \end{itemdecl} \begin{itemdescr} @@ -1478,9 +1478,9 @@ \indexlibraryglobal{enable_view}% \begin{itemdecl} template - inline constexpr bool @\exposidnc{is-derived-from-view-interface}@ = @\seebelownc@; // \expos + constexpr bool @\exposidnc{is-derived-from-view-interface}@ = @\seebelownc@; // \expos template - inline constexpr bool enable_view = + constexpr bool enable_view = @\libconcept{derived_from}@ || @\exposid{is-derived-from-view-interface}@; \end{itemdecl} diff --git a/source/strings.tex b/source/strings.tex index 0135346002..433abb6e66 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -541,9 +541,9 @@ class basic_string_view; template - inline constexpr bool ranges::enable_view> = true; + constexpr bool ranges::enable_view> = true; template - inline constexpr bool ranges::enable_borrowed_range> = true; + constexpr bool ranges::enable_borrowed_range> = true; // \ref{string.view.comparison}, non-member comparison functions template diff --git a/source/time.tex b/source/time.tex index 28bf443fc6..04f414aba6 100644 --- a/source/time.tex +++ b/source/time.tex @@ -88,12 +88,12 @@ // \ref{time.traits}, customization traits template struct treat_as_floating_point; template - inline constexpr bool treat_as_floating_point_v = treat_as_floating_point::value; + constexpr bool treat_as_floating_point_v = treat_as_floating_point::value; template struct duration_values; template struct is_clock; - template inline constexpr bool is_clock_v = is_clock::value; + template constexpr bool is_clock_v = is_clock::value; // \ref{time.duration.nonmember}, \tcode{duration} arithmetic template diff --git a/source/utilities.tex b/source/utilities.tex index f67090e9c7..03f38b6e3f 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -207,13 +207,13 @@ struct in_place_type_t { explicit in_place_type_t() = default; }; - template inline constexpr in_place_type_t in_place_type{}; + template constexpr in_place_type_t in_place_type{}; template struct in_place_index_t { explicit in_place_index_t() = default; }; - template inline constexpr in_place_index_t in_place_index{}; + template constexpr in_place_index_t in_place_index{}; } \end{codeblock} @@ -1584,7 +1584,7 @@ // \ref{tuple.helper}, tuple helper classes template - inline constexpr size_t @\libglobal{tuple_size_v}@ = tuple_size::value; + constexpr size_t @\libglobal{tuple_size_v}@ = tuple_size::value; } \end{codeblock} @@ -4857,7 +4857,7 @@ template struct variant_size; // \notdef template struct variant_size; template - inline constexpr size_t @\libglobal{variant_size_v}@ = variant_size::value; + constexpr size_t @\libglobal{variant_size_v}@ = variant_size::value; template struct variant_size>; @@ -10493,11 +10493,11 @@ // \ref{func.bind}, bind template struct is_bind_expression; // freestanding template - inline constexpr bool @\libglobal{is_bind_expression_v}@ = // freestanding + constexpr bool @\libglobal{is_bind_expression_v}@ = // freestanding is_bind_expression::value; template struct is_placeholder; // freestanding template - inline constexpr int @\libglobal{is_placeholder_v}@ = // freestanding + constexpr int @\libglobal{is_placeholder_v}@ = // freestanding is_placeholder::value; template @@ -13926,7 +13926,7 @@ namespace std { // \ref{execpol.type}, execution policy type trait template struct is_execution_policy; - template inline constexpr bool @\libglobal{is_execution_policy_v}@ = is_execution_policy::value; + template constexpr bool @\libglobal{is_execution_policy_v}@ = is_execution_policy::value; } namespace std::execution { From 4c8de31017b0ea4b1f1b63e7c8f5e408bbd917cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 16 Nov 2022 19:32:07 +0000 Subject: [PATCH 257/257] Update configuration for new working draft N4928 and add corresponding Editors' Report N4929 --- papers/n4929.html | 1017 ++++++++++++++++++++++++++++++++++++++++++++ papers/n4929.md | 868 +++++++++++++++++++++++++++++++++++++ papers/wd-index.md | 3 +- source/config.tex | 2 +- 4 files changed, 1888 insertions(+), 2 deletions(-) create mode 100644 papers/n4929.html create mode 100644 papers/n4929.md diff --git a/papers/n4929.html b/papers/n4929.html new file mode 100644 index 0000000000..9d0ae5c6b6 --- /dev/null +++ b/papers/n4929.html @@ -0,0 +1,1017 @@ + + + + + +N4929 + + +

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

+ +

Date: 2022-12-18

+ +

Thomas Köppe (editor, Google DeepMind)
+Jens Maurer (co-editor)
+Dawn Perchik (co-editor, Bright Side Computing, LLC)
+Richard Smith (co-editor, Google Inc)

+ +

Email: cxxeditor@gmail.com

+ +

Acknowledgements

+ +
+ +

New papers

+ +
    +
  • N4928 is the +current working draft for C++23. It replaces +N4917.
  • +
  • N4929 is this Editors' Report.
  • +
+ +

National body comments on the Committee Draft

+ +

N4919 is the C++23 Committee Draft. It received 137 comments from national bodies. +The working group's responses to the issues so far is noted below.

+ +

Editorial comments

+ +

The following 11 national body comments are editorial in nature, and fixes for +them have been applied.

+ +
    +
  • FR 008: Accepted; fixed by 6a1c5050c21ac26fcb2b5b187a0de867713568dc.
  • +
  • FR 027: Accepted; fixed by b2fa70faa783827cd38b819409e94da2523333f2. +New subclauses "contiguous access" and "mulitidimensional access" have been added +to organize the content for span and mdspan.
  • +
  • US 029: Accepted with modifications; fixed by 6c51392a3d1c3c928ef1c20c19e8efe6efed7dc1. +This issue had already been fixed editorially prior to the NB comments.
  • +
  • US 034: Accepted; fixed by 3e825f144f2aa8668c9a1a94066b43799e08a6e7.
  • +
  • CA 062: Accepted with modifications; fixed by d829eac310981e688a15b28622a2f048d23eed65. +A second erroneous comment with the same problem has also been corrected in the same way.
  • +
  • US 100: Accepted; fixed by 92de5996625efcb070f99681acd2e39efc206ee2.
  • +
  • US 119: Accepted with modifications; fixed by 24e046896029a11f2cb78fd6db21482fb0d4be66. +We removed the colon after "equivalent to" and the semicolon after "throw", +and connected the next sentence with a comma.
  • +
  • US 120: Accepted; fixed by 3f47d2565f26a9144e8076641ee55bf7be79f896.
  • +
  • GB 129: Accepted with modifications; fixed by fb0df97e7d7c2c75bbdf7164c33b0796024ff6d3. +Reviewed by LWG and considered editorial.
  • +
  • GB 136: Accepted; fixed by e0bab4b7f2d8afe5d3939aa49fe6de4fd5e638c6.
  • +
  • GB 137: Accepted; fixed by 9512e41e30cf24a8e93e8c8568ff1b5c14398cc6 and 0783dde32073b02b369c7c3893f4f496a83e3658.
  • +
+ +

Non-editorial comments

+ +
    +
  • FR 004: Partially fixed by P1264R2 (LWG poll 12).
  • +
  • FR 005: Fixed by CWG2631 (CWG poll 4).
  • +
  • FR 009: Duplicate of GB 093
  • +
  • FR 019: Duplicate of US 123
  • +
  • US 028: Fixed by CWG2640 (CWG poll 4).
  • +
  • US 030: Fixed by CWG2639 (CWG poll 4).
  • +
  • US 033: Fixed by CWG2242 (CWG poll 3).
  • +
  • DE 038: Fixed by P2718R0 (CWG poll 12).
  • +
  • US 039: Fixed by CWG2643 (CWG poll 3).
  • +
  • US 042: Fixed by CWG2644 (CWG poll 3).
  • +
  • US 044: Fixed by CWG2645 (CWG poll 3).
  • +
  • US 045: Fixed by CWG2654 (CWG poll 5).
  • +
  • US 045: Fixed by CWG2654 (CWG poll 5).
  • +
  • DE 046: Fixed by P2564R3 (CWG poll 9).
  • +
  • US 047: Fixed by CWG2647 (CWG poll 3).
  • +
  • GB 048: Fixed by P2647R1 (CWG poll 8).
  • +
  • GB 051: Fixed by CWG2653 (CWG poll 4).
  • +
  • US 052: Fixed by CWG2646 (CWG poll 3).
  • +
  • CA 054: Fixed by CWG2621 (CWG poll 3).
  • +
  • GB 055: Fixed by CWG2538 (CWG poll 6).
  • +
  • GB 059: Fixed by P2615R1 (CWG poll 11).
  • +
  • US 061: Fixed by P2706R0 (CWG poll 10).
  • +
  • CA 063: Fixed by CWG2648 (CWG poll 3).
  • +
  • CA 064: Fixed by CWG2649 (CWG poll 3).
  • +
  • CA 065: Fixed by P2589R1 (CWG poll 7).
  • +
  • US 068: Fixed by CWG2650 (CWG poll 3).
  • +
  • US 069: Fixed by CWG2651 (CWG poll 3).
  • +
  • GB 070: Fixed by CWG2615 (CWG poll 4).
  • +
  • US 071: Fixed by CWG2652 (CWG poll 4).
  • +
  • US 073: Fixed by P2167R3 (LWG poll 10).
  • +
  • GB 074: Fixed by LWG3818 (LWG poll 8).
  • +
  • GB 075: Fixed by LWG3753 (LWG poll 8).
  • +
  • GB 085: Fixed by LWG3814 (LWG poll 8).
  • +
  • GB 090: Fixed by LWG3823 (LWG poll 8).
  • +
  • US 091: Duplicate of GB 093
  • +
  • US 092: Duplicate of GB 093
  • +
  • GB 093: Fixed by P2505R5 (LWG poll 13).
  • +
  • GB 095: Fixed by LWG3824 (LWG poll 8).
  • +
  • GB 101: Fixed by LWG3817 (LWG poll 8).
  • +
  • US 103: Fixed by LWG3816 (LWG poll 8).
  • +
  • US 109: Partially fixed by LWG3717 + and LWG3737 (LWG poll 8).
  • +
  • GB 110: Fixed by LWG3814 (LWG poll 8).
  • +
  • US 111: Fixed by P2602R2 (LWG poll 9).
  • +
  • US 118: Fixed by LWG3826 (LWG poll 8).
  • +
  • US 123: Fixed by P2539R4 (LWG poll 11).
  • +
  • US 124: Duplicate of US 123
  • +
  • US 125: Fixed by LWG3822 (LWG poll 8).
  • +
  • GB 130: Partially fixed by LWG3814 (LWG poll 8).
  • +
  • US 132: Fixed by CWG2636 (CWG poll 3).
  • +
+ +

Motions incorporated into working draft

+ +

Notes

+ +
    +
  • CWG issue 2602 was withdrawn from the motions. Even though it is part of +P2709R0, +it has not been applied.
  • +
  • CWG issue 2642 (in +P2710R0, +polled in CWG poll 3) was discovered to be incorrect after the WG21 meeting; +CWG has requested that the issue not be applied and reverted to the working +group for further discussion. It has not been applied.
  • +
+ +

Core working group polls

+ +

CWG poll 1: Accept as Defect Reports all issues except 2635 and 2602 in P2709R0 (Core Language Working Group "ready" Issues for the November, 2022 meeting) and apply their proposed resolutions to the C++ Working Paper.

+ +

CWG poll 2: Accept as a Defect Report issue 2635 (Constrained structured bindings) in P2709R0 (Core Language Working Group "ready" Issues for the November, 2022 meeting) and apply its proposed resolution to the C++ Working Paper.

+ +

CWG poll 3: Accept as Defect Reports all issues except 2615, 2639, 2640, 2652, 2653, 2654, and 2538 in P2710R0 (Core Language Working Group NB comment resolutions for the November, 2022 meeting) and apply their proposed resolution to the C++ Working Paper, resolving the NB comments as indicated.

+ +

CWG poll 4: Apply the proposed resolutions of issues 2615, 2639, 2640, 2652, and 2653 in P2710R0 (Core Language Working Group NB comment resolutions for the November, 2022 meeting) to the C++ Working Paper, resolving the NB comments as indicated.

+ +

CWG poll 5: Accept as a Defect Report issue 2654 (Un-deprecation of compound volatile assignments) in P2710R0 (Core Language Working Group NB comment resolutions for the November, 2022 meeting) and apply its proposed resolution to the C++ Working Paper, resolving NB comment US 16-045.

+ +

CWG poll 6: Accept as a Defect Report issue 2538 (Can standard attributes be syntactically ignored?) in P2710R0 (Core Language Working Group NB comment resolutions for the November, 2022 meeting) and apply its proposed resolution to the C++ Working Paper, resolving NB comment GB-055.

+ +

CWG poll 7: Apply the changes in P2589R1 (static operator[]) to the C++ Working Paper, resolving NB comment CA-065.

+ +

CWG poll 8: Accept as a Defect Report and apply the changes in P2647R1 (Permitting static constexpr variables in constexpr functions) to the C++ Working Paper, resolving NB comment GB-048.

+ +

CWG poll 9: Accept as a Defect Report and apply the changes in P2564R3 (consteval needs to propagate up) to the C++ Working Paper, resolving NB comment DE-046.

+ +

CWG poll 10: Accept as a Defect Report and apply the changes in P2706R0 (Redundant specification for defaulted functions) to the C++ Working Paper, resolving NB comment US 26-061.

+ +

CWG poll 11: Accept as a Defect Report and apply the changes in P2615R1 (Meaningful exports) to the C++ Working Paper, resolving NB comment GB-059.

+ +

CWG poll 12: Apply the changes in P2718R0 (Wording for P2644R1 Fix for Range-based for Loop) to the C++ Working Paper, resolving NB comment DE-038.

+ +

Library working group polls

+ +

Polls 1–6 do not concern the C++ Working Paper.

+ +

LWG poll 7: Apply the changes for all Ready and Tentatively Ready issues in P2703R0 (C++ Standard Library Ready Issues to be moved in Kona, Nov. 2022) to the C++ working paper.

+ +

LWG poll 8: Apply the changes for all Immediate issues in P2704R0 (C++ Standard Library Immediate Issues to be moved in Kona, Nov. 2022) to the C++ working paper.

+ +

LWG poll 9: Apply the changes in P2602R2 (Poison Pills are Too Toxic) to the C++ working paper. This addresses ballot comment US 49-111.

+ +

LWG poll 10: Apply the changes in P2167R3 (Improved Proposed Wording for LWG 2114 (contextually convertible to bool)) to the C++ working paper. This addresses ballot comment US 32-073.

+ +

LWG poll 11: Apply the changes in P2539R4 (Should the output of std::print to a terminal be synchronized with the underlying stream?) to the C++ working paper. This addresses ballot comment US 58-123 (and duplicates US 59-124 and FR-001-019).

+ +

LWG poll 12: Apply the changes in P1264R2 (Revising the wording of stream input operations) to the C++ working paper. This partially addresses ballot comment FR-018-004.

+ +

LWG poll 13: Apply the changes in P2505R5 (Monadic Functions for std::expected) to the C++ working paper. This addresses ballot comments GB-093, US 36-091, US 35-092, and FR-011-009.

+ +

LWG poll 14: Apply the changes in P2696R0 (Introduce Cpp17Swappable as additional convenience requirements) to the C++ working paper.

+ +

Noteworthy editorial changes

+ +
    +
  • There were no noteworthy changes to the wording of the approved papers.
  • +
  • A new subclause "Arithmetic types" was added. The new subclause contains +both "integer types" (<cstdint>) and the new "extended floating-point +types" (<stdfloat>). Previously, the newly added <stdfloat> synopsis +was somewhat disconnected and out of context.
  • +
+ +

Minor editorial changes

+ +

A log of editorial fixes made to the working draft since N4917 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 7772de4408db8122431169156ea230803cb6bf56
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Sep 6 19:47:21 2022 +0100
+
+    [headers] Reflow table after header additions
+
+commit 3231e8115e93a24806694c36f1eb2d709fe78f4f
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sun Jun 12 15:49:22 2022 +0200
+
+    [basic.align] Recommend alignment-specifier instead of deprecated library facility
+
+commit 37d46b0d41d014febacd9ffe684eb0cf11a5c364
+Author: Chuanqi Xu <yedeng.yd@linux.alibaba.com>
+Date:   Tue Jun 7 16:19:08 2022 +0800
+
+    [module.reach] Remove redundant module implementation unit declaration
+
+commit 4e2297b8d2543062edf347ec13341a8356f59605
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Fri Sep 9 04:12:51 2022 +0800
+
+    [thread.stoptoken.syn] "class template", not just "class"; fix spacing (#5799)
+
+commit 20452e91b30d0a299a03d937f443a81537dc03f2
+Author: xmh0511 <970252187@qq.com>
+Date:   Fri Sep 9 04:54:01 2022 +0800
+
+    [basic.def.odr] A variable is "named by" an expression (#5534)
+
+    The previous wording, a variable "whose name appears
+    as [an] expression", is less precise and not well-defined.
+
+commit 7260f30c74eaf670b3f3d33a7571f6c055930cd7
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Jan 21 23:27:34 2022 +0100
+
+    [basic.life] Add cross-reference for union member lifetime
+
+commit ba51a5375fa3099e4a85594f2e67d48bc11ec448
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Mon Mar 20 11:58:33 2017 +0000
+
+    [rand.req.seedseq] Rephrase in terms of const types not values
+
+commit 88e574edc674e85911ea1a5b4e87c07457d97bf1
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Mon Mar 20 12:23:12 2017 +0000
+
+    [container.requirements] Rephrase in terms of const types not values
+
+commit 547987d9d203bb7f1f18297ca438ccb18d8fe612
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Wed Sep 14 14:39:16 2022 +0800
+
+    [range.chunk.view.input, range.slide.view] Remove unused name in the deduction guide
+
+commit c774ac4a072efd41e478d72ad57a3dae8b0946ff
+Author: Mathias Stearn <redbeard0531@gmail.com>
+Date:   Fri Sep 16 17:46:10 2022 +0200
+
+    [basic.life] Change "complete const object" to "const, complete object" (#5818)
+
+    "Complete object" is a defined term (https://eel.is/c++draft/basic#def:complete_object).
+    Putting "const" in the middle of that leaves it ambiguous whether we are referring to
+    a const-qualified "complete object", or to a complete const object with some other meaning
+    of "complete" (such as "with a complete type").
+
+commit 787ea7683982ed58b1a8bf7bbfb7c77f8d227dce
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Sep 16 21:24:15 2022 +0200
+
+    [diagnostics] Remove 'shall', use 'recommended practice'
+
+commit 9a005c04b91ffa9b92e6a57a03419091f365bc9b
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Sep 16 21:57:46 2022 +0200
+
+    [func.bind.isplace] Add cross-reference to [func.bind.place]
+
+commit 7bd72a7671d9bee0eed11578e325460bcf7fa5a1
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Sep 16 22:09:23 2022 +0200
+
+    [vector.bool.pspc] Index vector<bool>::reference
+
+commit f68d6428f27d5cd722e713262d8986489484ae02
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Sep 16 22:18:36 2022 +0200
+
+    [over.best.ics.general] Split long paragraph
+
+commit 1383e97e21d6d10ac210344d66ab715cfc0f747a
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Thu Sep 15 15:38:58 2022 +0100
+
+    [ranges.syn] Make get overloads freestanding
+
+    These were moved to the synopsis after the P1642 changes to mark nearly
+    everything in the synopsis freestanding, so they were not marked.
+
+commit c70087afe980f9ec339f088babde575e04e185d7
+Author: languagelawyer <38548419+languagelawyer@users.noreply.github.com>
+Date:   Sat Sep 17 02:29:45 2022 +0500
+
+    [expr.add] Move note, add example (#4778)
+
+    The original note wasn't quite in the right place.
+    It is moved and made more concrete.
+
+    In the original place of the note we now put
+    a more immediately relevant example.
+
+commit 6000c29e5b9547bf457f4461fd538670144ad88c
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sat Sep 17 10:05:19 2022 +0200
+
+    [format.string.std] Clarify location of 0x prefix for pointers
+
+commit 718873b512d0687143bbfa00e18edfb0a8b164ce
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sat Sep 17 08:56:36 2022 +0200
+
+    [expr.prim.lambda.capture] Cross-reference [basic.def.odr] for 'odr-usable'
+
+commit 6a98fd8c1f9ea79961b78f731637ba9fe9d52218
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Sat Sep 17 09:05:57 2022 +0200
+
+    [thread.thread.this] Clarify this_thread::get_id
+
+commit 90c4ba5624a655af5c5d8b11c1137d552f3e0a60
+Author: Casey Carter <Casey@Carter.net>
+Date:   Sun Sep 18 14:55:55 2022 -0700
+
+    [headers] Order `<type_traits>` before `<typeindex>` in the header table
+
+    Fixes #5853.
+
+commit 16f92154ce99a5fef26c53c464e8b14ad5b78d79
+Author: A. Jiang <de34@live.cn>
+Date:   Tue Sep 20 05:37:31 2022 +0800
+
+    [c.math.hypot3] Fix mis-transcribed parameter type (#5852)
+
+    The paper P1467R9 says that the third parameter of `hypot` should be
+    `_floating-point-type_`, but it was erroneously transcribed as `double`.
+
+commit db26a63222f10cec871656958b3e296e529df67e
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Wed Sep 21 22:18:51 2022 +0100
+
+    [support, etc.] New subclause "Arithmetic types". (#5851)
+
+    The new subclause contains both "integer types" (<cstdint>)
+    and "extended floating-point types" (<stdfloat>).
+
+    Previously, the newly added <stdfloat> synopsis was somewhat
+    disconnected and out of context.
+
+    This change removes the stable labels [cstdint] and [cstdint.general].
+
+commit d462173b5afdc8506d85e5395f2be19311895f2d
+Author: Casey Carter <Casey@Carter.net>
+Date:   Mon Sep 19 20:42:44 2022 -0700
+
+    [mdspan.extents.cons] Correct spelling of "dynamic-extents"
+
+commit 14a10ef0948f4709cd1114c489b8e4b919ba7cbc
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Thu Sep 22 05:20:44 2022 +0800
+
+    [unord.general, container.adaptors.general] Fix list of exposition-only alias templates (#5840)
+
+commit aab149233f76df37979d777ffd2b3151c52d48a9
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Thu Sep 22 10:51:46 2022 +0100
+
+    [template.bitset] reorder synopsis and member descriptions
+
+    Group shifts together and use same order for synopsis and detailed
+    descriptions.
+
+    Also remove the unnecessary "for b[i];" comments explaining what
+    operator[] does, and add a comment introducing the group containing
+    count(), size() etc.
+
+commit 63e4a76f780c925a13efeb06955252d7c37ed4ef
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Thu Sep 22 09:30:14 2022 +0800
+
+    [range.as.const.overview] Remove unnecessary ranges namespace qualification
+
+commit 179436adbe60c277fa6512352ee27e26f192bf2b
+Author: Alisdair Meredith <alisdairm@me.com>
+Date:   Fri Sep 23 12:45:09 2022 -0400
+
+    [utility.arg.requirements] Present identifiers as itemization (#5856)
+
+    Lists providing the key for names used throughout a subclause are difficult
+    to follow when buried as a single sentence in a paragraph. This change updates
+    the key to tables 29-36 in [utility.arg.requirements] to a bulleted list
+    following the examples set elsewhere.
+
+    Each key is now consistently introduced with the word "denotes", following
+    the precedent set by similar bullet lists.
+
+    It is not at all coincidental that this also resolves pagination issues
+    at the end of the page, so that the floating tables to not float into the
+    middle of a sentence in the following section.
+
+commit 24d54e30506a62ef41cf4bd0132fbdba45bb6dda
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Tue Sep 27 11:56:32 2022 +0100
+
+    [futures.task.members] Add missing explicit to packaged_task ctor
+
+commit 842424bd228b79876437a1a9393f20f00033476a
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Wed Sep 28 16:39:59 2022 +0800
+
+    [futures.task.members] Correct capitalization
+
+commit d3ddc0906638bb30b5a3ce0f4033148e9a8ed1ff
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Thu Sep 29 15:49:06 2022 +0800
+
+    [container.rev.reqmts] Correct capitalization
+
+commit a7f17181ef5b59ad728b421a83975209406fa037
+Author: Daniel Krügler <daniel.kruegler@gmail.com>
+Date:   Mon Oct 3 17:59:20 2022 +0200
+
+    [sequence.reqmts] Use "lvalues of type T are swappable" (#5878)
+
+commit dd6c7f4012489325bdd65a40cd121b3d25008b0e
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Tue Oct 4 04:41:26 2022 +0800
+
+    [associative.reqmts.general] Fix typo in namespace name (#5881)
+
+commit 42c7b3fb3a3cb11bc1af418cfdd395ecf314aa43
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Oct 4 13:08:17 2022 +0100
+
+    [intro.defs] Update hyperlink according to SC22 requirements
+
+commit 05019b35890b79374fac180a9a9ff9e7cf8d7595
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Oct 4 15:19:01 2022 +0100
+
+    Foreword placeholder
+
+commit b0fab58d4f2b12defdaf7c3ddfb2ddcd1f30e1b5
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Wed Oct 5 11:27:23 2022 +0100
+
+    [temp.local] Fix typo in "inject-class-name" (#5889)
+
+commit f6c5d4512d4b32d63d66669555ab976b315d439c
+Author: mordante <koraq@xs4all.nl>
+Date:   Mon Oct 10 17:50:51 2022 +0200
+
+    [format.string.escaped] Fix example of invalid code unit (#5890)
+
+    Example 5 should only have one invalid code unit. The second code unit is a valid code point.
+
+    This issue was already in the paper P2286R8 "Formatting Ranges".
+
+commit 5f26c516a659cdf3f0ea007cf6c90c690cccc3b6
+Author: Eelis van der Weegen <eelis@eelis.net>
+Date:   Tue Oct 11 04:36:08 2022 +0200
+
+    [bibliography] Remove stray closing parenthesis.
+
+commit 6c51392a3d1c3c928ef1c20c19e8efe6efed7dc1
+Author: Corentin Jabot <corentinjabot@gmail.com>
+Date:   Wed Oct 19 22:29:09 2022 +0200
+
+    [intro.defs] Move the definition of "multibyte character" to library
+
+    This address the US-2 NB comment as per the direction voted on
+    by SG-16.
+
+    No use of "multibyte character" remains before [multibyte.strings].
+
+commit 33e56641d63c5993d288082cf264a733464ff75c
+Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
+Date:   Tue Oct 25 17:48:03 2022 -0400
+
+    [stack.syn, queue.syn] Add xref comments to class synopses (#5913)
+
+commit 90aa7729b9a926622581354284ecf294a56e410b
+Author: Will Hawkins <8715530+hawkinsw@users.noreply.github.com>
+Date:   Tue Nov 1 04:37:52 2022 -0400
+
+    [range.dangling] Replace "tag type" with just "type" (#5922)
+
+    The extra word "tag" was not adding any value and was potentially,
+    confusing; e.g. the "dangling" type is not like, say, an iterator tag
+    that would be used for overload resolution.
+
+commit fd998c52af2dc6b9c73098fdbd5a22444a358448
+Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
+Date:   Tue Nov 1 10:45:53 2022 -0400
+
+    [flat.set] [flat.multiset] Use value_type, not key_type
+
+    For consistency with the other `set`, `unordered_set` containers.
+    `key_type` is a synonym for `value_type`, and there's no reason
+    the flat containers need to depart from existing practice here.
+
+commit 48ecaaec300de4a8176c116408cac915142166ce
+Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
+Date:   Mon Nov 7 14:02:40 2022 -0500
+
+    [flat.multiset.modifiers] Fix typo in "multiset" (#5927)
+
+commit 45d9a5ba5aee1e3c4da8938e12376b36a7147d63
+Author: Eric41293 <eric41293@comcast.net>
+Date:   Mon Nov 7 11:11:58 2022 -0800
+
+    [climits.syn] Correct note about types of macros (#5926)
+
+    This note was added apparently as a response to LWG 416. However, there may have been a misunderstanding of the C standard, and in fact only the macros for `{signed,unsigned,} char` and `{signed,unsigned} int` have a different type.
+
+commit f41cd00273e6ee7ff1a29446b21f230c28bf1a9f
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Mon Nov 7 20:59:54 2022 +0000
+
+    [time.clock.system.nonmembers, time.zone.zonedtime.nonmembers] Add <charT> to STATICALLY-WIDEN (#5934)
+
+commit ef7d0e234722d2ef8b4ec069b6f929dc083d8dc7
+Author: Ed Catmur <edward.catmur@mavensecurities.com>
+Date:   Tue Sep 20 18:12:45 2022 +0100
+
+    [meta, thread] Add or amend references to func.{require,invoke}
+
+commit 0d5c9b9310b2f6c6c4259665e1e680936babdc3d
+Author: Eric41293 <eric41293@comcast.net>
+Date:   Mon Nov 7 15:54:55 2022 -0800
+
+    [meta.type.synop] Capitalize NTTP name (#5921)
+
+commit 0959b5c200a6f2b543e2d656850917b8d788767c
+Author: Hui <65944694+huixie90@users.noreply.github.com>
+Date:   Tue Nov 8 00:49:15 2022 +0000
+
+    [range.drop.while.overview] Use string_view rather than string literal (#5897)
+
+    The string literal would have been treated as a `const char*`, which is not a range.
+
+commit 720c3ae24a68fda02a6372eda13ec3f9c6a1a39b
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Tue Nov 8 02:01:34 2022 +0000
+
+    [time.format] Use basic_ostringstream<charT> instead of ostringstream (#5932)
+
+commit 8739d316f2a55c633963b26b748681ff16498887
+Author: Marc Mutz <94039187+marcmutz@users.noreply.github.com>
+Date:   Tue Nov 8 03:05:45 2022 +0100
+
+    [meta.const.eval] Add is_constant_evaluated to index of library names (#5898)
+
+    Previously, only its feature-test macro was listed there.
+
+commit 4c442cf93f03a44ec1f6a93875043a3aca7c5b9b
+Author: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
+Date:   Mon Nov 7 23:38:36 2022 -0400
+
+    [class.union.general] Attach example to its note (#5882)
+
+commit 65c494b9a4a5a4fab500733441c04e50a787d318
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Tue Nov 8 15:51:21 2022 +0800
+
+    [mdspan.extents.expo] Remove redundant "// exposition only" (#5907)
+
+commit b766881dda1d0201d98710b11efda3491a84b4f2
+Author: languagelawyer <38548419+languagelawyer@users.noreply.github.com>
+Date:   Tue Nov 8 13:15:07 2022 +0500
+
+    [dcl.init.list] Specify the type of the prvalue (#5919)
+
+commit 6e035b52e28e95211a39ffb552851499432b2c6e
+Author: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
+Date:   Tue Nov 8 15:30:29 2022 -0400
+
+    [ratio.ratio] Use symbol "sgn" for the signum function (#5925)
+
+commit 89269f8e548b993b239f2c0f5ecc071ee7f54c9a
+Author: Blackteahamburger <blackteahamburger@outlook.com>
+Date:   Wed Nov 9 04:12:59 2022 +0800
+
+    [dcl.link] Add missing restriction to language linkage application (#5892)
+
+    A language linkage specification should only apply to entities that do in fact have language linkage.
+
+commit ea77b2fa83ddac0c52c1b505ff666328a2a8f558
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Wed Nov 9 00:34:26 2022 +0100
+
+    [temp.deduct.general] Fix typo in comment in example
+
+commit 0c196ec375993000547e8913abb4c4ce703144cb
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Thu Nov 10 15:32:56 2022 +0100
+
+    [temp.deduct.conv] Remove misleading paragraph break
+
+commit 0cd0c33f648d1304160e6dcb1856affd71b3ebbb
+Author: Casey Carter <Casey@Carter.net>
+Date:   Fri Nov 11 18:35:53 2022 -0800
+
+    [mdspan.extents.cons] "constexpr" should precede "explicit"
+
+    In library function declarations, the `constexpr` specifier always precedes the `explicit` specifier per our standing style guide.
+
+commit 608c152dbae69d335d7238cdd5d178e048e2a1fd
+Author: Casey Carter <Casey@Carter.net>
+Date:   Mon Nov 14 10:48:18 2022 -0800
+
+    [vector.bool.pspc] Replace `constexpr static` with `static constexpr`
+
+    As preferred by our style guide.
+
+commit d829eac310981e688a15b28622a2f048d23eed65
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Thu Nov 10 07:43:32 2022 +0000
+
+    [class.inhctor.init] Fix explanation of "error:" in example
+
+    The correct explanation is that classes `B1` and `D1` do not have
+    default constructors, not that they have deleted default constructors.
+
+    Fixes NB CA 062 (C++23 CD).
+
+commit 6a1c5050c21ac26fcb2b5b187a0de867713568dc
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Nov 8 23:35:00 2022 +0000
+
+    [diff.cpp20.library] Add missing new headers
+
+    Fixes NB FR 008 (C++23 CD).
+
+commit b2fa70faa783827cd38b819409e94da2523333f2
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Wed Nov 9 18:50:56 2022 +0000
+
+    [views] Subclauses for contiguous and multidimensional access
+
+    This organises the material for <span> and <mdspan> into separate
+    subclauses, rather than having all constituent parts being siblings in
+    the same subclause. Even though we now have some subclauses six levels
+    deep, this seems like an improvement. As a drive-by, this allows us to
+    move a subclause on a non-member span helper function up one level,
+    where it is more appropriate.
+
+    Fixes NB FR 027 (C++23 CD).
+
+commit e0bab4b7f2d8afe5d3939aa49fe6de4fd5e638c6
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Thu Nov 10 02:16:11 2022 +0000
+
+    [concepts index] Describe exposition-only concepts
+
+    Fixes NB GB 136 (C++23 CD).
+
+commit 9512e41e30cf24a8e93e8c8568ff1b5c14398cc6
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Fri Nov 11 19:31:11 2022 +0000
+
+    [general, library index] Describe exposition-only entities
+
+    Partially fixes NB GB 137 (C++23 CD).
+
+commit 0783dde32073b02b369c7c3893f4f496a83e3658
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Fri Nov 11 19:33:33 2022 +0000
+
+    [func.wrap.move.ctor] Move private expos member to general index
+
+    The private, exposition-only data member is not useful in the library
+    index. However, there seems no reason to not show it in the general
+    index, so we move the index entry from the library index to the
+    general index.
+
+    Partially fixes NB GB 137 (C++23 CD).
+
+commit 3e825f144f2aa8668c9a1a94066b43799e08a6e7
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Nov 8 21:31:30 2022 +0000
+
+    [basic.scope.scope] Fix indentation in example
+
+    Fixes NB US 034 (C++23 CD).
+
+commit 92de5996625efcb070f99681acd2e39efc206ee2
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Nov 8 23:24:35 2022 +0000
+
+    [unord.req.general] Fix garbled end of sentence
+
+    This was an editorial mistake introduced by the transformation of the
+    requirement tables into regular paragraphs.
+
+    Fixes NB US 100 (C++23 CD).
+
+commit 24e046896029a11f2cb78fd6db21482fb0d4be66
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Nov 8 21:02:31 2022 +0000
+
+    [coro.generator.promise] Use "equivalent to `throw`, ..."
+
+    Our style guide says that "equivalent to <expression>" is the
+    appropriate style for an expression of type `void`, which is the case
+    for `throw`. This avoids the awkward situation of having "equivalent
+    to: `throws;`" appear in the middle of a paragraph without proper
+    terminal punctuation.
+
+    Fixes NB US 119 (C++23 CD).
+
+commit 3f47d2565f26a9144e8076641ee55bf7be79f896
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Nov 8 21:27:56 2022 +0000
+
+    [coro.generator.promise] Remove unused name "x"
+
+    Fixes NB US 120 (C++23 CD).
+
+commit fb0df97e7d7c2c75bbdf7164c33b0796024ff6d3
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Thu Nov 17 08:44:05 2022 +0000
+
+    [atomics] Replace integral and floating-point placeholders (#5939)
+
+    Fixes NB GB 129 (C++23 CD).
+
+commit 0bb57d5ebffa7170fbc80724f55a6ac2a82f2e83
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Fri Nov 25 14:56:24 2022 +0800
+
+    [format.arg] Add std:: for forward
+
+commit c88fb46327d87d78d571b7e1076e1916eaf7e310
+Author: Dawn Perchik <dawn@brightsidecomputing.com>
+Date:   Tue Nov 15 07:46:41 2022 -0800
+
+    [expr.unary.op] Say "the ~ operator" consistently, remove "unary"
+
+    We are currently using the term "unary complement operator" to refer
+    to the "~" operator without ever giving it that name. This change
+    removes the use of that undefined term.
+
+commit bef02b89464fe6f4be3926d62defc92986ae4532
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Tue Nov 22 16:28:42 2022 +0000
+
+    [expr.unary.op] Notes naming unary ops as {ones',two's} complement
+
+    The terms "one's complement" and "two's complement" are well-known,
+    and it is useful to associate them with these operators.
+
+commit 020a312b2aa513a992e488d82db55fd0cd4fa025
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Wed Nov 16 17:48:12 2022 +0000
+
+    [fs.rec.dir.itr.nonmembers] "for" is a keyword in "range-based for"
+
+commit cee095e75a97fb88a7053e360b3bc06d36a6b687
+Author: Alisdair Meredith <alisdairm@me.com>
+Date:   Fri Dec 16 06:51:26 2022 +0700
+
+    [depr.conversions.string] remove redundent respecification (#6004)
+
+    There are several typedef names defined precisely in the deprecated code conversion
+    facets classes that are redundantly respecified in text. Nowhere else in the library
+    does this; any specified typedef names are _see below_ definitions, not repeats of
+    the class definition. Needless redundancy is always a risk of divergence, however
+    small, so remove the respecification in text form.
+
+commit 1bb52db31be002f04ea5977f9900ba4174c7155e
+Author: Anoop Rana <93918384+ranaanoop@users.noreply.github.com>
+Date:   Fri Dec 16 05:23:57 2022 +0530
+
+    [concepts.object] Change "built-in" to "fundamental" types (#6012)
+
+commit ce1cc3b011099b6228b18dad937911c6ea67d309
+Author: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
+Date:   Sun Dec 11 17:03:41 2022 -0400
+
+    [expr.const] Remove redundant "ill-formed" in "error" comment
+
+commit 5d43f0137776fa112d0ffd6ba0e34df34a4cb820
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Tue Dec 13 12:52:00 2022 +0000
+
+    [time.zone.leap.members] update note about leap seconds
+
+commit fd20d4ea9f3ea8653b17169aad61eec843b71718
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Wed Nov 23 14:45:43 2022 +0000
+
+    [time.zone.zonedtime.overview] Rename parameters to match later definitions
+
+commit 137728f0830824c6058648a846376eec80e5cab3
+Author: Michael Florian Hava <mfh@live.at>
+Date:   Fri Dec 16 02:10:55 2022 +0100
+
+    [coro.generator.promise] Fix template parameters (#6009)
+
+    Some of the template parameters of `yield_value` were inconsistent,
+    and the synopsis contained an outright typo. This change uses `R2`
+    consistently since the parameter is a reference.
+
+commit 5d6099c3df78922ee5b5f1d1c42a5c762d246df0
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Thu Dec 15 23:31:26 2022 +0000
+
+    [formatter.requirements] Remove one level of list nesting
+
+commit 9e41a1c27de2f676badacbe0c1aac783063b7cd6
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Wed Nov 16 19:43:58 2022 +0000
+
+    [time.clock.req] Make list item end with comma, not full stop.
+
+    Also reformat the itemization source to be more edit-friendly.
+
+commit 5ef31f3fc1531d9e6e923cb57bf6e5ecec59ed4e
+Author: languagelawyer <language.lawyer@gmail.com>
+Date:   Thu Jun 25 10:54:17 2020 +0300
+
+    [expr.unary.op] Fix usage of "result"
+
+commit 8c60752c7eb28e1ff1cc9e088d7836957356f559
+Author: Jonathan Wakely <cxx@kayari.org>
+Date:   Tue Apr 26 10:18:11 2022 +0100
+
+    [optional.ctor], [expected.object.ctor] Add converts-from-any-cvref
+
+commit 405b46f50ce6c7458e94db7b4528fc267e2b67c3
+Author: Hewill Kang <67143766+hewillk@users.noreply.github.com>
+Date:   Sat Dec 17 00:14:51 2022 +0800
+
+    [mdspan.mdspan.overview] Add default template arguments for mdspan (#6018)
+
+    We usually restate the default template arguments in the class synopsis,
+    so that the information is in one place and one does not need to also refer
+    to the header synopsis.
+
+commit ae88bb581d32f1939987c0a834fe3f6011a9d003
+Author: frederick-vs-ja <de34@live.cn>
+Date:   Fri Dec 16 21:25:31 2022 +0800
+
+    [range.repeat] Change `W`/`WArgs` to `T`/`TArgs`
+
+commit 0a1f1e147c75ce9220de3488103ca880b6b8e49f
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Fri Dec 16 17:19:08 2022 +0000
+
+    [concept.copyconstructible] Avoid "possibly \tcode{const}"
+
+    A small rewrite avoids the phrase "possibly \tcode{const}",
+    which we would like to remove entirely in favour of just
+    "possibly const".
+
+commit f058decdf9c7dea0461f723df72f5093f5e92b11
+Author: Thomas Köppe <tkoeppe@google.com>
+Date:   Fri Dec 16 17:31:47 2022 +0000
+
+    Replace "possibly \tcode{const}" with "possibly const"
+
+    The "const" here is not syntax, but just normal text.
+    This is similar to "inline" and "public", which have
+    previously been cleaned up similarly.
+
+commit 9ac55553459e15c84db6d8072c93787d41ef7ccf
+Author: Jens Maurer <Jens.Maurer@gmx.net>
+Date:   Fri Jun 4 00:29:30 2021 +0200
+
+    [lib] Drop 'inline' from 'inline constexpr' variable templates.
+
+    Since CWG2387, constexpr variable templates have external linkage.
+
+ + diff --git a/papers/n4929.md b/papers/n4929.md new file mode 100644 index 0000000000..36adf1e8d4 --- /dev/null +++ b/papers/n4929.md @@ -0,0 +1,868 @@ +# N4929 Editors' Report -- Programming Languages -- C++ + +Date: 2022-12-18 + +Thomas Köppe (editor, Google DeepMind) +Jens Maurer (co-editor) +Dawn Perchik (co-editor, Bright Side Computing, LLC) +Richard Smith (co-editor, Google Inc) + +Email: `cxxeditor@gmail.com` + +## Acknowledgements + +Thanks to all those who have [submitted editorial +issues](https://github.com/cplusplus/draft/wiki/How-to-submit-an-editorial-issue) +and to those who have provided pull requests with fixes. +Thank you also to Dan Raviv and Robert Leahy for drafting motion applications, +and special thanks to Johel Ernesto Guerrero Peña for providing in-depth review +of many of the draft motion applications. + +## New papers + + * [N4928](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4928.pdf) is the + current working draft for C++23. It replaces + [N4917](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4917.pdf). + * N4929 is this Editors' Report. + +## National body comments on the Committee Draft + +N4919 is the C++23 Committee Draft. It received 137 comments from national bodies. +The working group's responses to the issues so far is noted below. + +### Editorial comments + +The following 11 national body comments are editorial in nature, and fixes for +them have been applied. + + * **FR 008:** Accepted; fixed by 6a1c5050c21ac26fcb2b5b187a0de867713568dc. + * **FR 027:** Accepted; fixed by b2fa70faa783827cd38b819409e94da2523333f2. + New subclauses "contiguous access" and "mulitidimensional access" have been added + to organize the content for `span` and `mdspan`. + * **US 029:** Accepted with modifications; fixed by 6c51392a3d1c3c928ef1c20c19e8efe6efed7dc1. + This issue had already been fixed editorially prior to the NB comments. + * **US 034:** Accepted; fixed by 3e825f144f2aa8668c9a1a94066b43799e08a6e7. + * **CA 062:** Accepted with modifications; fixed by d829eac310981e688a15b28622a2f048d23eed65. + A second erroneous comment with the same problem has also been corrected in the same way. + * **US 100:** Accepted; fixed by 92de5996625efcb070f99681acd2e39efc206ee2. + * **US 119:** Accepted with modifications; fixed by 24e046896029a11f2cb78fd6db21482fb0d4be66. + We removed the colon after "equivalent to" and the semicolon after "throw", + and connected the next sentence with a comma. + * **US 120:** Accepted; fixed by 3f47d2565f26a9144e8076641ee55bf7be79f896. + * **GB 129:** Accepted with modifications; fixed by fb0df97e7d7c2c75bbdf7164c33b0796024ff6d3. + Reviewed by LWG and considered editorial. + * **GB 136:** Accepted; fixed by e0bab4b7f2d8afe5d3939aa49fe6de4fd5e638c6. + * **GB 137:** Accepted; fixed by 9512e41e30cf24a8e93e8c8568ff1b5c14398cc6 and 0783dde32073b02b369c7c3893f4f496a83e3658. + +### Non-editorial comments + +* **FR 004:** Partially fixed by [P1264R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1264r2.pdf) (LWG poll 12). +* **FR 005:** Fixed by [CWG2631](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2631) (CWG poll 4). +* **FR 009:** Duplicate of GB 093 +* **FR 019:** Duplicate of US 123 +* **US 028:** Fixed by [CWG2640](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2640) (CWG poll 4). +* **US 030:** Fixed by [CWG2639](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2639) (CWG poll 4). +* **US 033:** Fixed by [CWG2242](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2242) (CWG poll 3). +* **DE 038:** Fixed by [P2718R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2718r0.html) (CWG poll 12). +* **US 039:** Fixed by [CWG2643](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2643) (CWG poll 3). +* **US 042:** Fixed by [CWG2644](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2644) (CWG poll 3). +* **US 044:** Fixed by [CWG2645](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2645) (CWG poll 3). +* **US 045:** Fixed by [CWG2654](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2654) (CWG poll 5). +* **US 045:** Fixed by [CWG2654](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2654) (CWG poll 5). +* **DE 046:** Fixed by [P2564R3](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2564r3.html) (CWG poll 9). +* **US 047:** Fixed by [CWG2647](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2647) (CWG poll 3). +* **GB 048:** Fixed by [P2647R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2647r1.html) (CWG poll 8). +* **GB 051:** Fixed by [CWG2653](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2653) (CWG poll 4). +* **US 052:** Fixed by [CWG2646](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2646) (CWG poll 3). +* **CA 054:** Fixed by [CWG2621](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2621) (CWG poll 3). +* **GB 055:** Fixed by [CWG2538](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2538) (CWG poll 6). +* **GB 059:** Fixed by [P2615R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2615r1.html) (CWG poll 11). +* **US 061:** Fixed by [P2706R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2706r0.html) (CWG poll 10). +* **CA 063:** Fixed by [CWG2648](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2648) (CWG poll 3). +* **CA 064:** Fixed by [CWG2649](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2649) (CWG poll 3). +* **CA 065:** Fixed by [P2589R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2589r1.pdf) (CWG poll 7). +* **US 068:** Fixed by [CWG2650](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2650) (CWG poll 3). +* **US 069:** Fixed by [CWG2651](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2651) (CWG poll 3). +* **GB 070:** Fixed by [CWG2615](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2615) (CWG poll 4). +* **US 071:** Fixed by [CWG2652](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2652) (CWG poll 4). +* **US 073:** Fixed by [P2167R3](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2167r3.html) (LWG poll 10). +* **GB 074:** Fixed by [LWG3818](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3818) (LWG poll 8). +* **GB 075:** Fixed by [LWG3753](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3753) (LWG poll 8). +* **GB 085:** Fixed by [LWG3814](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3814) (LWG poll 8). +* **GB 090:** Fixed by [LWG3823](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3823) (LWG poll 8). +* **US 091:** Duplicate of GB 093 +* **US 092:** Duplicate of GB 093 +* **GB 093:** Fixed by [P2505R5](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2505r5.html) (LWG poll 13). +* **GB 095:** Fixed by [LWG3824](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3824) (LWG poll 8). +* **GB 101:** Fixed by [LWG3817](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3817) (LWG poll 8). +* **US 103:** Fixed by [LWG3816](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3816) (LWG poll 8). +* **US 109:** Partially fixed by [LWG3717](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3717) + and [LWG3737](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3737) (LWG poll 8). +* **GB 110:** Fixed by [LWG3814](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3814) (LWG poll 8). +* **US 111:** Fixed by [P2602R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2602r2.html) (LWG poll 9). +* **US 118:** Fixed by [LWG3826](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3826) (LWG poll 8). +* **US 123:** Fixed by [P2539R4](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2539r4.html) (LWG poll 11). +* **US 124:** Duplicate of US 123 +* **US 125:** Fixed by [LWG3822](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3822) (LWG poll 8). +* **GB 130:** Partially fixed by [LWG3814](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html#3814) (LWG poll 8). +* **US 132:** Fixed by [CWG2636](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2636) (CWG poll 3). + +## Motions incorporated into working draft + +### Notes + + * CWG issue 2602 was withdrawn from the motions. Even though it is part of + [P2709R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2709r0.html), + it has not been applied. + * CWG issue 2642 (in + [P2710R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html#2642), + polled in CWG poll 3) was discovered to be incorrect after the WG21 meeting; + CWG has requested that the issue not be applied and reverted to the working + group for further discussion. It has not been applied. + +### Core working group polls + +CWG poll 1: Accept as Defect Reports all issues except 2635 and 2602 in [P2709R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2709r0.html) (Core Language Working Group "ready" Issues for the November, 2022 meeting) and apply their proposed resolutions to the C++ Working Paper. + +CWG poll 2: Accept as a Defect Report issue 2635 (Constrained structured bindings) in [P2709R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2709r0.html) (Core Language Working Group "ready" Issues for the November, 2022 meeting) and apply its proposed resolution to the C++ Working Paper. + +CWG poll 3: Accept as Defect Reports all issues except 2615, 2639, 2640, 2652, 2653, 2654, and 2538 in [P2710R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html) (Core Language Working Group NB comment resolutions for the November, 2022 meeting) and apply their proposed resolution to the C++ Working Paper, resolving the NB comments as indicated. + +CWG poll 4: Apply the proposed resolutions of issues 2615, 2639, 2640, 2652, and 2653 in [P2710R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html) (Core Language Working Group NB comment resolutions for the November, 2022 meeting) to the C++ Working Paper, resolving the NB comments as indicated. + +CWG poll 5: Accept as a Defect Report issue 2654 (Un-deprecation of compound volatile assignments) in [P2710R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html) (Core Language Working Group NB comment resolutions for the November, 2022 meeting) and apply its proposed resolution to the C++ Working Paper, resolving NB comment US 16-045. + +CWG poll 6: Accept as a Defect Report issue 2538 (Can standard attributes be syntactically ignored?) in [P2710R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2710r0.html) (Core Language Working Group NB comment resolutions for the November, 2022 meeting) and apply its proposed resolution to the C++ Working Paper, resolving NB comment GB-055. + +CWG poll 7: Apply the changes in [P2589R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2589r1.pdf) (`static operator[]`) to the C++ Working Paper, resolving NB comment CA-065. + +CWG poll 8: Accept as a Defect Report and apply the changes in [P2647R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2647r1.html) (Permitting static constexpr variables in constexpr functions) to the C++ Working Paper, resolving NB comment GB-048. + +CWG poll 9: Accept as a Defect Report and apply the changes in [P2564R3](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2564r3.html) (`consteval` needs to propagate up) to the C++ Working Paper, resolving NB comment DE-046. + +CWG poll 10: Accept as a Defect Report and apply the changes in [P2706R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2706r0.html) (Redundant specification for defaulted functions) to the C++ Working Paper, resolving NB comment US 26-061. + +CWG poll 11: Accept as a Defect Report and apply the changes in [P2615R1](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2615r1.html) (Meaningful exports) to the C++ Working Paper, resolving NB comment GB-059. + +CWG poll 12: Apply the changes in [P2718R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2718r0.html) (Wording for P2644R1 Fix for Range-based `for` Loop) to the C++ Working Paper, resolving NB comment DE-038. + +### Library working group polls + +Polls 1–6 do not concern the C++ Working Paper. + +LWG poll 7: Apply the changes for all Ready and Tentatively Ready issues in [P2703R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2703r0.html) (C++ Standard Library Ready Issues to be moved in Kona, Nov. 2022) to the C++ working paper. + +LWG poll 8: Apply the changes for all Immediate issues in [P2704R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2704r0.html) (C++ Standard Library Immediate Issues to be moved in Kona, Nov. 2022) to the C++ working paper. + +LWG poll 9: Apply the changes in [P2602R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2602r2.html) (Poison Pills are Too Toxic) to the C++ working paper. This addresses ballot comment US 49-111. + +LWG poll 10: Apply the changes in [P2167R3](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2167r3.html) (Improved Proposed Wording for LWG 2114 (contextually convertible to `bool`)) to the C++ working paper. This addresses ballot comment US 32-073. + +LWG poll 11: Apply the changes in [P2539R4](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2539r4.html) (Should the output of `std::print` to a terminal be synchronized with the underlying stream?) to the C++ working paper. This addresses ballot comment US 58-123 (and duplicates US 59-124 and FR-001-019). + +LWG poll 12: Apply the changes in [P1264R2](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1264r2.pdf) (Revising the wording of stream input operations) to the C++ working paper. This partially addresses ballot comment FR-018-004. + +LWG poll 13: Apply the changes in [P2505R5](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2505r5.html) (Monadic Functions for `std::expected`) to the C++ working paper. This addresses ballot comments GB-093, US 36-091, US 35-092, and FR-011-009. + +LWG poll 14: Apply the changes in [P2696R0](http://open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2696r0.html) (Introduce _Cpp17Swappable_ as additional convenience requirements) to the C++ working paper. + +### Noteworthy editorial changes + +* There were no noteworthy changes to the wording of the approved papers. +* A new subclause "Arithmetic types" was added. The new subclause contains + both "integer types" (``) and the new "extended floating-point + types" (``). Previously, the newly added `` synopsis + was somewhat disconnected and out of context. + +### Minor editorial changes + +A log of editorial fixes made to the working draft since N4917 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/n4917...n4928). + + commit 7772de4408db8122431169156ea230803cb6bf56 + Author: Thomas Köppe + Date: Tue Sep 6 19:47:21 2022 +0100 + + [headers] Reflow table after header additions + + commit 3231e8115e93a24806694c36f1eb2d709fe78f4f + Author: Jens Maurer + Date: Sun Jun 12 15:49:22 2022 +0200 + + [basic.align] Recommend alignment-specifier instead of deprecated library facility + + commit 37d46b0d41d014febacd9ffe684eb0cf11a5c364 + Author: Chuanqi Xu + Date: Tue Jun 7 16:19:08 2022 +0800 + + [module.reach] Remove redundant module implementation unit declaration + + commit 4e2297b8d2543062edf347ec13341a8356f59605 + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Fri Sep 9 04:12:51 2022 +0800 + + [thread.stoptoken.syn] "class template", not just "class"; fix spacing (#5799) + + commit 20452e91b30d0a299a03d937f443a81537dc03f2 + Author: xmh0511 <970252187@qq.com> + Date: Fri Sep 9 04:54:01 2022 +0800 + + [basic.def.odr] A variable is "named by" an expression (#5534) + + The previous wording, a variable "whose name appears + as [an] expression", is less precise and not well-defined. + + commit 7260f30c74eaf670b3f3d33a7571f6c055930cd7 + Author: Jens Maurer + Date: Fri Jan 21 23:27:34 2022 +0100 + + [basic.life] Add cross-reference for union member lifetime + + commit ba51a5375fa3099e4a85594f2e67d48bc11ec448 + Author: Jonathan Wakely + Date: Mon Mar 20 11:58:33 2017 +0000 + + [rand.req.seedseq] Rephrase in terms of const types not values + + commit 88e574edc674e85911ea1a5b4e87c07457d97bf1 + Author: Jonathan Wakely + Date: Mon Mar 20 12:23:12 2017 +0000 + + [container.requirements] Rephrase in terms of const types not values + + commit 547987d9d203bb7f1f18297ca438ccb18d8fe612 + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Wed Sep 14 14:39:16 2022 +0800 + + [range.chunk.view.input, range.slide.view] Remove unused name in the deduction guide + + commit c774ac4a072efd41e478d72ad57a3dae8b0946ff + Author: Mathias Stearn + Date: Fri Sep 16 17:46:10 2022 +0200 + + [basic.life] Change "complete const object" to "const, complete object" (#5818) + + "Complete object" is a defined term (https://eel.is/c++draft/basic#def:complete_object). + Putting "const" in the middle of that leaves it ambiguous whether we are referring to + a const-qualified "complete object", or to a complete const object with some other meaning + of "complete" (such as "with a complete type"). + + commit 787ea7683982ed58b1a8bf7bbfb7c77f8d227dce + Author: Jens Maurer + Date: Fri Sep 16 21:24:15 2022 +0200 + + [diagnostics] Remove 'shall', use 'recommended practice' + + commit 9a005c04b91ffa9b92e6a57a03419091f365bc9b + Author: Jens Maurer + Date: Fri Sep 16 21:57:46 2022 +0200 + + [func.bind.isplace] Add cross-reference to [func.bind.place] + + commit 7bd72a7671d9bee0eed11578e325460bcf7fa5a1 + Author: Jens Maurer + Date: Fri Sep 16 22:09:23 2022 +0200 + + [vector.bool.pspc] Index vector::reference + + commit f68d6428f27d5cd722e713262d8986489484ae02 + Author: Jens Maurer + Date: Fri Sep 16 22:18:36 2022 +0200 + + [over.best.ics.general] Split long paragraph + + commit 1383e97e21d6d10ac210344d66ab715cfc0f747a + Author: Jonathan Wakely + Date: Thu Sep 15 15:38:58 2022 +0100 + + [ranges.syn] Make get overloads freestanding + + These were moved to the synopsis after the P1642 changes to mark nearly + everything in the synopsis freestanding, so they were not marked. + + commit c70087afe980f9ec339f088babde575e04e185d7 + Author: languagelawyer <38548419+languagelawyer@users.noreply.github.com> + Date: Sat Sep 17 02:29:45 2022 +0500 + + [expr.add] Move note, add example (#4778) + + The original note wasn't quite in the right place. + It is moved and made more concrete. + + In the original place of the note we now put + a more immediately relevant example. + + commit 6000c29e5b9547bf457f4461fd538670144ad88c + Author: Jens Maurer + Date: Sat Sep 17 10:05:19 2022 +0200 + + [format.string.std] Clarify location of 0x prefix for pointers + + commit 718873b512d0687143bbfa00e18edfb0a8b164ce + Author: Jens Maurer + Date: Sat Sep 17 08:56:36 2022 +0200 + + [expr.prim.lambda.capture] Cross-reference [basic.def.odr] for 'odr-usable' + + commit 6a98fd8c1f9ea79961b78f731637ba9fe9d52218 + Author: Jens Maurer + Date: Sat Sep 17 09:05:57 2022 +0200 + + [thread.thread.this] Clarify this_thread::get_id + + commit 90c4ba5624a655af5c5d8b11c1137d552f3e0a60 + Author: Casey Carter + Date: Sun Sep 18 14:55:55 2022 -0700 + + [headers] Order `` before `` in the header table + + Fixes #5853. + + commit 16f92154ce99a5fef26c53c464e8b14ad5b78d79 + Author: A. Jiang + Date: Tue Sep 20 05:37:31 2022 +0800 + + [c.math.hypot3] Fix mis-transcribed parameter type (#5852) + + The paper P1467R9 says that the third parameter of `hypot` should be + `_floating-point-type_`, but it was erroneously transcribed as `double`. + + commit db26a63222f10cec871656958b3e296e529df67e + Author: Thomas Köppe + Date: Wed Sep 21 22:18:51 2022 +0100 + + [support, etc.] New subclause "Arithmetic types". (#5851) + + The new subclause contains both "integer types" () + and "extended floating-point types" (). + + Previously, the newly added synopsis was somewhat + disconnected and out of context. + + This change removes the stable labels [cstdint] and [cstdint.general]. + + commit d462173b5afdc8506d85e5395f2be19311895f2d + Author: Casey Carter + Date: Mon Sep 19 20:42:44 2022 -0700 + + [mdspan.extents.cons] Correct spelling of "dynamic-extents" + + commit 14a10ef0948f4709cd1114c489b8e4b919ba7cbc + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Thu Sep 22 05:20:44 2022 +0800 + + [unord.general, container.adaptors.general] Fix list of exposition-only alias templates (#5840) + + commit aab149233f76df37979d777ffd2b3151c52d48a9 + Author: Jonathan Wakely + Date: Thu Sep 22 10:51:46 2022 +0100 + + [template.bitset] reorder synopsis and member descriptions + + Group shifts together and use same order for synopsis and detailed + descriptions. + + Also remove the unnecessary "for b[i];" comments explaining what + operator[] does, and add a comment introducing the group containing + count(), size() etc. + + commit 63e4a76f780c925a13efeb06955252d7c37ed4ef + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Thu Sep 22 09:30:14 2022 +0800 + + [range.as.const.overview] Remove unnecessary ranges namespace qualification + + commit 179436adbe60c277fa6512352ee27e26f192bf2b + Author: Alisdair Meredith + Date: Fri Sep 23 12:45:09 2022 -0400 + + [utility.arg.requirements] Present identifiers as itemization (#5856) + + Lists providing the key for names used throughout a subclause are difficult + to follow when buried as a single sentence in a paragraph. This change updates + the key to tables 29-36 in [utility.arg.requirements] to a bulleted list + following the examples set elsewhere. + + Each key is now consistently introduced with the word "denotes", following + the precedent set by similar bullet lists. + + It is not at all coincidental that this also resolves pagination issues + at the end of the page, so that the floating tables to not float into the + middle of a sentence in the following section. + + commit 24d54e30506a62ef41cf4bd0132fbdba45bb6dda + Author: Jonathan Wakely + Date: Tue Sep 27 11:56:32 2022 +0100 + + [futures.task.members] Add missing explicit to packaged_task ctor + + commit 842424bd228b79876437a1a9393f20f00033476a + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Wed Sep 28 16:39:59 2022 +0800 + + [futures.task.members] Correct capitalization + + commit d3ddc0906638bb30b5a3ce0f4033148e9a8ed1ff + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Thu Sep 29 15:49:06 2022 +0800 + + [container.rev.reqmts] Correct capitalization + + commit a7f17181ef5b59ad728b421a83975209406fa037 + Author: Daniel Krügler + Date: Mon Oct 3 17:59:20 2022 +0200 + + [sequence.reqmts] Use "lvalues of type T are swappable" (#5878) + + commit dd6c7f4012489325bdd65a40cd121b3d25008b0e + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Tue Oct 4 04:41:26 2022 +0800 + + [associative.reqmts.general] Fix typo in namespace name (#5881) + + commit 42c7b3fb3a3cb11bc1af418cfdd395ecf314aa43 + Author: Thomas Köppe + Date: Tue Oct 4 13:08:17 2022 +0100 + + [intro.defs] Update hyperlink according to SC22 requirements + + commit 05019b35890b79374fac180a9a9ff9e7cf8d7595 + Author: Thomas Köppe + Date: Tue Oct 4 15:19:01 2022 +0100 + + Foreword placeholder + + commit b0fab58d4f2b12defdaf7c3ddfb2ddcd1f30e1b5 + Author: Jonathan Wakely + Date: Wed Oct 5 11:27:23 2022 +0100 + + [temp.local] Fix typo in "inject-class-name" (#5889) + + commit f6c5d4512d4b32d63d66669555ab976b315d439c + Author: mordante + Date: Mon Oct 10 17:50:51 2022 +0200 + + [format.string.escaped] Fix example of invalid code unit (#5890) + + Example 5 should only have one invalid code unit. The second code unit is a valid code point. + + This issue was already in the paper P2286R8 "Formatting Ranges". + + commit 5f26c516a659cdf3f0ea007cf6c90c690cccc3b6 + Author: Eelis van der Weegen + Date: Tue Oct 11 04:36:08 2022 +0200 + + [bibliography] Remove stray closing parenthesis. + + commit 6c51392a3d1c3c928ef1c20c19e8efe6efed7dc1 + Author: Corentin Jabot + Date: Wed Oct 19 22:29:09 2022 +0200 + + [intro.defs] Move the definition of "multibyte character" to library + + This address the US-2 NB comment as per the direction voted on + by SG-16. + + No use of "multibyte character" remains before [multibyte.strings]. + + commit 33e56641d63c5993d288082cf264a733464ff75c + Author: Arthur O'Dwyer + Date: Tue Oct 25 17:48:03 2022 -0400 + + [stack.syn, queue.syn] Add xref comments to class synopses (#5913) + + commit 90aa7729b9a926622581354284ecf294a56e410b + Author: Will Hawkins <8715530+hawkinsw@users.noreply.github.com> + Date: Tue Nov 1 04:37:52 2022 -0400 + + [range.dangling] Replace "tag type" with just "type" (#5922) + + The extra word "tag" was not adding any value and was potentially, + confusing; e.g. the "dangling" type is not like, say, an iterator tag + that would be used for overload resolution. + + commit fd998c52af2dc6b9c73098fdbd5a22444a358448 + Author: Arthur O'Dwyer + Date: Tue Nov 1 10:45:53 2022 -0400 + + [flat.set] [flat.multiset] Use value_type, not key_type + + For consistency with the other `set`, `unordered_set` containers. + `key_type` is a synonym for `value_type`, and there's no reason + the flat containers need to depart from existing practice here. + + commit 48ecaaec300de4a8176c116408cac915142166ce + Author: Arthur O'Dwyer + Date: Mon Nov 7 14:02:40 2022 -0500 + + [flat.multiset.modifiers] Fix typo in "multiset" (#5927) + + commit 45d9a5ba5aee1e3c4da8938e12376b36a7147d63 + Author: Eric41293 + Date: Mon Nov 7 11:11:58 2022 -0800 + + [climits.syn] Correct note about types of macros (#5926) + + This note was added apparently as a response to LWG 416. However, there may have been a misunderstanding of the C standard, and in fact only the macros for `{signed,unsigned,} char` and `{signed,unsigned} int` have a different type. + + commit f41cd00273e6ee7ff1a29446b21f230c28bf1a9f + Author: Jonathan Wakely + Date: Mon Nov 7 20:59:54 2022 +0000 + + [time.clock.system.nonmembers, time.zone.zonedtime.nonmembers] Add to STATICALLY-WIDEN (#5934) + + commit ef7d0e234722d2ef8b4ec069b6f929dc083d8dc7 + Author: Ed Catmur + Date: Tue Sep 20 18:12:45 2022 +0100 + + [meta, thread] Add or amend references to func.{require,invoke} + + commit 0d5c9b9310b2f6c6c4259665e1e680936babdc3d + Author: Eric41293 + Date: Mon Nov 7 15:54:55 2022 -0800 + + [meta.type.synop] Capitalize NTTP name (#5921) + + commit 0959b5c200a6f2b543e2d656850917b8d788767c + Author: Hui <65944694+huixie90@users.noreply.github.com> + Date: Tue Nov 8 00:49:15 2022 +0000 + + [range.drop.while.overview] Use string_view rather than string literal (#5897) + + The string literal would have been treated as a `const char*`, which is not a range. + + commit 720c3ae24a68fda02a6372eda13ec3f9c6a1a39b + Author: Jonathan Wakely + Date: Tue Nov 8 02:01:34 2022 +0000 + + [time.format] Use basic_ostringstream instead of ostringstream (#5932) + + commit 8739d316f2a55c633963b26b748681ff16498887 + Author: Marc Mutz <94039187+marcmutz@users.noreply.github.com> + Date: Tue Nov 8 03:05:45 2022 +0100 + + [meta.const.eval] Add is_constant_evaluated to index of library names (#5898) + + Previously, only its feature-test macro was listed there. + + commit 4c442cf93f03a44ec1f6a93875043a3aca7c5b9b + Author: Johel Ernesto Guerrero Peña + Date: Mon Nov 7 23:38:36 2022 -0400 + + [class.union.general] Attach example to its note (#5882) + + commit 65c494b9a4a5a4fab500733441c04e50a787d318 + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Tue Nov 8 15:51:21 2022 +0800 + + [mdspan.extents.expo] Remove redundant "// exposition only" (#5907) + + commit b766881dda1d0201d98710b11efda3491a84b4f2 + Author: languagelawyer <38548419+languagelawyer@users.noreply.github.com> + Date: Tue Nov 8 13:15:07 2022 +0500 + + [dcl.init.list] Specify the type of the prvalue (#5919) + + commit 6e035b52e28e95211a39ffb552851499432b2c6e + Author: Johel Ernesto Guerrero Peña + Date: Tue Nov 8 15:30:29 2022 -0400 + + [ratio.ratio] Use symbol "sgn" for the signum function (#5925) + + commit 89269f8e548b993b239f2c0f5ecc071ee7f54c9a + Author: Blackteahamburger + Date: Wed Nov 9 04:12:59 2022 +0800 + + [dcl.link] Add missing restriction to language linkage application (#5892) + + A language linkage specification should only apply to entities that do in fact have language linkage. + + commit ea77b2fa83ddac0c52c1b505ff666328a2a8f558 + Author: Jens Maurer + Date: Wed Nov 9 00:34:26 2022 +0100 + + [temp.deduct.general] Fix typo in comment in example + + commit 0c196ec375993000547e8913abb4c4ce703144cb + Author: Jens Maurer + Date: Thu Nov 10 15:32:56 2022 +0100 + + [temp.deduct.conv] Remove misleading paragraph break + + commit 0cd0c33f648d1304160e6dcb1856affd71b3ebbb + Author: Casey Carter + Date: Fri Nov 11 18:35:53 2022 -0800 + + [mdspan.extents.cons] "constexpr" should precede "explicit" + + In library function declarations, the `constexpr` specifier always precedes the `explicit` specifier per our standing style guide. + + commit 608c152dbae69d335d7238cdd5d178e048e2a1fd + Author: Casey Carter + Date: Mon Nov 14 10:48:18 2022 -0800 + + [vector.bool.pspc] Replace `constexpr static` with `static constexpr` + + As preferred by our style guide. + + commit d829eac310981e688a15b28622a2f048d23eed65 + Author: Thomas Köppe + Date: Thu Nov 10 07:43:32 2022 +0000 + + [class.inhctor.init] Fix explanation of "error:" in example + + The correct explanation is that classes `B1` and `D1` do not have + default constructors, not that they have deleted default constructors. + + Fixes NB CA 062 (C++23 CD). + + commit 6a1c5050c21ac26fcb2b5b187a0de867713568dc + Author: Thomas Köppe + Date: Tue Nov 8 23:35:00 2022 +0000 + + [diff.cpp20.library] Add missing new headers + + Fixes NB FR 008 (C++23 CD). + + commit b2fa70faa783827cd38b819409e94da2523333f2 + Author: Thomas Köppe + Date: Wed Nov 9 18:50:56 2022 +0000 + + [views] Subclauses for contiguous and multidimensional access + + This organises the material for and into separate + subclauses, rather than having all constituent parts being siblings in + the same subclause. Even though we now have some subclauses six levels + deep, this seems like an improvement. As a drive-by, this allows us to + move a subclause on a non-member span helper function up one level, + where it is more appropriate. + + Fixes NB FR 027 (C++23 CD). + + commit e0bab4b7f2d8afe5d3939aa49fe6de4fd5e638c6 + Author: Thomas Köppe + Date: Thu Nov 10 02:16:11 2022 +0000 + + [concepts index] Describe exposition-only concepts + + Fixes NB GB 136 (C++23 CD). + + commit 9512e41e30cf24a8e93e8c8568ff1b5c14398cc6 + Author: Thomas Köppe + Date: Fri Nov 11 19:31:11 2022 +0000 + + [general, library index] Describe exposition-only entities + + Partially fixes NB GB 137 (C++23 CD). + + commit 0783dde32073b02b369c7c3893f4f496a83e3658 + Author: Thomas Köppe + Date: Fri Nov 11 19:33:33 2022 +0000 + + [func.wrap.move.ctor] Move private expos member to general index + + The private, exposition-only data member is not useful in the library + index. However, there seems no reason to not show it in the general + index, so we move the index entry from the library index to the + general index. + + Partially fixes NB GB 137 (C++23 CD). + + commit 3e825f144f2aa8668c9a1a94066b43799e08a6e7 + Author: Thomas Köppe + Date: Tue Nov 8 21:31:30 2022 +0000 + + [basic.scope.scope] Fix indentation in example + + Fixes NB US 034 (C++23 CD). + + commit 92de5996625efcb070f99681acd2e39efc206ee2 + Author: Thomas Köppe + Date: Tue Nov 8 23:24:35 2022 +0000 + + [unord.req.general] Fix garbled end of sentence + + This was an editorial mistake introduced by the transformation of the + requirement tables into regular paragraphs. + + Fixes NB US 100 (C++23 CD). + + commit 24e046896029a11f2cb78fd6db21482fb0d4be66 + Author: Thomas Köppe + Date: Tue Nov 8 21:02:31 2022 +0000 + + [coro.generator.promise] Use "equivalent to `throw`, ..." + + Our style guide says that "equivalent to " is the + appropriate style for an expression of type `void`, which is the case + for `throw`. This avoids the awkward situation of having "equivalent + to: `throws;`" appear in the middle of a paragraph without proper + terminal punctuation. + + Fixes NB US 119 (C++23 CD). + + commit 3f47d2565f26a9144e8076641ee55bf7be79f896 + Author: Thomas Köppe + Date: Tue Nov 8 21:27:56 2022 +0000 + + [coro.generator.promise] Remove unused name "x" + + Fixes NB US 120 (C++23 CD). + + commit fb0df97e7d7c2c75bbdf7164c33b0796024ff6d3 + Author: Jonathan Wakely + Date: Thu Nov 17 08:44:05 2022 +0000 + + [atomics] Replace integral and floating-point placeholders (#5939) + + Fixes NB GB 129 (C++23 CD). + + commit 0bb57d5ebffa7170fbc80724f55a6ac2a82f2e83 + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Fri Nov 25 14:56:24 2022 +0800 + + [format.arg] Add std:: for forward + + commit c88fb46327d87d78d571b7e1076e1916eaf7e310 + Author: Dawn Perchik + Date: Tue Nov 15 07:46:41 2022 -0800 + + [expr.unary.op] Say "the ~ operator" consistently, remove "unary" + + We are currently using the term "unary complement operator" to refer + to the "~" operator without ever giving it that name. This change + removes the use of that undefined term. + + commit bef02b89464fe6f4be3926d62defc92986ae4532 + Author: Thomas Köppe + Date: Tue Nov 22 16:28:42 2022 +0000 + + [expr.unary.op] Notes naming unary ops as {ones',two's} complement + + The terms "one's complement" and "two's complement" are well-known, + and it is useful to associate them with these operators. + + commit 020a312b2aa513a992e488d82db55fd0cd4fa025 + Author: Thomas Köppe + Date: Wed Nov 16 17:48:12 2022 +0000 + + [fs.rec.dir.itr.nonmembers] "for" is a keyword in "range-based for" + + commit cee095e75a97fb88a7053e360b3bc06d36a6b687 + Author: Alisdair Meredith + Date: Fri Dec 16 06:51:26 2022 +0700 + + [depr.conversions.string] remove redundent respecification (#6004) + + There are several typedef names defined precisely in the deprecated code conversion + facets classes that are redundantly respecified in text. Nowhere else in the library + does this; any specified typedef names are _see below_ definitions, not repeats of + the class definition. Needless redundancy is always a risk of divergence, however + small, so remove the respecification in text form. + + commit 1bb52db31be002f04ea5977f9900ba4174c7155e + Author: Anoop Rana <93918384+ranaanoop@users.noreply.github.com> + Date: Fri Dec 16 05:23:57 2022 +0530 + + [concepts.object] Change "built-in" to "fundamental" types (#6012) + + commit ce1cc3b011099b6228b18dad937911c6ea67d309 + Author: Johel Ernesto Guerrero Peña + Date: Sun Dec 11 17:03:41 2022 -0400 + + [expr.const] Remove redundant "ill-formed" in "error" comment + + commit 5d43f0137776fa112d0ffd6ba0e34df34a4cb820 + Author: Jonathan Wakely + Date: Tue Dec 13 12:52:00 2022 +0000 + + [time.zone.leap.members] update note about leap seconds + + commit fd20d4ea9f3ea8653b17169aad61eec843b71718 + Author: Jonathan Wakely + Date: Wed Nov 23 14:45:43 2022 +0000 + + [time.zone.zonedtime.overview] Rename parameters to match later definitions + + commit 137728f0830824c6058648a846376eec80e5cab3 + Author: Michael Florian Hava + Date: Fri Dec 16 02:10:55 2022 +0100 + + [coro.generator.promise] Fix template parameters (#6009) + + Some of the template parameters of `yield_value` were inconsistent, + and the synopsis contained an outright typo. This change uses `R2` + consistently since the parameter is a reference. + + commit 5d6099c3df78922ee5b5f1d1c42a5c762d246df0 + Author: Thomas Köppe + Date: Thu Dec 15 23:31:26 2022 +0000 + + [formatter.requirements] Remove one level of list nesting + + commit 9e41a1c27de2f676badacbe0c1aac783063b7cd6 + Author: Thomas Köppe + Date: Wed Nov 16 19:43:58 2022 +0000 + + [time.clock.req] Make list item end with comma, not full stop. + + Also reformat the itemization source to be more edit-friendly. + + commit 5ef31f3fc1531d9e6e923cb57bf6e5ecec59ed4e + Author: languagelawyer + Date: Thu Jun 25 10:54:17 2020 +0300 + + [expr.unary.op] Fix usage of "result" + + commit 8c60752c7eb28e1ff1cc9e088d7836957356f559 + Author: Jonathan Wakely + Date: Tue Apr 26 10:18:11 2022 +0100 + + [optional.ctor], [expected.object.ctor] Add converts-from-any-cvref + + commit 405b46f50ce6c7458e94db7b4528fc267e2b67c3 + Author: Hewill Kang <67143766+hewillk@users.noreply.github.com> + Date: Sat Dec 17 00:14:51 2022 +0800 + + [mdspan.mdspan.overview] Add default template arguments for mdspan (#6018) + + We usually restate the default template arguments in the class synopsis, + so that the information is in one place and one does not need to also refer + to the header synopsis. + + commit ae88bb581d32f1939987c0a834fe3f6011a9d003 + Author: frederick-vs-ja + Date: Fri Dec 16 21:25:31 2022 +0800 + + [range.repeat] Change `W`/`WArgs` to `T`/`TArgs` + + commit 0a1f1e147c75ce9220de3488103ca880b6b8e49f + Author: Thomas Köppe + Date: Fri Dec 16 17:19:08 2022 +0000 + + [concept.copyconstructible] Avoid "possibly \tcode{const}" + + A small rewrite avoids the phrase "possibly \tcode{const}", + which we would like to remove entirely in favour of just + "possibly const". + + commit f058decdf9c7dea0461f723df72f5093f5e92b11 + Author: Thomas Köppe + Date: Fri Dec 16 17:31:47 2022 +0000 + + Replace "possibly \tcode{const}" with "possibly const" + + The "const" here is not syntax, but just normal text. + This is similar to "inline" and "public", which have + previously been cleaned up similarly. + + commit 9ac55553459e15c84db6d8072c93787d41ef7ccf + Author: Jens Maurer + Date: Fri Jun 4 00:29:30 2021 +0200 + + [lib] Drop 'inline' from 'inline constexpr' variable templates. + + Since CWG2387, constexpr variable templates have external linkage. diff --git a/papers/wd-index.md b/papers/wd-index.md index 5d6a4f75a1..abd18efdb3 100644 --- a/papers/wd-index.md +++ b/papers/wd-index.md @@ -41,4 +41,5 @@ * [N4892](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/n4892.pdf) 2021-06 C++ Working Draft * [N4901](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/n4901.pdf) 2021-10 C++ Working Draft * [N4910](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf) 2022-03 C++ Working Draft - * [N4910](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4917.pdf) 2022-07 C++ Working Draft + * [N4917](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4917.pdf) 2022-07 C++ Working Draft + * [N4928](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4928.pdf) 2022-11 C++ Working Draft diff --git a/source/config.tex b/source/config.tex index 358c759819..0f2a0d13ee 100644 --- a/source/config.tex +++ b/source/config.tex @@ -1,7 +1,7 @@ %!TEX root = std.tex %%-------------------------------------------------- %% Version numbers -\newcommand{\docno}{Dxxxx} +\newcommand{\docno}{N4928} \newcommand{\prevdocno}{N4917} \newcommand{\cppver}{202002L}

Thanks to all those who have submitted editorial +issues +and to those who have provided pull requests with fixes. +Thank you also to Dan Raviv and Robert Leahy for drafting motion applications, +and special thanks to Johel Ernesto Guerrero Peña for providing in-depth review +of many of the draft motion applications.