Skip to content

Commit 5b54814

Browse files
committed
[std] Fix multiply-defined term.* labels by creating unique index entries
1 parent c6beaf8 commit 5b54814

11 files changed

+29
-33
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$,
@@ -4768,7 +4770,7 @@
47684770
\defnadjx{signed integer}{types}{type}.
47694771
The range of representable values for a signed integer type is
47704772
$-2^{N-1}$ to $2^{N-1}-1$ (inclusive),
4771-
where \placeholder{N} is called the \defn{width} of the type.
4773+
where \placeholder{N} is called the \defnx{width}{width!of integer type} of the type.
47724774
\indextext{integral type!implementation-defined \tcode{sizeof}}%
47734775
\begin{note}
47744776
Plain \tcode{int}s are intended to have
@@ -5068,7 +5070,7 @@
50685070
on the access to these entities\iref{class.access};
50695071

50705072
\item
5071-
\defnx{unions}{\idxcode{union}}, which are classes capable of containing objects of
5073+
\emph{unions}, which are classes capable of containing objects of
50725074
different types at different times, \ref{class.union};
50735075

50745076
\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
@@ -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},
@@ -5935,7 +5934,7 @@
59355934

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

71517147
\begin{bnf}
@@ -7182,14 +7178,14 @@
71827178

71837179
\pnum
71847180
A constant-initialized potentially-constant variable $V$ is
7185-
\defn{usable in constant expressions} at a point $P$ if
7181+
\defnx{usable in constant expressions}{usable in constant expressions!variable} at a point $P$ if
71867182
$V$'s initializing declaration $D$ is reachable from $P$ and
71877183
\begin{itemize}
71887184
\item $V$ is constexpr,
71897185
\item $V$ is not initialized to a TU-local value, or
71907186
\item $P$ is in the same translation unit as $D$.
71917187
\end{itemize}
7192-
An object or reference is \defn{usable in constant expressions} if it is
7188+
An object or reference is \defnx{usable in constant expressions}{usable in constant expressions!object or reference} if it is
71937189
\begin{itemize}
71947190
\item a variable that is usable in constant expressions, or
71957191
\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

@@ -13202,10 +13202,10 @@
1320213202
\rSec4[fs.path.type.cvt]{Type and encoding conversions}
1320313203

1320413204
\pnum
13205-
The \defn{native encoding} of an ordinary character string is
13205+
The \defnx{native encoding}{native encoding!ordinary character string} of an ordinary character string is
1320613206
the operating system dependent current encoding
1320713207
for pathnames\iref{fs.class.path}.
13208-
The \defn{native encoding} for wide character strings is
13208+
The \defnx{native encoding}{native encoding!wide character string} for wide character strings is
1320913209
the implementation-defined execution
1321013210
wide-character set encoding\iref{character.seq}.
1321113211

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
@@ -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
@@ -23202,8 +23202,7 @@
2320223202
the field width is determined based on the content of the field.
2320323203

2320423204
\pnum
23205-
\indextext{string!width}%
23206-
The \defn{width} of a string is defined as
23205+
The \defnx{width}{string!width} of a string is defined as
2320723206
the estimated number of column positions appropriate
2320823207
for displaying it in a terminal.
2320923208
\begin{note}

0 commit comments

Comments
 (0)