From 049ba5beec8a2762e323fa40a6f4c2bfa77d58d2 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Mon, 13 May 2024 19:30:38 +0200 Subject: [PATCH 1/2] [std] Remove mid-sentence 'subclause' introducer Fixes ISO/CS comment (C++23 proof) --- source/concepts.tex | 2 +- source/containers.tex | 12 ++++++------ source/expressions.tex | 2 +- source/iostreams.tex | 2 +- source/lib-intro.tex | 2 +- source/locales.tex | 2 +- source/memory.tex | 2 +- source/preface.tex | 2 +- source/ranges.tex | 4 ++-- source/support.tex | 2 +- source/utilities.tex | 6 +++--- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/source/concepts.tex b/source/concepts.tex index fe54447105..4d848e8fd6 100644 --- a/source/concepts.tex +++ b/source/concepts.tex @@ -1222,7 +1222,7 @@ \rSec2[concepts.callable.general]{General} \pnum -The concepts in subclause \ref{concepts.callable} describe the requirements on function +The concepts in \ref{concepts.callable} describe the requirements on function objects\iref{function.objects} and their arguments. \rSec2[concept.invocable]{Concept \cname{invocable}} diff --git a/source/containers.tex b/source/containers.tex index 946caa38f2..76f5cea891 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -74,7 +74,7 @@ \rSec3[container.intro.reqmts]{Introduction} \pnum -In subclause \ref{container.requirements.general}, +In \ref{container.requirements.general}, \begin{itemize} \item \tcode{X} denotes a container class containing objects of type \tcode{T}, @@ -19108,7 +19108,7 @@ The class template \tcode{extents} represents a multidimensional index space of rank equal to \tcode{sizeof...(Extents)}. -In subclause \iref{views}, +In \iref{views}, \tcode{extents} is used synonymously with multidimensional index space. \begin{codeblock} @@ -19519,7 +19519,7 @@ \rSec4[mdspan.layout.general]{General} \pnum -In subclauses \ref{mdspan.layout.reqmts} and \ref{mdspan.layout.policy.reqmts}: +In \ref{mdspan.layout.reqmts} and \ref{mdspan.layout.policy.reqmts}: \begin{itemize} \item @@ -19546,7 +19546,7 @@ \end{itemize} \pnum -In subclauses \ref{mdspan.layout.reqmts} through \ref{mdspan.layout.stride}: +In \ref{mdspan.layout.reqmts} through \ref{mdspan.layout.stride}: \begin{itemize} \item Let \exposid{is-mapping-of} be the exposition-only variable template defined as follows: @@ -22205,7 +22205,7 @@ the accessor policy's \tcode{access} function produces a valid reference to an object. \pnum -In subclause \ref{mdspan.accessor.reqmts}, +In \ref{mdspan.accessor.reqmts}, \begin{itemize} \item @@ -22996,7 +22996,7 @@ the \tcode{SliceSpecifier} arguments. \pnum -For each function defined in subclause \ref{mdspan.sub} that +For each function defined in \ref{mdspan.sub} that takes a parameter pack named \tcode{slices} as an argument: \begin{itemize} diff --git a/source/expressions.tex b/source/expressions.tex index 12f2226fc0..38a715e0d7 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -53,7 +53,7 @@ considered where necessary to convert the operands to types appropriate for the built-in operator. If a built-in operator is selected, such conversions will be applied to the operands before the operation is -considered further according to the rules in subclause \ref{expr.compound}; +considered further according to the rules in \ref{expr.compound}; see~\ref{over.match.oper}, \ref{over.built}. \pnum diff --git a/source/iostreams.tex b/source/iostreams.tex index a439db5e0f..db5609b2f4 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -10024,7 +10024,7 @@ \begin{note} A user of these classes is responsible for ensuring that the character sequence represented by the given \tcode{span} -outlives the use of the sequence by objects of the classes in subclause \ref{span.streams}. +outlives the use of the sequence by objects of the classes in \ref{span.streams}. Using multiple \tcode{basic_spanbuf} objects referring to overlapping underlying sequences from different threads, where at least one \tcode{basic_spanbuf} object is used diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 25b12168f5..fb0a13a5df 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -2054,7 +2054,7 @@ allocators. \pnum -In subclause \ref{allocator.requirements}, +In \ref{allocator.requirements}, \begin{itemize} \item \tcode{T}, \tcode{U}, \tcode{C} denote diff --git a/source/locales.tex b/source/locales.tex index 1d8ccc6b84..eda8bc1043 100644 --- a/source/locales.tex +++ b/source/locales.tex @@ -959,7 +959,7 @@ but set to \tcode{ios_base::failbit} in case of a parse error. \pnum -Within subclause \ref{locale.categories} it is unspecified whether +Within \ref{locale.categories} it is unspecified whether one virtual function calls another virtual function. \rSec2[category.ctype]{The \tcode{ctype} category} diff --git a/source/memory.tex b/source/memory.tex index 4958d644ef..1408fecd5b 100644 --- a/source/memory.tex +++ b/source/memory.tex @@ -3275,7 +3275,7 @@ reflect modifications that can introduce data races. \pnum -For the purposes of subclause \ref{smartptr}, +For the purposes of \ref{smartptr}, a pointer type \tcode{Y*} is said to be \defnx{compatible with}{compatible with!\idxcode{shared_ptr}} a pointer type \tcode{T*} when either diff --git a/source/preface.tex b/source/preface.tex index b77caca873..6e0b3fa036 100644 --- a/source/preface.tex +++ b/source/preface.tex @@ -9,7 +9,7 @@ \chapter{Introduction} Clauses and subclauses in this document are annotated with a so-called stable name, presented in square brackets next to the (sub)clause heading -(such as ``[lex.token]'' for subclause \ref{lex.token}, ``Tokens''). +(such as ``[lex.token]'' for \ref{lex.token}, ``Tokens''). Stable names aid in the discussion and evolution of this document by serving as stable references to subclauses across editions that are unaffected by changes of subclause numbering. diff --git a/source/ranges.tex b/source/ranges.tex index 9f0f281290..928d3aa180 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -1627,7 +1627,7 @@ \rSec2[range.utility.helpers]{Helper concepts} \pnum -Many of the types in subclause~\ref{range.utility} are specified in terms of +Many of the types in \ref{range.utility} are specified in terms of the following exposition-only concepts: \begin{codeblock} @@ -4233,7 +4233,7 @@ \rSec2[range.nonprop.cache]{Non-propagating cache} \pnum -Some types in subclause \ref{range.adaptors} are specified in terms of +Some types in \ref{range.adaptors} are specified in terms of an exposition-only class template \exposid{non-propagating-\brk{}cache}. \tcode{\exposid{non-propagating-cache}} behaves exactly like \tcode{optional} with the following differences: diff --git a/source/support.tex b/source/support.tex index 4716407e88..bb6969020e 100644 --- a/source/support.tex +++ b/source/support.tex @@ -4335,7 +4335,7 @@ an argument other than a literal \tcode{0} is undefined. \pnum -For the purposes of subclause \ref{cmp.categories}, +For the purposes of \ref{cmp.categories}, \defn{substitutability} is the property that \tcode{f(a) == f(b)} is \tcode{true} whenever \tcode{a == b} is \tcode{true}, where \tcode{f} denotes a function that reads only comparison-salient state diff --git a/source/utilities.tex b/source/utilities.tex index bf4f91d468..6cf616bfab 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -4873,7 +4873,7 @@ These template arguments are called alternatives. \pnum -In subclause \ref{variant}, +In \ref{variant}, \exposid{GET} denotes a set of exposition-only function templates\iref{variant.get}. @@ -11026,7 +11026,7 @@ The template parameter \tcode{T} of \tcode{reference_wrapper} may be an incomplete type. \begin{note} -Using the comparison operators described in subclause \ref{refwrap.comparisons} +Using the comparison operators described in \ref{refwrap.comparisons} with \tcode{T} being an incomplete type can lead to an ill-formed program with no diagnostic required\iref{temp.point,temp.constr.atomic}. @@ -14312,7 +14312,7 @@ that models \libconcept{copyable}. \pnum -Within subclause \ref{func.wrap.ref}, +Within \ref{func.wrap.ref}, \tcode{\placeholder{call-args}} is an argument pack with elements such that \tcode{decltype((\placeholder{call-args}\linebreak{}))...} denote \tcode{Args\&\&...} respectively. From 417caed0970e78d7d66813fd7f062be80e1c5dba Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Mon, 13 May 2024 19:44:40 +0200 Subject: [PATCH 2/2] [std] Remove incorrect or duplicative 'this subclause' introducers Fixes ISO/CS comment (C++23 proof) --- source/numerics.tex | 32 ++++++++++++++++---------------- source/strings.tex | 2 +- source/threads.tex | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/source/numerics.tex b/source/numerics.tex index 91907ac4bd..4d63e2199a 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -1556,7 +1556,7 @@ \rSec3[rand.req.genl]{General requirements}% \pnum -Throughout this subclause \ref{rand}, +Throughout \ref{rand}, the effect of instantiating a template: \begin{itemize} \item @@ -1616,7 +1616,7 @@ \end{itemize} \pnum -Throughout this subclause \ref{rand}, +Throughout \ref{rand}, phrases of the form ``\tcode{x} is an iterator of a specific kind'' shall be interpreted as equivalent to the more formal requirement that ``\tcode{x} is a value @@ -1624,7 +1624,7 @@ of the specified iterator type''. \pnum -Throughout this subclause \ref{rand}, +Throughout \ref{rand}, any constructor that can be called with a single argument and that meets a requirement specified in this subclause shall be declared \keyword{explicit}. @@ -1659,7 +1659,7 @@ in \tref{rand.req.seedseq} are valid and have the indicated semantics, and if \tcode{S} also meets all other requirements -of this subclause \ref{rand.req.seedseq}. +of \ref{rand.req.seedseq}. In \tref{rand.req.seedseq} and throughout this subclause: \begin{itemize} \item @@ -1875,7 +1875,7 @@ in \tref{rand.req.eng} are valid and have the indicated semantics, and if \tcode{E} also meets all other requirements -of this subclause \ref{rand.req.eng}. +of \ref{rand.req.eng}. In \tref{rand.req.eng} and throughout this subclause: \begin{itemize} \item @@ -2254,7 +2254,7 @@ are valid and have the indicated semantics, and if \tcode{D} and its associated types also meet all other requirements -of this subclause \ref{rand.req.dist}. +of \ref{rand.req.dist}. In \tref{rand.req.dist} and throughout this subclause, \begin{itemize} \item @@ -2465,7 +2465,7 @@ It is unspecified whether \tcode{D::param_type} is declared as a (nested) \keyword{class} or via a \keyword{typedef}. -In this subclause \ref{rand}, +In \ref{rand}, declarations of \tcode{D::param_type} are in the form of \keyword{typedef}s for convenience of exposition only. @@ -2650,7 +2650,7 @@ If the template parameter \tcode{m} is $0$, the modulus $m$ -used throughout this subclause~\ref{rand.eng.lcong} +used throughout \ref{rand.eng.lcong} is \tcode{numeric_limits::max()} plus $1$. \begin{note} $m$ need not be representable @@ -3077,30 +3077,30 @@ \pnum Each type instantiated -from a class template specified in this subclause~\ref{rand.adapt} +from a class template specified in \ref{rand.adapt} meets the requirements of a random number engine adaptor\iref{rand.req.adapt} type. \pnum Except where specified otherwise, the complexity of each function -specified in this subclause~\ref{rand.adapt} +specified in \ref{rand.adapt} is constant. \pnum Except where specified otherwise, -no function described in this subclause~\ref{rand.adapt} +no function described in \ref{rand.adapt} throws an exception. \pnum -Every function described in this subclause~\ref{rand.adapt} +Every function described in \ref{rand.adapt} that has a function parameter \tcode{q} of type \tcode{Sseq\&} for a template type parameter named \tcode{Sseq} that is different from type \tcode{seed_seq} throws what and when the invocation of \tcode{q.generate} throws. \pnum -Descriptions are provided in this subclause~\ref{rand.adapt} +Descriptions are provided in \ref{rand.adapt} only for adaptor operations that are not described in subclause~\ref{rand.req.adapt} or for operations where there is additional semantic information. @@ -3112,7 +3112,7 @@ are not shown in the synopses. \pnum -Each template specified in this subclause~\ref{rand.adapt} +Each template specified in \ref{rand.adapt} requires one or more relationships, involving the value(s) of its non-type template parameter(s), to hold. A program instantiating any of these templates @@ -4142,12 +4142,12 @@ \pnum Each type instantiated -from a class template specified in this subclause~\ref{rand.dist} +from a class template specified in \ref{rand.dist} meets the requirements of a random number distribution\iref{rand.req.dist} type. \pnum -Descriptions are provided in this subclause~\ref{rand.dist} +Descriptions are provided in \ref{rand.dist} only for distribution operations that are not described in \ref{rand.req.dist} or for operations where there is additional semantic information. diff --git a/source/strings.tex b/source/strings.tex index 4493b5d463..a3db2e8255 100644 --- a/source/strings.tex +++ b/source/strings.tex @@ -108,7 +108,7 @@ denotes an lvalue of type \tcode{C}. No expression which is part of the character traits requirements -specified in this subclause \ref{char.traits.require} +specified in \ref{char.traits.require} shall exit via an exception. \begin{libreqtab4d} diff --git a/source/threads.tex b/source/threads.tex index b5b4b54001..8fa6711bba 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -8919,7 +8919,7 @@ \rSec3[thread.condition.condvarany.general]{General} \pnum -In this subclause \ref{thread.condition.condvarany}, +In \ref{thread.condition.condvarany}, template arguments for template parameters named \tcode{Lock} shall meet the \oldconcept{Basic\-Lockable} requirements\iref{thread.req.lockable.basic}.