Skip to content

Commit 9e92aa3

Browse files
jensmaurerzygoloid
authored andcommitted
[temp] Replace \term with \defn or \placeholder (#1370)
Thereby also improving the index.
1 parent 0b3e766 commit 9e92aa3

File tree

1 file changed

+55
-52
lines changed

1 file changed

+55
-52
lines changed

source/templates.tex

Lines changed: 55 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
\indextext{type generator|see{template}}
99

1010
\pnum
11-
A \term{template} defines a family of classes, functions, or variables, or an alias for a
11+
A \defn{template} defines a family of classes, functions, or variables, or an alias for a
1212
family of types.
1313

1414
\indextext{\idxcode{template}}%
@@ -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}
@@ -373,7 +371,7 @@
373371

374372
\pnum
375373
A
376-
\term{default template-argument}
374+
\defnx{default template-argument}{\idxgram{template-argument}!default}
377375
is a
378376
\grammarterm{template-argument}~(\ref{temp.arg}) specified after
379377
\tcode{=}
@@ -1358,8 +1356,8 @@
13581356
\rSec2[temp.class]{Class templates}
13591357

13601358
\pnum
1361-
A class
1362-
\term{template}
1359+
A
1360+
\defnx{class template}{template!class}
13631361
defines the layout and operations
13641362
for an unbounded set of related types.
13651363

@@ -1718,7 +1716,7 @@
17181716
\rSec2[temp.variadic]{Variadic templates}
17191717

17201718
\pnum
1721-
A \term{template parameter pack} is a template parameter
1719+
A \defn{template parameter pack} is a template parameter
17221720
that accepts zero or more template arguments. \begin{example}
17231721

17241722
\begin{codeblock}
@@ -1733,7 +1731,7 @@
17331731
\end{example}
17341732

17351733
\pnum
1736-
A \term{function parameter pack} is a function parameter
1734+
A \defn{function parameter pack} is a function parameter
17371735
that accepts zero or more function arguments. \begin{example}
17381736

17391737
\begin{codeblock}
@@ -1747,12 +1745,13 @@
17471745
\end{example}
17481746

17491747
\pnum
1750-
A \term{parameter pack} is either a template parameter
1748+
A \defn{parameter pack} is either a template parameter
17511749
pack or a function parameter pack.
17521750

17531751
\pnum
1754-
A \term{pack expansion}
1755-
consists of a \term{pattern} and an ellipsis, the instantiation of which
1752+
\indextext{pattern|see{pack expansion, pattern}}%
1753+
A \defn{pack expansion}
1754+
consists of a \defnx{pattern}{pack expansion!pattern} and an ellipsis, the instantiation of which
17561755
produces zero or more instantiations of the pattern in a list (described below).
17571756
The form of the pattern
17581757
depends on the context in which the expansion occurs. Pack
@@ -1827,7 +1826,7 @@
18271826
a parameter pack is only expanded by the innermost enclosing pack expansion.
18281827
The pattern of a pack expansion shall name one or more parameter packs that
18291828
are not expanded by a nested pack expansion; such parameter packs are called
1830-
\term{unexpanded} parameter packs in the pattern. All of the parameter packs expanded
1829+
\defnx{unexpanded parameter packs}{parameter pack!unexpanded} in the pattern. All of the parameter packs expanded
18311830
by a pack expansion shall have the same number of arguments specified. An
18321831
appearance of a name of a parameter pack that is not expanded is
18331832
ill-formed. \begin{example}
@@ -2184,13 +2183,13 @@
21842183
\indextext{specialization!class template partial}%
21852184
\indextext{template!primary}%
21862185
A
2187-
\term{primary}
2188-
class template declaration is one in which the class template name is an
2186+
\defnx{primary class template}{see{template, primary}}
2187+
declaration is one in which the class template name is an
21892188
identifier.
21902189
A template declaration in which the class template name is a
21912190
\grammarterm{simple-template-id}
21922191
is a
2193-
\term{partial specialization}
2192+
\defnx{partial specialization}{specialization!class template partial}
21942193
of the class template named in the
21952194
\grammarterm{simple-template-id}.
21962195
A partial specialization of a class template provides an alternative definition
@@ -2417,7 +2416,7 @@
24172416
\pnum
24182417
\indextext{more specialized!class template}%
24192418
For two class template partial specializations,
2420-
the first is \term{more specialized} than the second if, given the following
2419+
the first is \defn{more specialized} than the second if, given the following
24212420
rewrite to two function templates, the first function template is more
24222421
specialized than the second according to the ordering rules for function
24232422
templates~(\ref{temp.func.order}):
@@ -2666,8 +2665,9 @@
26662665
\end{note}
26672666

