Skip to content

Commit 859dfef

Browse files
committed
Merge \term+\indextext pairs into \defn(x)s. [submitted upstream: cplusplus#1665]
1 parent bd21ac1 commit 859dfef

File tree

8 files changed

+43
-81
lines changed

8 files changed

+43
-81
lines changed

source/declarators.tex

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -673,12 +673,10 @@
673673

674674

675675
\pnum
676-
\indextext{lvalue reference}%
677-
\indextext{rvalue reference}%
678676
A reference type that is declared using \tcode{\&} is called an
679-
\term{lvalue reference}, and a reference type that
677+
\defn{lvalue reference}, and a reference type that
680678
is declared using \tcode{\&\&} is called an
681-
\term{rvalue reference}. Lvalue references and
679+
\defn{rvalue reference}. Lvalue references and
682680
rvalue references are distinct types. Except where explicitly noted, they are
683681
semantically equivalent and commonly referred to as references.
684682

@@ -2943,8 +2941,7 @@
29432941
\end{note}
29442942

29452943
\pnum
2946-
\indextext{aggregate!elements}%
2947-
The \term{elements} of an aggregate are:
2944+
The \defnx{elements}{aggregate!elements} of an aggregate are:
29482945
\begin{itemize}
29492946
\item
29502947
for an array, the array elements in increasing subscript order, or

source/derived.tex

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@
5959
an incompletely defined class (Clause~\ref{class}).
6060
The class denoted by the \grammarterm{class-or-decltype} of
6161
a \grammarterm{base-specifier} is called a
62-
\indextext{base class!direct}%
63-
\term{direct base class}
62+
\defnx{direct base class}{base class!direct}
6463
for the class being defined.
6564
\indextext{base class}%
6665
\indextext{derivation|see{inheritance}}%
@@ -69,8 +68,7 @@
6968
\grammarterm{class-name}, the program is ill-formed. A class \tcode{B} is a
7069
base class of a class \tcode{D} if it is a direct base class of
7170
\tcode{D} or a direct base class of one of \tcode{D}'s base classes.
72-
\indextext{base class!indirect}%
73-
A class is an \term{indirect} base class of another if it is a base
71+
A class is an \defnx{indirect}{base class!indirect} base class of another if it is a base
7472
class but not a direct base class. A class is said to be (directly or
7573
indirectly) \term{derived} from its (direct or indirect) base
7674
classes.
@@ -82,8 +80,7 @@
8280
Unless redeclared in the derived class, members of a base class are also
8381
considered to be members of the derived class.
8482
Members of a base class other than constructors are said to be
85-
\indextext{inheritance}%
86-
\term{inherited}
83+
\defnx{inherited}{inheritance}
8784
by the derived class. Constructors of a base class
8885
can also be inherited as described in~\ref{namespace.udecl}.
8986
Inherited members can be referred to in
@@ -226,7 +223,6 @@
226223
\end{example}
227224

228225
\pnum
229-
\indextext{base class!virtual}%
230226
A base class specifier that does not contain the keyword
231227
\tcode{virtual} specifies a \defnx{non-virtual base class}{base class!non-virtual}. A base
232228
class specifier that contains the keyword \tcode{virtual} specifies a
@@ -577,13 +573,12 @@
577573
\rSec1[class.virtual]{Virtual functions}%
578574
\indextext{virtual function|(}%
579575
\indextext{type!polymorphic}%
580-
\indextext{class!polymorphic}
581576

582577
\pnum
583578
\begin{note}
584579
Virtual functions support dynamic binding and object-oriented
585580
programming. \end{note} A class that declares or inherits a virtual function is
586-
called a \term{polymorphic class}.
581+
called a \defnx{polymorphic class}{class!polymorphic}.
587582

588583
\pnum
589584
If a virtual member function \tcode{vf} is declared in a class
@@ -910,7 +905,6 @@
910905
\indextext{virtual function|)}
911906

912907
\rSec1[class.abstract]{Abstract classes}%
913-
\indextext{class!abstract}
914908

915909
\pnum
916910
\begin{note}
@@ -922,15 +916,14 @@
922916
\end{note}
923917

924918
\pnum
925-
An \term{abstract class} is a class that can be used only
919+
An \defnx{abstract class}{class!abstract} is a class that can be used only
926920
as a base class of some other class; no objects of an abstract class can
927921
be created except as subobjects of a class derived from it. A class is
928922
abstract if it has at least one \term{pure virtual function}.
929923
\begin{note}
930924
Such a function might be inherited: see below.
931925
\end{note}
932-
\indextext{virtual function!pure}%
933-
A virtual function is specified \term{pure} by using a
926+
A virtual function is specified \defnx{pure}{virtual function!pure} by using a
934927
\grammarterm{pure-specifier}~(\ref{class.mem}) in the function declaration
935928
in the class definition.
936929
\indextext{definition!pure virtual function}%

source/expressions.tex

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3593,17 +3593,15 @@
35933593
type by calling the above-mentioned conversion function, and the
35943594
converted operand is used in place of the original operand for the
35953595
remainder of this section.
3596-
\indextext{object!delete}%
35973596
In the first alternative
3598-
(\term{delete object}), the value of the operand of \tcode{delete} may
3597+
(\defnx{delete object}{object!delete}), the value of the operand of \tcode{delete} may
35993598
be a null pointer value, a pointer to a non-array object
36003599
created by a previous \grammarterm{new-expression},
36013600
or a pointer to a
36023601
subobject~(\ref{intro.object}) representing a base class of such an
36033602
object (Clause~\ref{class.derived}). If not, the behavior is undefined.
36043603
\indextext{array!\idxcode{delete}}%
3605-
\indextext{\idxcode{delete}!array}%
3606-
In the second alternative (\term{delete array}), the value of the
3604+
In the second alternative (\defnx{delete array}{\idxcode{delete}!array}), the value of the
36073605
operand of \tcode{delete}
36083606
may be a null pointer value or a pointer value
36093607
that resulted from
@@ -5199,8 +5197,7 @@
51995197
the conversion sequence contains only the conversions above.
52005198

52015199
\pnum
5202-
\indextext{expression!constant}%
5203-
A \term{constant expression} is either
5200+
A \defnx{constant expression}{expression!constant} is either
52045201
a glvalue core constant expression that refers to
52055202
an entity that is a permitted result of a constant expression (as defined below), or
52065203
a prvalue core constant expression whose value

source/lib-intro.tex

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -508,14 +508,10 @@
508508
For non-reserved replacement and handler functions,
509509
Clause~\ref{language.support} specifies two behaviors for the functions in question:
510510
their required and default behavior.
511-
The
512-
\term{default behavior}
511+
The \defnx{default behavior}{behavior!default}
513512
describes a function definition provided by the implementation.
514-
\indextext{behavior!default}%
515-
The
516-
\term{required behavior}
513+
The \defnx{required behavior}{behavior!required}
517514
describes the semantics of a function definition provided by
518-
\indextext{behavior!required}%
519515
either the implementation or a \Cpp{} program.
520516
Where no distinction is explicitly made in the description, the
521517
behavior described is the required behavior.
@@ -596,8 +592,7 @@
596592

597593
\pnum
598594
Several types defined in Clause~\ref{input.output} are
599-
\term{enumerated types}.
600-
\indextext{type!enumerated}%
595+
\defnx{enumerated types}{type!enumerated}.
601596
Each enumerated type may be implemented as an enumeration or as a synonym for
602597
an enumeration.\footnote{Such as an integer type, with constant integer
603598
values~(\ref{basic.fundamental}).}
@@ -628,8 +623,7 @@
628623
\pnum
629624
Several types defined in Clauses~\ref{\firstlibchapter} through~\ref{\lastlibchapter}
630625
and Annex~\ref{depr} are
631-
\term{bitmask types}.
632-
\indextext{type!bitmask}%
626+
\defnx{bitmask types}{type!bitmask}.
633627
Each bitmask type can be implemented as an
634628
enumerated type that overloads certain operators, as an integer type,
635629
or as a
@@ -729,9 +723,8 @@
729723
uppercase letters in the basic execution character set.
730724
\item
731725
The
732-
\term{decimal-point character}
726+
\defnx{decimal-point character}{character!decimal-point}
733727
is the
734-
\indextext{character!decimal-point}%
735728
(single-byte) character used by functions that convert between a (single-byte)
736729
character sequence and a value of one of the floating-point types.
737730
It is used
@@ -779,9 +772,8 @@
779772

780773
\pnum
781774
A
782-
\indextext{string!null-terminated byte}%
783775
\indextext{NTBS}%
784-
\term{null-terminated byte string},
776+
\defnx{null-terminated byte string}{string!null-terminated byte},
785777
or \ntbs{},
786778
is a character sequence whose highest-addressed element
787779
with defined content has the value zero
@@ -818,8 +810,7 @@
818810
\pnum
819811
A
820812
\indextext{NTBS}%
821-
\indextext{NTBS!static}%
822-
\term{static} \ntbs{}
813+
\defnx{static}{NTBS!static} \ntbs{}
823814
is an \ntbs{} with
824815
static storage duration.\footnote{A string literal, such as
825816
\tcode{"abc"},
@@ -841,9 +832,8 @@
841832

842833
\pnum
843834
A
844-
\term{static} \ntmbs{}
835+
\defnx{static}{NTMBS!static} \ntmbs{}
845836
is an \ntmbs{} with static storage duration.
846-
\indextext{NTMBS!static}%
847837
\indextext{NTMBS}%
848838

849839
\rSec3[functions.within.classes]{Functions within classes}
@@ -1267,11 +1257,10 @@
12671257

12681258
\pnum
12691259
Two kinds of implementations are defined:
1270-
\term{hosted}
1260+
\defnx{hosted}{implementation!hosted}
12711261
and
12721262
\term{freestanding}~(\ref{intro.compliance}).
12731263
For a hosted implementation, this International Standard
1274-
\indextext{implementation!hosted}%
12751264
describes the set of available headers.
12761265

12771266
\pnum

source/special.tex

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,9 @@
150150

151151
\pnum
152152
\indextext{constructor!inheritance of}%
153-
\indextext{constructor!default}%
154153
\indextext{constructor!non-trivial}%
155154
A
156-
\term{default}
155+
\defnx{default}{constructor!default}
157156
constructor for a class
158157
\tcode{X}
159158
is a constructor of class
@@ -236,11 +235,10 @@
236235
\defnx{non-trivial}{constructor!default!non-trivial}.
237236

238237
\pnum
239-
\indextext{constructor!implicitly defined}%
240238
A default constructor
241239
that is defaulted and not defined as deleted
242240
is
243-
\term{implicitly defined}
241+
\defnx{implicitly defined}{constructor!implicitly defined}
244242
when it is odr-used~(\ref{basic.def.odr})
245243
to create an object of its class type~(\ref{intro.object})
246244
or when it is explicitly defaulted after its first declaration.
@@ -657,14 +655,13 @@
657655

658656
\pnum
659657
\indextext{conversion!class}%
660-
\indextext{conversion!user-defined}%
661658
\indextext{constructor, conversion by|see{conversion, user-defined}}%
662659
\indextext{conversion function|see{conversion, user-defined}}%
663660
\indextext{conversion!implicit}%
664661
Type conversions of class objects can be specified by constructors and
665662
by conversion functions.
666663
These conversions are called
667-
\term{user-defined conversions}
664+
\defnx{user-defined conversions}{conversion!user-defined}
668665
and are used for implicit type conversions (Clause~\ref{conv}),
669666
for initialization~(\ref{dcl.init}),
670667
and for explicit type conversions~(\ref{expr.cast}, \ref{expr.static.cast}).
@@ -735,8 +732,7 @@
735732
the types of its parameters (if any)
736733
to the type of its class.
737734
Such a constructor is called a
738-
\indexdefn{constructor!converting}%
739-
\term{converting constructor}.
735+
\defnx{converting constructor}{constructor!converting}.
740736
\begin{example}
741737

742738
\indextext{Jessie}%
@@ -1047,11 +1043,10 @@
10471043
\defnx{non-trivial}{destructor!non-trivial}.
10481044

10491045
\pnum
1050-
\indextext{destructor!implicitly defined}%
10511046
A destructor
10521047
that is defaulted and not defined as deleted
10531048
is
1054-
\term{implicitly defined}
1049+
\defnx{implicitly defined}{destructor!implicitly defined}
10551050
when it is odr-used~(\ref{basic.def.odr})
10561051
or when it is explicitly defaulted after its first declaration.
10571052

@@ -2543,9 +2538,8 @@
25432538
\end{example}
25442539

25452540
\pnum
2546-
\indextext{constructor!copy!implicitly declared}%
25472541
If the class definition does not explicitly declare a copy constructor,
2548-
a non-explicit one is declared \term{implicitly}.
2542+
a non-explicit one is declared \defnx{implicitly}{constructor!copy!implicitly declared}.
25492543
If the class definition declares a move
25502544
constructor or move assignment operator, the implicitly declared copy
25512545
constructor is defined as deleted; otherwise, it is defined as
@@ -2792,9 +2786,9 @@
27922786
\end{note}
27932787

27942788
\pnum
2795-
\indextext{assignment operator!copy!implicitly declared}%
27962789
If the class definition does not explicitly declare a copy assignment operator,
2797-
one is declared \term{implicitly}. If the class definition declares a move
2790+
one is declared \defnx{implicitly}{assignment operator!copy!implicitly declared}.
2791+
If the class definition declares a move
27982792
constructor or move assignment operator, the implicitly declared copy
27992793
assignment operator is defined as deleted; otherwise, it is defined as
28002794
defaulted~(\ref{dcl.fct.def}).

source/strings.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
\pnum
77
This Clause describes components for manipulating sequences of
88
any non-array POD~(\ref{basic.types}) type.
9-
Such types are called \term{char-like types},\indextext{char-like type}
9+
Such types are called \defnx{char-like types}{char-like type},
1010
and objects of
11-
char-like types are called \term{char-like objects}\indextext{char-like object} or
11+
char-like types are called \defnx{char-like objects}{char-like object} or
1212
simply \term{characters}.
1313

1414
\pnum

source/threads.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4261,7 +4261,7 @@
42614261

42624262
\begin{itemdescr}
42634263
\pnum
4264-
\effects Constructs an \indexdefn{empty \tcode{future} object}\term{empty}
4264+
\effects Constructs an \defnx{empty}{empty \tcode{future} object}
42654265
\tcode{future} object that does not refer to a
42664266
shared state.
42674267

@@ -4547,8 +4547,8 @@
45474547

45484548
\begin{itemdescr}
45494549
\pnum
4550-
\effects Constructs an \indexdefn{empty \tcode{shared_future}
4551-
object}\term{empty} \tcode{shared_future} object that does not refer to a
4550+
\effects Constructs an \defnx{empty}{empty \tcode{shared_future} object}
4551+
\tcode{shared_future} object that does not refer to a
45524552
shared state.
45534553

45544554
\pnum

0 commit comments

Comments
 (0)