Skip to content

Commit 3ba0a4a

Browse files
committed
[std] Fix multiply-defined term.* labels by creating unique index entries
1 parent c2c9729 commit 3ba0a4a

11 files changed

+29
-33
lines changed

source/basic.tex

+7-5
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,9 @@
867867
\end{note}
868868

869869
\pnum
870+
\indexdefnadj{corresponding}{object parameter}%
870871
Two non-static member functions have
871-
\defnadjx{corresponding}{object parameters}{object parameter} if:
872+
\defnx{corresponding object parameters}{object parameter!corresponding!function} if:
872873
\begin{itemize}
873874
\item
874875
exactly one is an implicit object member function
@@ -879,8 +880,9 @@
879880
\item
880881
their object parameters have the same type.
881882
\end{itemize}
883+
\indexdefnadj{corresponding}{object parameter}%
882884
Two non-static member function templates have
883-
\defnadjx{corresponding}{object parameters}{object parameter} if:
885+
\defnx{corresponding object parameters}{object parameter!corresponding!function template} if:
884886
\begin{itemize}
885887
\item
886888
exactly one is an implicit object member function
@@ -2814,7 +2816,7 @@
28142816
\indextext{linkage|)}
28152817

28162818
\pnum
2817-
A declaration $D$ \defnx{names}{name} an entity $E$ if
2819+
A declaration $D$ \defnx{names}{name (verb)} an entity $E$ if
28182820
\begin{itemize}
28192821
\item
28202822
$D$ contains a \grammarterm{lambda-expression} whose closure type is $E$,
@@ -4761,7 +4763,7 @@
47614763
\defnadjx{signed integer}{types}{type}.
47624764
The range of representable values for a signed integer type is
47634765
$-2^{N-1}$ to $2^{N-1}-1$ (inclusive),
4764-
where \placeholder{N} is called the \defn{width} of the type.
4766+
where \placeholder{N} is called the \defnx{width}{width!of integer type} of the type.
47654767
\indextext{integral type!implementation-defined \tcode{sizeof}}%
47664768
\begin{note}
47674769
Plain \tcode{int}s are intended to have
@@ -5061,7 +5063,7 @@
50615063
on the access to these entities\iref{class.access};
50625064

50635065
\item
5064-
\defnx{unions}{\idxcode{union}}, which are classes capable of containing objects of
5066+
\emph{unions}, which are classes capable of containing objects of
50655067
different types at different times, \ref{class.union};
50665068

50675069
\item

source/classes.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -2787,7 +2787,7 @@
27872787
the bit-field semantic property is not part of the type of the class member.
27882788
The \grammarterm{constant-expression} shall be an integral constant expression
27892789
with a value greater than or equal to zero and
2790-
is called the \defn{width} of the bit-field.
2790+
is called the \defnx{width}{width!of bit-field} of the bit-field.
27912791
If the width of a bit-field is larger than
27922792
the width of the bit-field's type
27932793
(or, in case of an enumeration type, of its underlying type),

source/declarations.tex

-1
Original file line numberDiff line numberDiff line change
@@ -3175,7 +3175,6 @@
31753175

31763176
\pnum
31773177
\indextext{declaration!array}%
3178-
\label{term.array.type}%
31793178
A type of the form ``array of \tcode{N} \tcode{U}'' or
31803179
``array of unknown bound of \tcode{U}'' is an \defn{array type}.
31813180
The optional \grammarterm{attribute-specifier-seq}

source/expressions.tex

+5-9
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@
426426
\rSec2[expr.context]{Context dependence}
427427