26682667
\pnum
2668+
\indextext{equivalent!expression|see{expression, equivalent}}%
26692669
Two expressions involving template parameters are considered
2670-
\term{equivalent}
2670+
\defnx{equivalent}{expression!equivalent}
26712671
if two function definitions containing the expressions would satisfy
26722672
the one-definition rule~(\ref{basic.def.odr}), except that the tokens used
26732673
to name the template parameters may differ as long as a token used to
@@ -2692,21 +2692,26 @@
26922692
// was not in scope at the first declaration of \tcode{h()}
26932693
\end{codeblock}
26942694
\end{example}
2695+
\indextext{equivalent!functionally|see{expression, functionally equivalent}}%
2696+
\indextext{functionally equivalent!expression|see{expression, functionally equivalent}}%
26952697
Two expressions involving template parameters that are not equivalent are
2696-
\term{functionally equivalent}
2698+
\defnx{functionally equivalent}{expression!functionally equivalent}
26972699
if, for any given set of template arguments, the evaluation of the
26982700
expression results in the same value.
26992701

27002702
\pnum
2703+
\indextext{equivalent!function template|see{template, function, equivalent}}%
27012704
Two function templates are
2702-
\term{equivalent}
2705+
\defnx{equivalent}{template!function!equivalent}
27032706
if they are declared in the same scope, have the same name, have
27042707
identical template parameter lists, and have return types and parameter
27052708
lists that are equivalent using the rules described above to compare
27062709
expressions involving
27072710
template parameters.
2711+
\indextext{equivalent!functionally|see{template, function, functionally equivalent}}%
2712+
\indextext{functionally equivalent!function template|see{template, function, functionally equivalent}}%
27082713
Two function templates are
2709-
\term{functionally equivalent}
2714+
\defnx{functionally equivalent}{template!function!functionally equivalent}
27102715
if they are equivalent except that one or more
27112716
expressions
27122717
that involve template parameters in the return types and parameter
@@ -2745,12 +2750,12 @@
27452750

27462751
\pnum
27472752
\indextext{overloading!resolution!template}%
2748-
\indextext{ordering!function template partial}%
2753+
\indextext{ordering!function template partial|see{template, function, partial ordering}}%
27492754
If a function template is overloaded,
27502755
the use of a function template specialization might be ambiguous because
27512756
template argument deduction~(\ref{temp.deduct}) may associate the function
27522757
template specialization with more than one function template declaration.
2753-
\term{Partial ordering}
2758+
\defnx{Partial ordering}{template!function!partial ordering}
27542759
of overloaded function template declarations is used in the following contexts
27552760
to select the function template to which a function template specialization
27562761
refers:
@@ -3550,11 +3555,11 @@
35503555
\rSec2[temp.dep]{Dependent names}
35513556

35523557
\pnum
3553-
\indextext{name!dependent}%
3558+
\indextext{dependent name|see{name, dependent}}%
35543559
Inside a template, some constructs have semantics which may differ from one
35553560
instantiation to another.
35563561
Such a construct
3557-
\term{depends}
3562+
\defnx{depends}{name!dependent}
35583563
on the template parameters.
35593564
In particular, types and expressions may depend on the type
35603565
and/or
@@ -3581,8 +3586,7 @@
35813586
the
35823587
\grammarterm{unqualified-id}
35833588
denotes a
3584-
\indextext{name!dependent}%
3585-
\term{dependent name}
3589+
\defnx{dependent name}{name!dependent}
35863590
if
35873591

35883592
\begin{itemize}
@@ -3698,7 +3702,7 @@
36983702

36993703
\pnum
37003704
A name refers to the
3701-
\term{current instantiation}
3705+
\defn{current instantiation}
37023706
if it is
37033707

37043708
\begin{itemize}
@@ -3784,8 +3788,8 @@
37843788
\end{example}
37853789

37863790
\pnum
3787-
\indextext{base class!dependent}%
3788-
A \term{dependent base class} is a base class that is a dependent type and is
3791+
\indextext{dependent base class|see{base class, dependent}}%
3792+
A \defnx{dependent base class}{base class!dependent} is a base class that is a dependent type and is
37893793
not the current instantiation.
37903794
\begin{note}
37913795
A base class can be the current instantiation in the case of a nested class
@@ -3808,9 +3812,9 @@
38083812
\end{note}
38093813

