Skip to content

Commit cddde61

Browse files
committed
[temp] Replace \term with \defn or \placeholder
Thereby also improving the index.
1 parent eba80f1 commit cddde61

File tree

1 file changed

+56
-52
lines changed

1 file changed

+56
-52
lines changed

source/templates.tex

Lines changed: 56 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}):
@@ -2672,8 +2671,9 @@
26722671
\end{note}
26732672

26742673
\pnum
2674+
\indextext{equivalent!expression|see{expression, equivalent}}%
26752675
Two expressions involving template parameters are considered
2676-
\term{equivalent}
2676+
\defnx{equivalent}{expression!equivalent}
26772677
if two function definitions containing the expressions would satisfy
26782678
the one-definition rule~(\ref{basic.def.odr}), except that the tokens used
26792679
to name the template parameters may differ as long as a token used to
@@ -2698,21 +2698,26 @@
26982698
// was not in scope at the first declaration of \tcode{h()}
26992699
\end{codeblock}
27002700
\end{example}
2701+
\indextext{equivalent!functionally|see{expression, functionally equivalent}}%
2702+
\indextext{functionally equivalent!expression|see{expression, functionally equivalent}}%
27012703
Two expressions involving template parameters that are not equivalent are
2702-
\term{functionally equivalent}
2704+
\defnx{functionally equivalent}{expression!functionally equivalent}
27032705
if, for any given set of template arguments, the evaluation of the
27042706
expression results in the same value.
27052707

27062708
\pnum
2709+
\indextext{equivalent!function template|see{template, function, equivalent}}%
27072710
Two function templates are
2708-
\term{equivalent}
2711+
\defnx{equivalent}{template!function!equivalent}
27092712
if they are declared in the same scope, have the same name, have
27102713
identical template parameter lists, and have return types and parameter
27112714
lists that are equivalent using the rules described above to compare
27122715
expressions involving
27132716
template parameters.
2717+
\indextext{equivalent!functionally|see{template, function, functionally equivalent}}%
2718+
\indextext{functionally equivalent!function template|see{template, function, functionally equivalent}}%
27142719
Two function templates are
2715-
\term{functionally equivalent}
2720+
\defnx{functionally equivalent}{template!function!functionally equivalent}
27162721
if they are equivalent except that one or more
27172722
expressions
27182723
that involve template parameters in the return types and parameter
@@ -2751,12 +2756,12 @@
27512756

27522757
\pnum
27532758
\indextext{overloading!resolution!template}%
2754-
\indextext{ordering!function template partial}%
2759+
\indextext{ordering!function template partial|see{template, function, partial ordering}}%
27552760
If a function template is overloaded,
27562761
the use of a function template specialization might be ambiguous because
27572762
template argument deduction~(\ref{temp.deduct}) may associate the function
27582763
template specialization with more than one function template declaration.
2759-
\term{Partial ordering}
2764+
\defnx{Partial ordering}{template!function!partial ordering}
27602765
of overloaded function template declarations is used in the following contexts
27612766
to select the function template to which a function template specialization
27622767
refers:
@@ -3556,11 +3561,11 @@
35563561
\rSec2[temp.dep]{Dependent names}
35573562

35583563
\pnum
3559-
\indextext{name!dependent}%
3564+
\indextext{dependent name|see{name!dependent}}%
35603565
Inside a template, some constructs have semantics which may differ from one
35613566
instantiation to another.
35623567
Such a construct
3563-
\term{depends}
3568+
\defnx{depends}{name!dependent}
35643569
on the template parameters.
35653570
In particular, types and expressions may depend on the type
35663571
and/or
@@ -3587,8 +3592,7 @@
35873592
the
35883593
\grammarterm{unqualified-id}
35893594
denotes a
3590-
\indextext{name!dependent}%
3591-
\term{dependent name}
3595+
\defnx{dependent name}{name!dependent}
35923596
if
35933597

35943598
\begin{itemize}
@@ -3704,7 +3708,8 @@
37043708

37053709
\pnum
37063710
A name refers to the
3707-
\term{current instantiation}
3711+
\indextext{current instantiation|see{instantiation, current}}
3712+
\defnx{current instantiation}{instantiation!current}
37083713
if it is
37093714

37103715
\begin{itemize}
@@ -3790,8 +3795,8 @@
37903795
\end{example}
37913796

37923797
\pnum
3793-
\indextext{base class!dependent}%
3794-
A \term{dependent base class} is a base class that is a dependent type and is
3798+
\indextext{dependent base class|see{base class, dependent}}%
3799+
A \defnx{dependent base class}{base class!dependent} is a base class that is a dependent type and is
37953800
not the current instantiation.
37963801
\begin{note}
37973802
A base class can be the current instantiation in the case of a nested class
@@ -3814,9 +3819,9 @@
38143819
\end{note}
38153820