428428
\pnum
429-
\label{term.unevaluated.operand}%
430429
In some contexts, \defnx{unevaluated operands}{unevaluated operand}
431430
appear~(\ref{expr.prim.req},
432431
\ref{expr.typeid},
@@ -5904,7 +5903,7 @@
59045903

59055904
\pnum
59065905
Abbreviating \grammarterm{pm-expression}\tcode{.*}\grammarterm{cast-expression} as \tcode{E1.*E2}, \tcode{E1}
5907-
is called the \defn{object expression}.
5906+
is called the \defnx{object expression}{object expression!pointer-to-member operator}.
59085907
If the dynamic type of \tcode{E1} does not
59095908
contain the member to which
59105909
\tcode{E2} refers, the behavior is undefined.
@@ -7109,12 +7108,9 @@
71097108
semantics depending on whether or not an expression satisfies these requirements.
71107109
Expressions that satisfy these requirements,
71117110
assuming that copy elision\iref{class.copy.elision} is not performed,
7112-
are called
7113-
\indexdefn{expression!constant}%
7114-
\defnx{constant expressions}{constant expression}.
7111+
are called constant expressions.
71157112
\begin{note}
7116-
Constant expressions can be evaluated
7117-
during translation.
7113+
Constant expressions can be evaluated during translation.
71187114
\end{note}
71197115

71207116
\begin{bnf}
@@ -7151,14 +7147,14 @@
71517147

71527148
\pnum
71537149
A constant-initialized potentially-constant variable $V$ is
7154-
\defn{usable in constant expressions} at a point $P$ if
7150+
\defnx{usable in constant expressions}{usable in constant expressions!variable} at a point $P$ if
71557151
$V$'s initializing declaration $D$ is reachable from $P$ and
71567152
\begin{itemize}
71577153
\item $V$ is constexpr,
71587154
\item $V$ is not initialized to a TU-local value, or
71597155
\item $P$ is in the same translation unit as $D$.
71607156
\end{itemize}
7161-
An object or reference is \defn{usable in constant expressions} if it is
7157+
An object or reference is \defnx{usable in constant expressions}{usable in constant expressions!object or reference} if it is
71627158
\begin{itemize}
71637159
\item a variable that is usable in constant expressions, or
71647160
\item a template parameter object\iref{temp.param}, or

source/iostreams.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -12331,11 +12331,11 @@
1233112331
a file within a file system that acts as a container of directory entries
1233212332
that contain information about
1233312333
other files, possibly including other directory files.
12334-
The \defn{parent directory} of a directory is
12334+
The \defnx{parent directory}{parent directory!directory} of a directory is
1233512335
the directory that both contains a
1233612336
directory entry for the given directory and is represented by the dot-dot
1233712337
filename\iref{fs.path.generic} in the given directory.
12338-
The \defn{parent directory}
12338+
The \defnx{parent directory}{parent directory!file}
1233912339
of other types of files is a directory containing a directory
1234012340
entry for the file under discussion.
1234112341

@@ -13196,10 +13196,10 @@
1319613196
\rSec4[fs.path.type.cvt]{Type and encoding conversions}
1319713197

1319813198
\pnum
13199-
The \defn{native encoding} of an ordinary character string is
13199+
The \defnx{native encoding}{native encoding!ordinary character string} of an ordinary character string is
1320013200
the operating system dependent current encoding
1320113201
for pathnames\iref{fs.class.path}.
13202-
The \defn{native encoding} for wide character strings is
13202+
The \defnx{native encoding}{native encoding!wide character string} for wide character strings is
1320313203
the implementation-defined execution
1320413204
wide-character set encoding\iref{character.seq}.
1320513205

source/iterators.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,7 @@
17741774

17751775
\pnum
17761776
Two dereferenceable iterators \tcode{a} and \tcode{b} of type \tcode{X}
1777-
offer the \defn{multi-pass guarantee} if:
1777+
offer the \defnx{multi-pass guarantee}{multi-pass guarantee!\detokenize{forward_iterator}} if:
17781778
\begin{itemize}
17791779
\item \tcode{a == b} implies \tcode{++a == ++b} and
17801780
\item the expression
@@ -2187,7 +2187,7 @@
21872187

21882188
\pnum
21892189
Two dereferenceable iterators \tcode{a} and \tcode{b} of type \tcode{X} offer the
2190-
\defn{multi-pass guarantee} if:
2190+
\defnx{multi-pass guarantee}{multi-pass guarantee!\oldconcept{ForwardIterator}} if:
21912191
\begin{itemize}
21922192
\item \tcode{a == b} implies \tcode{++a == ++b} and
21932193
\item \tcode{X} is a pointer type or the expression

source/macros.tex

+3-2
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@
167167
}
168168

