Skip to content

Commit 44480b0

Browse files
committed
Replace \indextext + \term pairs with \defnx (or \defn).
1 parent 73ec55d commit 44480b0

File tree

8 files changed

+49
-94
lines changed

8 files changed

+49
-94
lines changed

source/classes.tex

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,8 @@
144144
virtual functions or virtual base classes.\end{note}
145145

146146
\indextext{class!standard-layout}%
147-
\indextext{standard-layout~class}%
148147
\pnum
149-
A class \tcode{S} is a \grammarterm{standard-layout class} if it:
148+
A class \tcode{S} is a \defnx{standard-layout class}{standard-layout~class} if it:
150149
\begin{itemize}
151150
\item has no non-static data members of type non-standard-layout class
152151
(or array of such types) or reference,
@@ -211,14 +210,12 @@
211210
\end{example}
212211

213212
\indextext{struct!standard-layout}%
214-
\indextext{standard-layout~struct}%
215213
\indextext{union!standard-layout}%
216-
\indextext{standard-layout~union}%
217214
\pnum
218-
A \grammarterm{standard-layout struct} is a standard-layout class
215+
A \defnx{standard-layout struct}{standard-layout~struct} is a standard-layout class
219216
defined with the \grammarterm{class-key} \tcode{struct} or the
220217
\grammarterm{class-key} \tcode{class}.
221-
A \grammarterm{standard-layout union} is a standard-layout class
218+
A \defnx{standard-layout union}{standard-layout~union} is a standard-layout class
222219
defined with the
223220
\grammarterm{class-key} \tcode{union}.
224221

@@ -228,14 +225,13 @@
228225
in~\ref{class.mem}.\end{note}
229226

230227
\pnum
231-
\indextext{POD struct}\indextext{POD class}\indextext{POD union}%
232-
A \term{POD struct}\footnote{The acronym POD stands for ``plain old data''.}
228+
A \defn{POD struct}\footnote{The acronym POD stands for ``plain old data''.}
233229
is a non-union class that is both a trivial class and a
234230
standard-layout class, and has no non-static data members of type non-POD struct,
235231
non-POD union (or array of such types). Similarly, a
236-
\term{POD union} is a union that is both a trivial class and a standard-layout
232+
\defn{POD union} is a union that is both a trivial class and a standard-layout
237233
class, and has no non-static data members of type non-POD struct, non-POD
238-
union (or array of such types). A \term{POD class} is a
234+
union (or array of such types). A \defn{POD class} is a
239235
class that is either a POD struct or a POD union.
240236

241237
\begin{example}

source/declarations.tex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,14 +2013,12 @@
20132013
\pnum
20142014
\indextext{constant!enumeration}%
20152015
\indextext{enumeration}%
2016-
\indextext{enumeration!unscoped}%
2017-
\indextext{enumeration!scoped}%
20182016
The enumeration type declared with an \grammarterm{enum-key}
2019-
of only \tcode{enum} is an \term{}{unscoped enumeration},
2017+
of only \tcode{enum} is an \defnx{unscoped enumeration}{enumeration!unscoped},
20202018
and its \grammarterm{enumerator}{s} are \term{unscoped enumerators}.
20212019
The \grammarterm{enum-key}{s} \tcode{enum class} and
20222020
\tcode{enum struct} are semantically equivalent; an enumeration
2023-
type declared with one of these is a \term{scoped enumeration},
2021+
type declared with one of these is a \defnx{scoped enumeration}{enumeration!scoped},
20242022
and its \grammarterm{enumerator}{s} are \term{scoped enumerators}.
20252023
The optional \grammarterm{identifier} shall not be omitted in the declaration of a scoped enumeration.
20262024
The \grammarterm{type-specifier-seq} of an \grammarterm{enum-base}

source/expressions.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,10 @@
153153
applied to convert the expression to an xvalue.
154154

155155
\pnum
156-
\indextext{conversion!usual arithmetic}%
157156
Many binary operators that expect operands of arithmetic or enumeration
158157
type cause conversions and yield result types in a similar way. The
159158
purpose is to yield a common type, which is also the type of the result.
160-
This pattern is called the \term{usual arithmetic conversions},
159+
This pattern is called the \defnx{usual arithmetic conversions}{conversion!usual arithmetic},
161160
which are defined as follows:
162161

