Skip to content

Commit 74fd531

Browse files
committed
[std] Fix multiply-defined term.* labels by creating unique index entries
1 parent e3051c0 commit 74fd531

11 files changed

+29
-35
lines changed

source/basic.tex

+7-5
Original file line numberDiff line numberDiff line change
@@ -870,8 +870,9 @@
870870
\end{note}
871871

872872
\pnum
873+
\indexdefnadj{corresponding}{object parameter}%
873874
Two non-static member functions have
874-
\defnadjx{corresponding}{object parameters}{object parameter} if:
875+
\defnx{corresponding object parameters}{object parameter!corresponding!function} if:
875876
\begin{itemize}
876877
\item
877878
exactly one is an implicit object member function
@@ -882,8 +883,9 @@
882883
\item
883884
their object parameters have the same type.
884885
\end{itemize}
886+
\indexdefnadj{corresponding}{object parameter}%
885887
Two non-static member function templates have
886-
\defnadjx{corresponding}{object parameters}{object parameter} if:
888+
\defnx{corresponding object parameters}{object parameter!corresponding!function template} if:
887889
\begin{itemize}
888890
\item
889891
exactly one is an implicit object member function
@@ -2818,7 +2820,7 @@
28182820
\indextext{linkage|)}
28192821

28202822
\pnum
2821-
A declaration $D$ \defnx{names}{name} an entity $E$ if
2823+
A declaration $D$ \defnx{names}{name (verb)} an entity $E$ if
28222824
\begin{itemize}
28232825
\item
28242826
$D$ contains a \grammarterm{lambda-expression} whose closure type is $E$,
@@ -4771,7 +4773,7 @@
47714773
\defnadjx{signed integer}{types}{type}.
47724774
The range of representable values for a signed integer type is
47734775
$-2^{N-1}$ to $2^{N-1}-1$ (inclusive),
4774-
where \placeholder{N} is called the \defn{width} of the type.
4776+
where \placeholder{N} is called the \defnx{width}{width!of integer type} of the type.
47754777
\indextext{integral type!implementation-defined \tcode{sizeof}}%
47764778
\begin{note}
47774779
Plain \tcode{int}s are intended to have
@@ -5071,7 +5073,7 @@
50715073
on the access to these entities\iref{class.access};
50725074

50735075
\item
5074-
\defnx{unions}{\idxcode{union}}, which are classes capable of containing objects of
5076+
\emph{unions}, which are classes capable of containing objects of
50755077
different types at different times, \ref{class.union};
50765078

50775079
\item

source/classes.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -2819,7 +2819,7 @@
28192819
the bit-field semantic property is not part of the type of the class member.
28202820
The \grammarterm{constant-expression} shall be an integral constant expression
28212821
with a value greater than or equal to zero and
2822-
is called the \defn{width} of the bit-field.
2822+
is called the \defnx{width}{width!of bit-field} of the bit-field.
28232823
If the width of a bit-field is larger than
28242824
the width of the bit-field's type
28252825
(or, in case of an enumeration type, of its underlying type),

source/declarations.tex

-1
Original file line numberDiff line numberDiff line change
@@ -3174,7 +3174,6 @@
31743174