38163821
\pnum
3817-
\indextext{instantiation!member of the current}%
3822+
\indextext{member of the current instantiation|see{instantiation, member of the current}}%
38183823
A name is a
3819-
\term{member of the current instantiation}
3824+
\defnx{member of the current instantiation}{instantiation!member of the current}
38203825
if it is
38213826

38223827
\begin{itemize}
@@ -3869,14 +3874,14 @@
38693874
\end{codeblock}
38703875
\end{example}
38713876

3872-
\indextext{instantiation!dependent member of the current}%
3873-
A name is a \term{dependent member of the current instantiation} if it is a
3877+
\indextext{dependent member of the current instantiation|see{instantiation, dependent member of the current}}%
3878+
A name is a \defnx{dependent member of the current instantiation}{instantiation!dependent member of the current} if it is a
38743879
member of the current instantiation that, when looked up, refers to at least
38753880
one member of a class that is the current instantiation.
38763881

38773882
\pnum
38783883
A name is a
3879-
\term{member of an unknown specialization}
3884+
\defn{member of an unknown specialization}
38803885
if it is
38813886

38823887
\begin{itemize}
@@ -4449,7 +4454,7 @@
44494454
\indextext{specialization!template}%
44504455
The act of instantiating a function, a class, a member of a class template or
44514456
a member template is referred to as
4452-
\term{template instantiation}.
4457+
\defn{template instantiation}.
44534458

44544459
\pnum
44554460
A function instantiated from a function template is called an instantiated
@@ -4802,7 +4807,7 @@
48024807
remain as determined from the context of the definition for the default
48034808
argument.
48044809
This analysis is called
4805-
\term{default argument instantiation}.
4810+
\defn{default argument instantiation}.
48064811
The instantiated default argument is then used as the argument of
48074812
\tcode{f}.
48084813

@@ -6730,17 +6735,16 @@
67306735
\end{itemize}
67316736

67326737
\pnum
6733-
\indextext{more specialized!function template}%
67346738
\indextext{at least as specialized as|see{more specialized}}%
67356739
Function template \tcode{F}
6736-
is \term{at least as specialized as}
6740+
is \defnx{at least as specialized as}{more specialized}
67376741
function template \tcode{G} if,
67386742
for each pair of types used to determine the ordering,
67396743
the type from \tcode{F}
67406744
is at least as specialized as
67416745
the type from \tcode{G}.
67426746
\tcode{F}
6743-
is \term{more specialized than}
6747+
is \defnx{more specialized than}{more specialized!function template}
67446748
\tcode{G} if
67456749
\tcode{F}
67466750
is at least as specialized as
@@ -7048,20 +7052,20 @@
70487052
T&&
70497053
T[@\grammarterm{integer-constant}@]
70507054
@\grammarterm{template-name}@<T> @\textrm{(where \tcode{\grammarterm{template-name}} refers to a class template)}@
7051-
@\term{type}@(T)
7055+
@\placeholder{type}@(T)
70527056
T()
70537057
T(T)
7054-
T @\term{type}@::*
7055-
@\term{type}@ T::*
7058+
T @\placeholder{type}@::*
7059+
@\placeholder{type}@ T::*
70567060
T T::*
7057-
T (@\term{type}@::*)()
7058-
@\term{type}@ (T::*)()
7059-
@\term{type}@ (@\term{type}@::*)(T)
7060-
@\term{type}@ (T::*)(T)
7061-
T (@\term{type}@::*)(T)
7061+
T (@\placeholder{type}@::*)()
7062+
@\placeholder{type}@ (T::*)()
7063+
@\placeholder{type}@ (@\placeholder{type}@::*)(T)
7064+
@\placeholder{type}@ (T::*)(T)
7065+
T (@\placeholder{type}@::*)(T)
70627066
T (T::*)()
70637067
T (T::*)(T)
7064-
@\term{type}@[i]
7068+
@\placeholder{type}@[i]
70657069
@\grammarterm{template-name}@<i> @\textrm{(where \tcode{\grammarterm{template-name}} refers to a class template)}@
70667070
TT<T>
70677071
TT<i>
@@ -7199,13 +7203,13 @@
71997203
is of the form
72007204

72017205
\begin{codeblock}
7202-
@\grammarterm{template-name}@<T> (*)(@\term{type}@[i])
7206+
@\grammarterm{template-name}@<T> (*)(@\placeholder{type}@[i])
72037207
\end{codeblock}
72047208

72057209
which is a variant of
72067210

72077211
\begin{codeblock}
7208-
@\term{type}@ (*)(T)
7212+
@\placeholder{type}@ (*)(T)
72097213
\end{codeblock}
72107214

72117215
where type is

0 commit comments

Comments
 (0)