163162
\begin{itemize}

source/lex.tex

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -870,26 +870,21 @@
870870
\pnum
871871
\indextext{literal!\idxcode{unsigned}}%
872872
\indextext{literal!\idxcode{long}}%
873-
\indextext{literal!integer}%
874-
\indextext{literal!binary}%
875-
\indextext{literal!octal}%
876-
\indextext{literal!decimal}%
877-
\indextext{literal!hexadecimal}%
878873
\indextext{literal!base~of integer}%
879-
An \term{integer literal} is a sequence of digits that has no period
874+
An \defnx{integer literal}{literal!integer} is a sequence of digits that has no period
880875
or exponent part, with optional separating single quotes that are ignored
881876
when determining its value. An integer literal may have a prefix that specifies
882877
its base and a suffix that specifies its type. The lexically first digit
883878
of the sequence of digits is the most significant.
884-
A \term{binary} integer literal (base two) begins with
879+
A \defnx{binary}{literal!binary} integer literal (base two) begins with
885880
\tcode{0b} or \tcode{0B} and consists of a sequence of binary digits.
886-
An \term{octal} integer
881+
An \defnx{octal}{literal!octal} integer
887882
literal (base eight) begins with the digit \tcode{0} and consists of a
888883
sequence of octal digits.\footnote{The digits \tcode{8} and \tcode{9} are not octal digits. }
889-
A \term{decimal}
884+
A \defnx{decimal}{literal!decimal}
890885
integer literal (base ten) begins with a digit other than \tcode{0} and
891886
consists of a sequence of decimal digits.
892-
A \term{hexadecimal} integer literal (base sixteen) begins with
887+
A \defnx{hexadecimal}{literal!hexadecimal} integer literal (base sixteen) begins with
893888
\tcode{0x} or \tcode{0X} and consists of a sequence of hexadecimal
894889
digits, which include the decimal digits and the letters \tcode{a}
895890
through \tcode{f} and \tcode{A} through \tcode{F} with decimal values
@@ -1298,10 +1293,8 @@
12981293
The integer and fraction parts both consist of
12991294
a sequence of decimal (base ten) digits if there is no prefix, or
13001295
hexadecimal (base sixteen) digits if the prefix is \tcode{0x} or \tcode{0X}.
1301-
\indextext{literal!decimal floating}%
1302-
The literal is a \term{decimal floating literal} in the former case and
1303-
\indextext{literal!hexadecimal floating}%
1304-
a \term{hexadecimal floating literal} in the latter case.
1296+
The literal is a \defnx{decimal floating literal}{literal!decimal floating} in the former case and
1297+
a \defnx{hexadecimal floating literal}{literal!hexadecimal floating} in the latter case.
13051298
Optional separating single quotes in
13061299
a \grammarterm{digit-sequence} or \grammarterm{hexadecimal-digit-sequence}
13071300
are ignored when determining its value.

source/lib-intro.tex

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
\pnum
77
This Clause describes the contents of the
8-
\term{\Cpp standard library},
9-
\indextext{library!C++ standard}%
8+
\defnx{\Cpp standard library}{library!C++ standard},
109
how a well-formed \Cpp program makes use of the library, and
1110
how a conforming implementation may provide the entities in the library.
1211

@@ -597,8 +596,7 @@
597596

598597
\pnum
599598
Several types defined in Clause~\ref{input.output} are
600-
\term{enumerated types}.
601-
\indextext{type!enumerated}%
599+
\defnx{enumerated types}{type!enumerated}.
602600
Each enumerated type may be implemented as an enumeration or as a synonym for
603601
an enumeration.\footnote{Such as an integer type, with constant integer
604602
values~(\ref{basic.fundamental}).}
@@ -687,8 +685,7 @@
687685
All such elements have distinct, nonzero values such that, for any pair \placeholder{Ci}
688686
and \placeholder{Cj} where \placeholder{i} != \placeholder{j}, \placeholder{Ci} \& \placeholder{Ci} is nonzero and
689687
\placeholder{Ci} \& \placeholder{Cj} is zero.
690-
\indextext{bitmask!empty}%
691-
Additionally, the value 0 is used to represent an \term{empty bitmask}, in which no
688+
Additionally, the value 0 is used to represent an \defnx{empty bitmask}{bitmask!empty}, in which no
692689
bitmask elements are set.
693690