38103814
\pnum
3811-
\indextext{instantiation!member of the current}%
3815+
\indextext{member of the current instantiation|see{current instantiation, member of the}}%
38123816
A name is a
3813-
\term{member of the current instantiation}
3817+
\defnx{member of the current instantiation}{current instantiation!member of the}
38143818
if it is
38153819

38163820
\begin{itemize}
@@ -3863,14 +3867,14 @@
38633867
\end{codeblock}
38643868
\end{example}
38653869

3866-
\indextext{instantiation!dependent member of the current}%
3867-
A name is a \term{dependent member of the current instantiation} if it is a
3870+
\indextext{dependent member of the current instantiation|see{current instantiation, dependent member of the}}%
3871+
A name is a \defnx{dependent member of the current instantiation}{current instantiation!dependent member of the} if it is a
38683872
member of the current instantiation that, when looked up, refers to at least
38693873
one member of a class that is the current instantiation.
38703874

38713875
\pnum
38723876
A name is a
3873-
\term{member of an unknown specialization}
3877+
\defn{member of an unknown specialization}
38743878
if it is
38753879

38763880
\begin{itemize}
@@ -4443,7 +4447,7 @@
44434447
\indextext{specialization!template}%
44444448
The act of instantiating a function, a class, a member of a class template or
44454449
a member template is referred to as
4446-
\term{template instantiation}.
4450+
\defn{template instantiation}.
44474451

44484452
\pnum
44494453
A function instantiated from a function template is called an instantiated
@@ -4796,7 +4800,7 @@
47964800
remain as determined from the context of the definition for the default
47974801
argument.
47984802
This analysis is called
4799-
\term{default argument instantiation}.
4803+
\defn{default argument instantiation}.
48004804
The instantiated default argument is then used as the argument of
48014805
\tcode{f}.
48024806

@@ -6724,17 +6728,16 @@
67246728
\end{itemize}
67256729

67266730
\pnum
6727-
\indextext{more specialized!function template}%
67286731
\indextext{at least as specialized as|see{more specialized}}%
67296732
Function template \tcode{F}
6730-
is \term{at least as specialized as}
6733+
is \defnx{at least as specialized as}{more specialized}
67316734
function template \tcode{G} if,
67326735
for each pair of types used to determine the ordering,
67336736
the type from \tcode{F}
67346737
is at least as specialized as
67356738
the type from \tcode{G}.
67366739
\tcode{F}
6737-
is \term{more specialized than}
6740+
is \defnx{more specialized than}{more specialized!function template}
67386741
\tcode{G} if
67396742
\tcode{F}
67406743
is at least as specialized as
@@ -7042,20 +7045,20 @@
70427045
T&&
70437046
T[@\grammarterm{integer-constant}@]
70447047
@\grammarterm{template-name}@<T> @\textrm{(where \tcode{\grammarterm{template-name}} refers to a class template)}@
7045-
@\term{type}@(T)
7048+
@\placeholder{type}@(T)
70467049
T()
70477050
T(T)
7048-
T @\term{type}@::*
7049-
@\term{type}@ T::*
7051+
T @\placeholder{type}@::*
7052+
@\placeholder{type}@ T::*
70507053
T T::*
7051-
T (@\term{type}@::*)()
7052-
@\term{type}@ (T::*)()
7053-
@\term{type}@ (@\term{type}@::*)(T)
7054-
@\term{type}@ (T::*)(T)
7055-
T (@\term{type}@::*)(T)
7054+
T (@\placeholder{type}@::*)()
7055+
@\placeholder{type}@ (T::*)()
7056+
@\placeholder{type}@ (@\placeholder{type}@::*)(T)
7057+
@\placeholder{type}@ (T::*)(T)
7058+
T (@\placeholder{type}@::*)(T)
70567059
T (T::*)()
70577060
T (T::*)(T)
7058-
@\term{type}@[i]
7061+
@\placeholder{type}@[i]
70597062
@\grammarterm{template-name}@<i> @\textrm{(where \tcode{\grammarterm{template-name}} refers to a class template)}@
70607063
TT<T>
70617064
TT<i>
@@ -7193,13 +7196,13 @@
71937196
is of the form
71947197

71957198
\begin{codeblock}
7196-
@\grammarterm{template-name}@<T> (*)(@\term{type}@[i])
7199+
@\grammarterm{template-name}@<T> (*)(@\placeholder{type}@[i])
71977200
\end{codeblock}
71987201

71997202
which is a variant of
72007203

72017204
\begin{codeblock}
7202-
@\term{type}@ (*)(T)
7205+
@\placeholder{type}@ (*)(T)
72037206
\end{codeblock}
72047207

72057208
where type is

0 commit comments

Comments
 (0)