169169
\newcommand{\indexdefn}[1]{\indextext{#1}}
170+
\newcommand{\indexdefnadj}[2]{\indextext{#1 #2|see{#2, #1}}\indexdefn{#2!#1}}
170171
\newcommand{\idxbfpage}[1]{\textbf{\hyperpage{#1}}}
171172
\newcommand{\indexgrammar}[1]{\indextext{#1}\indexgram{#1|idxbfpage}}
172173
% This command uses the "cooked" \indeximpldef command to emit index
@@ -238,7 +239,7 @@
238239
\newcommand{\defnlibxname}[1]{\indexlibrary{\idxxname{#1}}\xname{#1}}
239240

240241
% term.* labels
241-
\newcommand{\termlabel}[1]{\label{term.\temp}}
242+
\newcommand{\termlabel}[1]{\label{term.#1}}
242243
% convert space-separated phrase to dot-separated label name
243244
\newcommand{\newtermlabelx}[1]{%
244245
{% remove all formatting instructions
@@ -263,7 +264,7 @@
263264
\newcommand{\defnadj}[2]{\defnadjx{#1}{#2}{#2}}
264265
% Compound defined term with a different form for the primary noun.
265266
% Usage: \defnadjx{scalar}{types}{type}
266-
\newcommand{\defnadjx}[3]{\indextext{#1 #3|see{#3, #1}}\indexdefn{#3!#1}\newtermlabelx{#1 #3}\textit{#1 #2}}
267+
\newcommand{\defnadjx}[3]{\indexdefnadj{#1}{#3}\newtermlabelx{#1 #3}\textit{#1 #2}}
267268

268269
%%--------------------------------------------------
269270
%% allow line break if needed for justification

source/regex.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1963,7 +1963,7 @@
19631963

19641964
\pnum
19651965
A default-constructed \tcode{match_results} object has no fully established result state. A
1966-
match result is \defn{ready} when, as a consequence of a completed regular expression match
1966+
match result is \defnx{ready}{ready!match result} when, as a consequence of a completed regular expression match
19671967
modifying such an object, its result state becomes fully established. The effects of calling
19681968
most member functions from a \tcode{match_results} object that is not ready are undefined.
19691969

source/templates.tex

+2-4
Original file line numberDiff line numberDiff line change
@@ -3367,9 +3367,8 @@
33673367
\rSec3[temp.spec.partial.order]{Partial ordering of partial specializations}
33683368

33693369
\pnum
3370-
\indextext{more specialized!class template}%
33713370
For two partial specializations,
3372-
the first is \defn{more specialized} than the second if, given the following
3371+
the first is \defnx{more specialized}{more specialized!class template} than the second if, given the following
33733372
rewrite to two function templates, the first function template is more
33743373
specialized than the second according to the ordering rules for function
33753374
templates\iref{temp.func.order}:
@@ -7896,9 +7895,8 @@
78967895
\end{itemize}
78977896

78987897
\pnum
7899-
\indextext{at least as specialized as|see{more specialized}}%
79007898
Function template \tcode{F}
7901-
is \defnx{at least as specialized as}{more specialized}
7899+
is \defnx{at least as specialized as}{at least as specialized as|see{more specialized}}
79027900
function template \tcode{G} if,
79037901
for each pair of types used to determine the ordering,
79047902
the type from \tcode{F}

source/threads.tex

+3-2
Original file line numberDiff line numberDiff line change
@@ -2619,7 +2619,8 @@
26192619
\indextext{block (execution)}%
26202620
In addition to the exclusive lock ownership mode specified
26212621
in~\ref{thread.mutex.requirements.mutex}, shared mutex types provide a
2622-
\defn{shared lock} ownership mode. Multiple execution agents can
2622+
\defnx{shared lock}{shared lock!ownership mode} ownership mode.
2623+
Multiple execution agents can
26232624
simultaneously hold a shared lock ownership of a shared mutex type. But no
26242625
execution agent holds a shared lock while another execution agent holds an
26252626
exclusive lock on the same shared mutex type, and vice-versa. The maximum
@@ -6205,7 +6206,7 @@
62056206
\end{itemize}
62066207

62076208
\pnum
6208-
A shared state is \defn{ready} only if it holds a value or an exception ready for
6209+
A shared state is \defnx{ready}{ready!shared state} only if it holds a value or an exception ready for
62096210
retrieval.
62106211
Waiting for a shared state to become ready may invoke code to compute the result on
62116212
the waiting thread if so specified in the description of the class or function that creates

source/utilities.tex

+1-2
Original file line numberDiff line numberDiff line change
@@ -21021,8 +21021,7 @@
2102121021
the field width is determined based on the content of the field.
2102221022

2102321023
\pnum
21024-
\indextext{string!width}%
21025-
The \defn{width} of a string is defined as
21024+
The \defnx{width}{string!width} of a string is defined as
2102621025
the estimated number of column positions appropriate
2102721026
for displaying it in a terminal.
2102821027
\begin{note}

0 commit comments

Comments
 (0)