Skip to content

Commit 7bc1bd1

Browse files
committed
Replace \indextext + \term pairs with \defnx (or \defn).
1 parent 110e3cc commit 7bc1bd1

File tree

10 files changed

+70
-129
lines changed

10 files changed

+70
-129
lines changed

source/basic.tex

Lines changed: 23 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@
5959
whenever a name is encountered it is necessary to determine whether that name denotes
6060
one of these entities before continuing to parse the program that contains it. The
6161
process that determines this is called
62-
\indextext{lookup!name}%
63-
\term{name lookup}~(\ref{basic.lookup}).
62+
\defnx{name lookup}{lookup!name}~(\ref{basic.lookup}).
6463

6564
\pnum
6665
Two names are \term{the same} if
@@ -824,9 +823,8 @@
824823
\rSec2[basic.funscope]{Function scope}
825824

826825
\pnum
827-
\indextext{scope!function}%
828826
\indextext{label!scope~of}%
829-
Labels~(\ref{stmt.label}) have \term{function scope} and
827+
Labels~(\ref{stmt.label}) have \defnx{function scope}{scope!function} and
830828
may be used anywhere in the function in which they are declared. Only
831829
labels have function scope.
832830

@@ -3266,10 +3264,9 @@
32663264

32673265
\pnum
32683266
\indextext{object~lifetime|(}%
3269-
\indextext{initialization!non-vacuous}%
32703267
The \defn{lifetime} of an object or reference is a runtime property of the
32713268
object or reference.
3272-
An object is said to have \term{non-vacuous initialization} if it is of a class or
3269+
An object is said to have \defnx{non-vacuous initialization}{initialization!non-vacuous} if it is of a class or
32733270
aggregate type and it or one of its subobjects is initialized by a constructor
32743271
other than a trivial default constructor. \begin{note} initialization by a
32753272
trivial copy/move constructor is non-vacuous initialization. \end{note}
@@ -3678,13 +3675,11 @@
36783675
and
36793676
cv-qualified versions of these
36803677
types~(\ref{basic.type.qualifier}) are collectively called
3681-
\indextext{scalar~type}%
3682-
\term{scalar types}. Scalar types,
3678+
\defnx{scalar types}{scalar~type}. Scalar types,
36833679
POD classes (Clause~\ref{class}), arrays of such types and
36843680
cv-qualified versions of these
36853681
types~(\ref{basic.type.qualifier}) are collectively called
3686-
\indextext{type!POD}%
3687-
\term{POD types}.
3682+
\defnx{POD types}{type!POD}.
36883683
Cv-unqualified scalar types, trivially copyable class types (Clause~\ref{class}), arrays of
36893684
such types, and non-volatile const-qualified versions of these
36903685
types~(\ref{basic.type.qualifier}) are collectively called \defn{trivially
@@ -3739,7 +3734,6 @@
37393734
\indextext{type!Boolean}%
37403735
\indextext{type!\idxcode{char}}%
37413736
\indextext{type!character}%
3742-
\indextext{type!narrow character}%
37433737
Objects declared as characters (\tcode{char}) shall be large enough to
37443738
store any member of the implementation's basic character set. If a
37453739
character from this set is stored in a character object, the integral
@@ -3753,7 +3747,7 @@
37533747
\tcode{signed}.
37543748
\indextext{character!\idxcode{signed}}%
37553749
Plain \tcode{char}, \tcode{signed char}, and \tcode{unsigned char} are
3756-
three distinct types, collectively called \term{narrow character types}.
3750+
three distinct types, collectively called \defnx{narrow character types}{type!narrow character}.
37573751
A \tcode{char}, a \tcode{signed char}, and an
37583752
\tcode{unsigned char} occupy the same amount of storage and have the
37593753
same alignment requirements~(\ref{basic.align}); that is, they have the
@@ -3779,8 +3773,7 @@
37793773

37803774
\pnum
37813775
\indextext{type!standard~signed~integer}%
3782-
\indextext{standard~signed~integer~type}%
3783-
There are five \term{standard signed integer types} :
3776+
There are five \defnx{standard signed integer types}{standard~signed~integer~type}:
37843777
\indextext{type!\idxcode{signed char}}%
37853778
\indextext{type!\idxcode{short}}%
37863779
\indextext{type!\idxcode{int}}%
@@ -3791,12 +3784,10 @@
37913784
this list, each type provides at least as much storage as those
37923785
preceding it in the list.
37933786
\indextext{type!extended~signed~integer}%
3794-
\indextext{extended~signed~integer~type}%
37953787
\indextext{type!signed~integer}%
3796-
\indextext{signed~integer~type}%
3797-
There may also be \impldef{extended signed integer types} \term{extended signed
3798-
integer types}. The standard and
3799-
extended signed integer types are collectively called \term{signed integer types}.
3788+
There may also be \impldef{extended signed integer types}
3789+
\defnx{extended signed integer types}{extended~signed~integer~type}. The standard and
3790+
extended signed integer types are collectively called \defnx{signed integer types}{signed~integer~type}.
38003791
\indextext{integral~type!implementation-defined @\tcode{sizeof}}%
38013792
Plain
38023793
\tcode{int}s have the natural size suggested by the architecture of the
@@ -3812,8 +3803,7 @@
38123803
For each of the standard signed integer types,
38133804
there exists a corresponding (but different)
38143805
\indextext{type!standard~unsigned~integer}%
3815-
\indextext{standard~unsigned~integer~type}%
3816-
\term{standard unsigned integer type}:
3806+
\defnx{standard unsigned integer type}{standard~unsigned~integer~type}:
38173807
\indextext{type!\idxcode{unsigned char}}%
38183808
\indextext{type!\idxcode{unsigned short}}%
38193809
\indextext{type!\idxcode{unsigned int}}%
@@ -3829,26 +3819,23 @@
38293819
that is, each signed integer type has the same object representation as
38303820
its corresponding unsigned integer type.
38313821
\indextext{type!extended~unsigned~integer}%
3832-
\indextext{extended~unsigned~integer~type}%
38333822
\indextext{type!unsigned~integer}%
3834-
\indextext{unsigned~integer~type}%
38353823
Likewise, for each of the extended signed integer types there exists a
3836-
corresponding \term{extended unsigned integer type} with the same amount of storage and alignment
3824+
corresponding \defnx{extended unsigned integer type}{extended~unsigned~integer~type}
3825+
with the same amount of storage and alignment
38373826
requirements. The standard and extended unsigned integer types are
3838-
collectively called \term{unsigned integer types}. The range of non-negative
3827+
collectively called \defnx{unsigned integer types}{unsigned~integer~type}. The range of non-negative
38393828
values of a \term{signed integer} type is a subrange of the corresponding
38403829
\term{unsigned integer} type, and the value
38413830
representation of each corresponding signed/unsigned type shall be the
38423831
same.
38433832
\indextext{type!standard~integer}%
3844-
\indextext{standard~integer~type}%
38453833
\indextext{type!extended~integer}%
3846-
\indextext{extended~integer~type}%
38473834
The standard signed integer types and standard unsigned integer types
3848-
are collectively called the \term{standard integer types}, and the extended
3835+
are collectively called the \defnx{standard integer types}{standard~integer~type}, and the extended
38493836
signed integer types and extended
3850-
unsigned integer types are collectively called the \term{extended
3851-
integer types}. The signed and unsigned integer types shall satisfy
3837+
unsigned integer types are collectively called the \defnx{extended
3838+
integer types}{extended~integer~type}. The signed and unsigned integer types shall satisfy
38523839
the constraints given in the C standard, section 5.2.4.2.1.
38533840

38543841
\pnum
@@ -3892,13 +3879,11 @@
38923879
Types \tcode{bool}, \tcode{char}, \tcode{char16_t}, \tcode{char32_t},
38933880
\tcode{wchar_t}, and the signed and unsigned integer types are
38943881
collectively called
3895-
\indextext{integral~type}%
3896-
\term{integral} types.\footnote{Therefore, enumerations~(\ref{dcl.enum}) are not integral; however,
3882+
\defnx{integral}{integral~type} types.\footnote{Therefore, enumerations~(\ref{dcl.enum}) are not integral; however,
38973883
enumerations can be promoted to integral types as specified
38983884
in~\ref{conv.prom}.}
38993885
A synonym for integral type is
3900-
\indextext{integer~type}%
3901-
\term{integer type}. The representations of integral types shall
3886+
\defnx{integer type}{integer~type}. The representations of integral types shall
39023887
define values by use of a pure binary numeration system.\footnote{A positional
39033888
representation for integers that uses the binary digits 0
39043889
and 1, in which the values represented by successive bits are additive,
@@ -3910,8 +3895,7 @@
39103895
\end{example}
39113896

39123897
\pnum
3913-
\indextext{floating~point~type}%
3914-
There are three \term{floating point} types:
3898+
There are three \defnx{floating point}{floating~point~type} types:
39153899
\indextext{type!\idxcode{float}}%
39163900
\tcode{float},
39173901
\indextext{type!\idxcode{double}}%
@@ -3927,13 +3911,12 @@
39273911
representation of floating-point types is \impldef{value representation of
39283912
floating-point types}.
39293913
\indextext{floating~point~type!implementation-defined}%
3930-
\indextext{type!arithmetic}%
39313914
\begin{note}
39323915
This International Standard imposes no requirements on the accuracy of
39333916
floating-point operations; see also~\ref{limits}.
39343917
\end{note}
39353918
\term{Integral} and \term{floating} types are collectively
3936-
called \term{arithmetic} types.
3919+
called \defnx{arithmetic}{type!arithmetic} types.
39373920
\indextext{\idxcode{numeric_limits}!specializations for arithmetic types}%
39383921
Specializations of the standard library template
39393922
\tcode{std::numeric_limits}~(\ref{support.limits}) shall specify the
@@ -3999,8 +3982,8 @@
39993982
\item \term{rvalue reference}
40003983
\end{itemize}
40013984

4002-
\item \indextext{class}%
4003-
\term{classes} containing a sequence of objects of various types
3985+
\item
3986+
\defnx{classes}{class} containing a sequence of objects of various types
40043987
(Clause~\ref{class}), a set of types, enumerations and functions for
40053988
manipulating these objects~(\ref{class.mfct}), and a set of restrictions
40063989
on the access to these entities (Clause~\ref{class.access});

source/classes.tex

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,13 @@
228228
in~\ref{class.mem}.\end{note}
229229

230230
\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''.}
231+
A \defn{POD struct}\footnote{The acronym POD stands for ``plain old data''.}
233232
is a non-union class that is both a trivial class and a
234233
standard-layout class, and has no non-static data members of type non-POD struct,
235234
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
235+
\defn{POD union} is a union that is both a trivial class and a standard-layout
237236
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
237+
union (or array of such types). A \defn{POD class} is a
239238
class that is either a POD struct or a POD union.
240239

241240
\begin{example}

source/declarations.tex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,14 +2016,12 @@
20162016
\pnum
20172017
\indextext{constant!enumeration}%
20182018
\indextext{enumeration}%
2019-
\indextext{enumeration!unscoped}%
2020-
\indextext{enumeration!scoped}%
20212019
The enumeration type declared with an \grammarterm{enum-key}
2022-
of only \tcode{enum} is an \term{}{unscoped enumeration},
2020+
of only \tcode{enum} is an \defnx{unscoped enumeration}{enumeration!unscoped},
20232021
and its \grammarterm{enumerator}{s} are \term{unscoped enumerators}.
20242022
The \grammarterm{enum-key}{s} \tcode{enum class} and
20252023
\tcode{enum struct} are semantically equivalent; an enumeration
2026-
type declared with one of these is a \term{scoped enumeration},
2024+
type declared with one of these is a \defnx{scoped enumeration}{enumeration!scoped},
20272025
and its \grammarterm{enumerator}{s} are \term{scoped enumerators}.
20282026
The optional \grammarterm{identifier} shall not be omitted in the declaration of a scoped enumeration.
20292027
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/intro.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
\Cpp is a general purpose programming language based on the C
4040
programming language as described in ISO/IEC 9899:1999
4141
\doccite{Programming languages --- C} (hereinafter referred to as the
42-
\indexdefn{C!standard}\term{C standard}). In addition to
42+
\defnx{C standard}{C!standard}). In addition to
4343
the facilities provided by C, \Cpp provides additional data types,
4444
classes, templates, exceptions, namespaces, operator
4545
overloading, function name overloading, references, free store

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
@@ -1288,10 +1283,8 @@
12881283
The integer and fraction parts both consist of
12891284
a sequence of decimal (base ten) digits if there is no prefix, or
12901285
hexadecimal (base sixteen) digits if the prefix is \tcode{0x} or \tcode{0X}.
1291-
\indextext{literal!decimal floating}%
1292-
The literal is a \term{decimal floating literal} in the former case and
1293-
\indextext{literal!hexadecimal floating}%
1294-
a \term{hexadecimal floating literal} in the latter case.
1286+
The literal is a \defnx{decimal floating literal}{literal!decimal floating} in the former case and
1287+
a \defnx{hexadecimal floating literal}{literal!hexadecimal floating} in the latter case.
12951288
Optional separating single quotes in
12961289
a \grammarterm{digit-sequence} or \grammarterm{hexadecimal-digit-sequence}
12971290
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

@@ -599,8 +598,7 @@
599598

600599
\pnum
601600
Several types defined in Clause~\ref{input.output} are
602-
\term{enumerated types}.
603-
\indextext{type!enumerated}%
601+
\defnx{enumerated types}{type!enumerated}.
604602
Each enumerated type may be implemented as an enumeration or as a synonym for
605603
an enumeration.\footnote{Such as an integer type, with constant integer
606604
values~(\ref{basic.fundamental}).}
@@ -689,8 +687,7 @@
689687
All such elements have distinct, nonzero values such that, for any pair \textit{Ci}
690688
and \textit{Cj} where \textit{i} != \textit{j}, \textit{Ci} \& \textit{Ci} is nonzero and
691689
\textit{Ci} \& \textit{Cj} is zero.
692-
\indextext{bitmask!empty}%
693-
Additionally, the value 0 is used to represent an \term{empty bitmask}, in which no
690+
Additionally, the value 0 is used to represent an \defnx{empty bitmask}{bitmask!empty}, in which no
694691
bitmask elements are set.
695692

696693
\pnum
@@ -731,10 +728,7 @@
731728
\indextext{uppercase}%
732729
uppercase letters in the basic execution character set.
733730
\item
734-
The
735-
\term{decimal-point character}
736-
is the
737-
\indextext{character!decimal-point}%
731+
The \defnx{decimal-point character}{character!decimal-point} is the
738732
(single-byte) character used by functions that convert between a (single-byte)
739733
character sequence and a value of one of the floating-point types.
740734
It is used
@@ -782,9 +776,8 @@
782776

783777
\pnum
784778
A
785-
\indextext{string!null-terminated byte}%
786779
\indextext{NTBS}%
787-
\term{null-terminated byte string},
780+
\defnx{null-terminated byte string}{string!null-terminated byte},
788781
or \ntbs,
789782
is a character sequence whose highest-addressed element
790783
with defined content has the value zero
@@ -821,8 +814,7 @@
821814
\pnum
822815
A
823816
\indextext{NTBS}%
824-
\indextext{NTBS!static}%
825-
\term{static} \ntbs
817+
\defnx{static}{NTBS!static} \ntbs
826818
is an \ntbs with
827819
static storage duration.\footnote{A string literal, such as
828820
\tcode{"abc"},
@@ -834,9 +826,8 @@
834826
A
835827
\indextext{NTBS}%
836828
\indextext{NTMBS}%
837-
\term{null-terminated multibyte string,}
829+
\defnx{null-terminated multibyte string}{string!null-terminated multibyte},
838830
or \ntmbs,
839-
\indextext{string!null-terminated multibyte}%
840831
is an \ntbs that constitutes a
841832
sequence of valid multibyte characters, beginning and ending in the initial
842833
shift state.\footnote{An \ntbs that contains characters only from the
@@ -845,10 +836,8 @@
845836
consists of a single byte.}
846837

847838
\pnum
848-
A
849-
\term{static} \ntmbs
839+
A \defnx{static}{NTMBS!static} \ntmbs
850840
is an \ntmbs with static storage duration.
851-
\indextext{NTMBS!static}%
852841
\indextext{NTMBS}%
853842

854843
\rSec3[functions.within.classes]{Functions within classes}
@@ -968,8 +957,7 @@
968957
\pnum
969958
The \Cpp standard library provides
970959
61
971-
\term{\Cpp library headers},
972-
\indextext{header!C++ library}%
960+
\defnx{\Cpp library headers}{header!C++ library},
973961
as shown in Table~\ref{tab:cpp.library.headers}.
974962

975963
\begin{floattable}{\Cpp library headers}{tab:cpp.library.headers}
@@ -1270,11 +1258,10 @@
12701258

12711259
\pnum
12721260
Two kinds of implementations are defined:
1273-
\term{hosted}
1261+
\defnx{hosted}{implementation!hosted}
12741262
and
12751263
\term{freestanding}~(\ref{intro.compliance}).
12761264
For a hosted implementation, this International Standard
1277-
\indextext{implementation!hosted}%
12781265
describes the set of available headers.
12791266

12801267
\pnum

0 commit comments

Comments
 (0)