694691
\pnum
@@ -729,10 +726,7 @@
729726
\indextext{uppercase}%
730727
uppercase letters in the basic execution character set.
731728
\item
732-
The
733-
\term{decimal-point character}
734-
is the
735-
\indextext{character!decimal-point}%
729+
The \defnx{decimal-point character}{character!decimal-point} is the
736730
(single-byte) character used by functions that convert between a (single-byte)
737731
character sequence and a value of one of the floating-point types.
738732
It is used
@@ -780,9 +774,8 @@
780774

781775
\pnum
782776
A
783-
\indextext{string!null-terminated byte}%
784777
\indextext{NTBS}%
785-
\term{null-terminated byte string},
778+
\defnx{null-terminated byte string}{string!null-terminated byte},
786779
or \ntbs,
787780
is a character sequence whose highest-addressed element
788781
with defined content has the value zero
@@ -819,8 +812,7 @@
819812
\pnum
820813
A
821814
\indextext{NTBS}%
822-
\indextext{NTBS!static}%
823-
\term{static} \ntbs
815+
\defnx{static}{NTBS!static} \ntbs
824816
is an \ntbs with
825817
static storage duration.\footnote{A string literal, such as
826818
\tcode{"abc"},
@@ -832,9 +824,8 @@
832824
A
833825
\indextext{NTBS}%
834826
\indextext{NTMBS}%
835-
\term{null-terminated multibyte string,}
827+
\defnx{null-terminated multibyte string}{string!null-terminated multibyte},
836828
or \ntmbs,
837-
\indextext{string!null-terminated multibyte}%
838829
is an \ntbs that constitutes a
839830
sequence of valid multibyte characters, beginning and ending in the initial
840831
shift state.\footnote{An \ntbs that contains characters only from the
@@ -843,10 +834,8 @@
843834
consists of a single byte.}
844835

845836
\pnum
846-
A
847-
\term{static} \ntmbs
837+
A \defnx{static}{NTMBS!static} \ntmbs
848838
is an \ntmbs with static storage duration.
849-
\indextext{NTMBS!static}%
850839
\indextext{NTMBS}%
851840

852841
\rSec3[functions.within.classes]{Functions within classes}
@@ -967,8 +956,7 @@
967956
\pnum
968957
The \Cpp standard library provides
969958
61
970-
\term{\Cpp library headers},
971-
\indextext{header!C++ library}%
959+
\defnx{\Cpp library headers}{header!C++ library},
972960
as shown in Table~\ref{tab:cpp.library.headers}.
973961

974962
\begin{floattable}{\Cpp library headers}{tab:cpp.library.headers}
@@ -1272,11 +1260,10 @@
12721260

12731261
\pnum
12741262
Two kinds of implementations are defined:
1275-
\term{hosted}
1263+
\defnx{hosted}{implementation!hosted}
12761264
and
12771265
\term{freestanding}~(\ref{intro.compliance}).
12781266
For a hosted implementation, this International Standard
1279-
\indextext{implementation!hosted}%
12801267
describes the set of available headers.
12811268

12821269
\pnum

source/special.tex

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,7 @@
733733
the types of its parameters (if any)
734734
to the type of its class.
735735
Such a constructor is called a
736-
\indexdefn{constructor!converting}%
737-
\term{converting constructor}.
736+
\defnx{converting constructor}{constructor!converting}.
738737
\begin{example}
739738

740739
\indextext{Jessie}%

source/templates.tex

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@
5656
if its \grammarterm{declaration} defines a function, a class, a variable, or a
5757
static data member. A declaration introduced by a template declaration of a
5858
\indextext{variable template!definition~of}%
59-
\indextext{template!variable}%
60-
\indextext{template!static data member}%
61-
variable is a \term{variable template}. A variable template at class scope is a
62-
\term{static data member template}.
59+
variable is a \defnx{variable template}{template!variable}. A variable template at class scope is a
60+
\defnx{static data member template}{template!static data member}.
6361

6462
\begin{example}
6563
\begin{codeblock}
@@ -2169,16 +2167,14 @@
21692167
\rSec2[temp.class.spec]{Class template partial specializations}
21702168

21712169
\pnum
2172-
\indextext{specialization!class template partial}%
2173-
\indextext{template!primary}%
21742170
A
2175-
\term{primary}
2171+
\defnx{primary}{template!primary}
21762172
class template declaration is one in which the class template name is an
21772173
identifier.
21782174
A template declaration in which the class template name is a
21792175
\grammarterm{simple-template-id}
21802176
is a
2181-
\term{partial specialization}
2177+
\defnx{partial specialization}{specialization!class template partial}
21822178
of the class template named in the
21832179
\grammarterm{simple-template-id}.
21842180
A partial specialization of a class template provides an alternative definition
@@ -2403,9 +2399,8 @@
24032399
\rSec3[temp.class.order]{Partial ordering of class template specializations}
24042400

24052401
\pnum
2406-
\indextext{more~specialized!class~template}%
24072402
For two class template partial specializations,
2408-
the first is \term{more specialized} than the second if, given the following
2403+
the first is \defnx{more specialized}{more~specialized!class~template} than the second if, given the following
24092404
rewrite to two function templates, the first function template is more
24102405
specialized than the second according to the ordering rules for function
24112406
templates~(\ref{temp.func.order}):
@@ -2742,12 +2737,11 @@
27422737

27432738
\pnum
27442739
\indextext{overloading!resolution!template}%
2745-
\indextext{ordering!function template partial}%
27462740
If a function template is overloaded,
27472741
the use of a function template specialization might be ambiguous because
27482742
template argument deduction~(\ref{temp.deduct}) may associate the function
27492743
template specialization with more than one function template declaration.
2750-
\term{Partial ordering}
2744+
\defnx{Partial ordering}{ordering!function template partial}
27512745
of overloaded function template declarations is used in the following contexts
27522746
to select the function template to which a function template specialization
27532747
refers:
@@ -3581,8 +3575,7 @@
35813575
the
35823576
\grammarterm{unqualified-id}
35833577
denotes a
3584-
\indextext{name!dependent}%
3585-
\term{dependent name}
3578+
\defnx{dependent name}{name!dependent}
35863579
if
35873580

35883581
\begin{itemize}
@@ -3784,8 +3777,7 @@
37843777
\end{example}
37853778

37863779
\pnum
3787-
\indextext{base class!dependent}%
3788-
A \term{dependent base class} is a base class that is a dependent type and is
3780+
A \defnx{dependent base class}{base class!dependent} is a base class that is a dependent type and is
37893781
not the current instantiation.
37903782
\begin{note}
37913783
a base class can be the current instantiation in the case of a nested class
@@ -3808,9 +3800,8 @@
38083800
\end{note}
38093801

38103802
\pnum
3811-
\indextext{instantiation!member of the current}%
38123803
A name is a
3813-
\term{member of the current instantiation}
3804+
\defnx{member of the current instantiation}{instantiation!member of the current}
38143805
if it is
38153806

38163807
\begin{itemize}
@@ -3863,8 +3854,9 @@
38633854
\end{codeblock}
38643855
\end{example}
38653856

3866-
\indextext{instantiation!dependent member of the current}%
3867-
A name is a \term{dependent member of the current instantiation} if it is a
3857+
A name is a
3858+
\defnx{dependent member of the current instantiation}{instantiation!dependent member of the current}
3859+
if it is a
38683860
member of the current instantiation that, when looked up, refers to at least
38693861
one member of a class that is the current instantiation.
38703862

@@ -6707,7 +6699,6 @@
67076699
\end{itemize}
67086700

67096701
\pnum
6710-
\indextext{more~specialized!function~template}%
67116702
\indextext{at~least~as specialized~as|see{more~specialized}}%
67126703
Function template \tcode{F}
67136704
is \term{at least as specialized as}
@@ -6717,7 +6708,7 @@
67176708
is at least as specialized as
67186709
the type from \tcode{G}.
67196710
\tcode{F}
6720-
is \term{more specialized than}
6711+
is \defnx{more specialized than}{more~specialized!function~template}
67216712
\tcode{G} if
67226713
\tcode{F}
67236714
is at least as specialized as

0 commit comments

Comments
 (0)