Skip to content

Commit 62a2d9d

Browse files
jensmaurerzygoloid
authored andcommitted
Fix misuses of \grammarterm.
Thereby also improving the index.
1 parent f8bc9df commit 62a2d9d

File tree

8 files changed

+23
-31
lines changed

8 files changed

+23
-31
lines changed

source/basic.tex

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
\grammarterm{literal-operator-id}~(\ref{over.literal}),
3838
\grammarterm{conversion-function-id}~(\ref{class.conv.fct}), or
3939
\grammarterm{template-id}~(\ref{temp.names}) that denotes an entity or
40-
\grammarterm{label}~(\ref{stmt.goto}, \ref{stmt.label}).
40+
label~(\ref{stmt.goto}, \ref{stmt.label}).
4141

4242
\pnum
4343
Every name that denotes an entity is introduced by a
@@ -3156,8 +3156,7 @@
31563156
\end{itemize}
31573157

31583158
\pnum
3159-
\indextext{safely-derived pointer}%
3160-
A pointer value is a \grammarterm{safely-derived pointer} to a dynamic object only if it
3159+
A pointer value is a \defn{safely-derived pointer} to a dynamic object only if it
31613160
has an object pointer type and it is one of the following:
31623161
\begin{itemize}
31633162
\item the value returned by a call to the \Cpp standard library implementation of
@@ -3191,9 +3190,8 @@
31913190

31923191
\pnum
31933192
\indextext{integer representation}%
3194-
\indextext{safely-derived pointer!integer representation}%
3195-
\indextext{pointer, integer representation of safely-derived}%
3196-
An integer value is an \grammarterm{integer representation of a safely-derived pointer}
3193+
\indextext{pointer!integer representation of safely-derived}%
3194+
An integer value is an \defnx{integer representation of a safely-derived pointer}{safely-derived pointer!integer representation}
31973195
only if its type is at least as large as \tcode{std::intptr_t} and it is one of the
31983196
following:
31993197

@@ -4146,7 +4144,7 @@
41464144

41474145
\pnum
41484146
There is a partial ordering on cv-qualifiers, so that a type can be
4149-
said to be \grammarterm{more cv-qualified} than another.
4147+
said to be \defn{more cv-qualified} than another.
41504148
Table~\ref{tab:relations.on.const.and.volatile} shows the relations that
41514149
constitute this ordering.
41524150

source/classes.tex