31753175
\pnum
31763176
\indextext{declaration!array}%
3177-
\label{term.array.type}%
31783177
A type of the form ``array of \tcode{N} \tcode{U}'' or
31793178
``array of unknown bound of \tcode{U}'' is an \defn{array type}.
31803179
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\iref{expr.prim.req,
432431
expr.typeid,
@@ -5936,7 +5935,7 @@
59365935

59375936
\pnum
59385937
Abbreviating \grammarterm{pm-expression}\tcode{.*}\grammarterm{cast-expression} as \tcode{E1.*E2}, \tcode{E1}
5939-
is called the \defn{object expression}.
5938+
is called the \defnx{object expression}{object expression!pointer-to-member operator}.
59405939
If the dynamic type of \tcode{E1} does not
59415940
contain the member to which
59425941
\tcode{E2} refers, the behavior is undefined.
@@ -7141,12 +7140,9 @@
71417140
semantics depending on whether or not an expression satisfies these requirements.
71427141
Expressions that satisfy these requirements,
71437142
assuming that copy elision\iref{class.copy.elision} is not performed,
7144-
are called
7145-
\indexdefn{expression!constant}%
7146-
\defnx{constant expressions}{constant expression}.
7143+
are called constant expressions.
71477144
\begin{note}
7148-
Constant expressions can be evaluated
7149-
during translation.
7145+
Constant expressions can be evaluated during translation.
71507146
\end{note}
71517147

71527148
\begin{bnf}
@@ -7183,14 +7179,14 @@
71837179

71847180
\pnum
71857181
A constant-initialized potentially-constant variable $V$ is
7186-
\defn{usable in constant expressions} at a point $P$ if
7182+
\defnx{usable in constant expressions}{usable in constant expressions!variable} at a point $P$ if
71877183
$V$'s initializing declaration $D$ is reachable from $P$ and
71887184
\begin{itemize}
71897185
\item $V$ is constexpr,
71907186
\item $V$ is not initialized to a TU-local value, or
71917187
\item $P$ is in the same translation unit as $D$.
71927188
\end{itemize}
7193-
An object or reference is \defn{usable in constant expressions} if it is
7189+
An object or reference is \defnx{usable in constant expressions}{usable in constant expressions!object or reference} if it is
71947190
\begin{itemize}
71957191
\item a variable that is usable in constant expressions, or
71967192
\item a template parameter object\iref{temp.param}, or

source/iostreams.tex

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

@@ -13198,10 +13198,10 @@
1319813198
\rSec4[fs.path.type.cvt]{Type and encoding conversions}
1319913199

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

source/iterators.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -1766,7 +1766,7 @@
17661766

17671767
\pnum
17681768
Two dereferenceable iterators \tcode{a} and \tcode{b} of type \tcode{X}
1769-
offer the \defn{multi-pass guarantee} if:
1769+
offer the \defnx{multi-pass guarantee}{multi-pass guarantee!\detokenize{forward_iterator}} if:
17701770
\begin{itemize}
17711771
\item \tcode{a == b} implies \tcode{++a == ++b} and
17721772
\item the expression
@@ -2184,7 +2184,7 @@
21842184

21852185
\pnum
21862186
Two dereferenceable iterators \tcode{a} and \tcode{b} of type \tcode{X} offer the
2187-
\defn{multi-pass guarantee} if:
2187+
\defnx{multi-pass guarantee}{multi-pass guarantee!\oldconcept{ForwardIterator}} if:
21882188
\begin{itemize}
21892189
\item \tcode{a == b} implies \tcode{++a == ++b} and
21902190
\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
@@ -2116,7 +2116,7 @@
21162116

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

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}:
@@ -7897,9 +7896,8 @@
78977896
\end{itemize}
78987897

78997898
\pnum
7900-
\indextext{at least as specialized as|see{more specialized}}%
79017899
Function template \tcode{F}
7902-
is \defnx{at least as specialized as}{more specialized}
7900+
is \defnx{at least as specialized as}{at least as specialized as|see{more specialized}}
79037901
function template \tcode{G} if,
79047902
for each pair of types used to determine the ordering,
79057903
the type from \tcode{F}

source/threads.tex

+3-2
Original file line numberDiff line numberDiff line change
@@ -6456,7 +6456,8 @@
64566456
\indextext{block (execution)}%
64576457
In addition to the exclusive lock ownership mode specified
64586458
in~\ref{thread.mutex.requirements.mutex}, shared mutex types provide a
6459-
\defn{shared lock} ownership mode. Multiple execution agents can
6459+
\defnx{shared lock}{shared lock!ownership mode} ownership mode.
6460+
Multiple execution agents can
64606461
simultaneously hold a shared lock ownership of a shared mutex type. But no
64616462
execution agent holds a shared lock while another execution agent holds an
64626463
exclusive lock on the same shared mutex type, and vice-versa. The maximum
@@ -10042,7 +10043,7 @@
1004210043
\end{itemize}
1004310044

1004410045
\pnum
10045-
A shared state is \defn{ready} only if it holds a value or an exception ready for
10046+
A shared state is \defnx{ready}{ready!shared state} only if it holds a value or an exception ready for
1004610047
retrieval.
1004710048
Waiting for a shared state to become ready may invoke code to compute the result on
1004810049
the waiting thread if so specified in the description of the class or function that creates

source/utilities.tex

+1-4
Original file line numberDiff line numberDiff line change
@@ -9668,7 +9668,6 @@
96689668
\end{note}
96699669

96709670
\pnum
9671-
\label{term.perfect.forwarding.call.wrapper}%
96729671
A \defnadj{perfect forwarding}{call wrapper} is
96739672
an argument forwarding call wrapper
96749673
that forwards its state entities to the underlying call expression.
@@ -9690,7 +9689,6 @@
96909689
with references as described in the corresponding forwarding steps.
96919690

96929691
\pnum
9693-
\label{term.simple.call.wrapper}%
96949692
A \defn{simple call wrapper} is a perfect forwarding call wrapper that meets
96959693
the \oldconcept{CopyConstructible} and \oldconcept{CopyAssignable} requirements
96969694
and whose copy constructor, move constructor, and assignment operators
@@ -13858,8 +13856,7 @@
1385813856
the field width is determined based on the content of the field.
1385913857

1386013858
\pnum
13861-
\indextext{string!width}%
13862-
The \defn{width} of a string is defined as
13859+
The \defnx{width}{string!width} of a string is defined as
1386313860
the estimated number of column positions appropriate
1386413861
for displaying it in a terminal.
1386513862
\begin{note}

0 commit comments

Comments
 (0)