Lines changed: 4 additions & 7 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 \defn{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,
@@ -213,14 +212,12 @@
213212
\end{example}
214213

215214
\indextext{struct!standard-layout}%
216-
\indextext{standard-layout struct}%
217215
\indextext{union!standard-layout}%
218-
\indextext{standard-layout union}%
219216
\pnum
220-
A \grammarterm{standard-layout struct} is a standard-layout class
217+
A \defn{standard-layout struct} is a standard-layout class
221218
defined with the \grammarterm{class-key} \tcode{struct} or the
222219
\grammarterm{class-key} \tcode{class}.
223-
A \grammarterm{standard-layout union} is a standard-layout class
220+
A \defn{standard-layout union} is a standard-layout class
224221
defined with the
225222
\grammarterm{class-key} \tcode{union}.
226223

@@ -1328,7 +1325,7 @@
13281325
\pnum
13291326
\indextext{bit-field!unnamed}%
13301327
A declaration for a bit-field that omits the \grammarterm{identifier}
1331-
declares an \grammarterm{unnamed} bit-field. Unnamed bit-fields are not
1328+
declares an \defn{unnamed bit-field}. Unnamed bit-fields are not
13321329
members and cannot be initialized.
13331330
\begin{note}
13341331
An unnamed bit-field is useful for padding to conform to

source/declarators.tex

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@
255255

256256
\pnum
257257
A type can also be named (often more easily) by using a
258-
\grammarterm{typedef}
258+
\tcode{typedef}
259259
(\ref{dcl.typedef}).
260260

261261
\rSec1[dcl.ambig.res]{Ambiguity resolution}%
@@ -2475,9 +2475,8 @@
24752475
\indextext{initialization!default}%
24762476
\indextext{variable!indeterminate uninitialized}%
24772477
\indextext{initialization!zero-initialization}%
2478-
\indextext{zero-initialization}%
24792478
To
2480-
\grammarterm{zero-initialize}
2479+
\defnx{zero-initialize}{zero-initialization}
24812480
an object or reference of type
24822481
\tcode{T}
24832482
means:
@@ -2527,9 +2526,8 @@
25272526
\end{itemize}
25282527

25292528
\pnum
2530-
\indextext{default-initialization}%
25312529
To
2532-
\grammarterm{default-initialize}
2530+
\defnx{default-initialize}{default-initialization}
25332531
an object of type
25342532
\tcode{T}
25352533
means:
@@ -2582,9 +2580,8 @@
25822580
\tcode{T} shall be a const-default-constructible class type or array thereof.
25832581

25842582
\pnum
2585-
\indextext{value-initialization}%
25862583
To
2587-
\defn{value-initialize}
2584+
\defnx{value-initialize}{value-initialization}
25882585
an object of type
25892586
\tcode{T}
25902587
means:
@@ -3738,7 +3735,7 @@
37383735
called the \term{elements} of the initializer list. An initializer list may be empty.
37393736
List-initialization can occur in direct-initialization or copy-initialization contexts;
37403737
list-initialization in a direct-initialization context is called
3741-
\grammarterm{direct-list-initialization} and list-initialization in a
3738+
\defn{direct-list-initialization} and list-initialization in a
37423739
copy-initialization context is called \defn{copy-list-initialization}. \begin{note}
37433740
List-initialization can be used
37443741

source/expressions.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@
370370
If a declaration declares a member function or member function template of a
371371
class \tcode{X}, the expression \tcode{this} is a prvalue of type ``pointer to
372372
\grammarterm{cv-qualifier-seq} \tcode{X}'' between the optional
373-
\grammarterm{cv-qualifer-seq} and the end of the \grammarterm{function-definition},
373+
\grammarterm{cv-qualifier-seq} and the end of the \grammarterm{function-definition},
374374
\grammarterm{member-declarator}, or \grammarterm{declarator}. It shall not appear
375375
before the optional \grammarterm{cv-qualifier-seq} and it shall not appear within
376376
the declaration of a static member function (although its type and value category

source/overloading.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,7 @@
18421842
\term{standard conversion sequence}~(\ref{over.ics.scs}),
18431843
\item
18441844
a
1845-
\grammarterm{user-defined conversion sequence}~(\ref{over.ics.user}), or
1845+
\term{user-defined conversion sequence}~(\ref{over.ics.user}), or
18461846
\item
18471847
an
18481848
\term{ellipsis conversion sequence}~(\ref{over.ics.ellipsis}).

source/statements.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@
392392
required.
393393
\indextext{statement!declaration in \tcode{switch}}%
394394
Declarations can appear in the substatement of a
395-
\grammarterm{switch-statement}.
395+
\tcode{switch} statement.
396396
\end{note}
397397

398398
\pnum

source/support.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2958,7 +2958,7 @@
29582958
defines the type of objects thrown
29592959
as exceptions by the implementation to report the execution of an invalid
29602960
\indextext{cast!dynamic}%
2961-
\grammarterm{dynamic-cast}
2961+
\tcode{dynamic_cast}
29622962
expression~(\ref{expr.dynamic.cast}).
29632963

29642964
\indexlibrary{\idxcode{bad_cast}!constructor}%
@@ -3025,7 +3025,7 @@
30253025
defines the type of objects
30263026
thrown as exceptions by the implementation to report a null pointer
30273027
in a
3028-
\grammarterm{typeid}
3028+
\tcode{typeid}
30293029
expression~(\ref{expr.typeid}).
30303030

30313031
\indexlibrary{\idxcode{bad_typeid}!constructor}%

source/templates.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
in a
379379
\grammarterm{template-parameter}.
380380
A default
381-
\grammarterm{tem\-plate-argument}
381+
\grammarterm{template-argument}
382382
may be specified for any kind of
383383
\grammarterm{template-parameter}
384384
(type, non-type, template)
@@ -868,7 +868,7 @@
868868
In that case the empty
869869
\tcode{<>}
870870
brackets shall still be used as the
871-
\grammarterm{template-argument-list.}
871+
\grammarterm{template-argument-list}.
872872
\begin{example}
873873

874874
\begin{codeblock}
@@ -3556,9 +3556,9 @@
35563556
template parameters (as determined by the template arguments) and this determines
35573557
the context for name lookup for certain names.
35583558
An expressions may be
3559-
\grammarterm{type-dependent}
3559+
\defnx{type-dependent}{expression!type-dependent}
35603560
(that is, its type may depend on a template parameter) or
3561-
\grammarterm{value-dependent}
3561+
\defnx{value-dependent}{expression!value-dependent}
35623562
(that is, its value when evaluated as a constant expression~(\ref{expr.const})
35633563
may depend on a template parameter)
35643564
as described in this subclause.

0 commit comments

Comments
 (0)