Skip to content

Commit c311f6d

Browse files
jensmaurertkoeppe
authored andcommitted
[index] Do not index examples (#1979)
1 parent 9355f5d commit c311f6d

File tree

7 files changed

+1
-51
lines changed

7 files changed

+1
-51
lines changed

source/access.tex

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,6 @@
586586
The following example illustrates the differences between
587587
members and friends:
588588
\indextext{friend function!member function and}%
589-
\indextext{example!friend function}%
590-
\indextext{example!member function}%
591589

592590
\begin{codeblock}
593591
class X {
@@ -963,8 +961,6 @@
963961
The members of an enclosing class have no special access to members of a nested
964962
class; the usual access rules\iref{class.access} shall be obeyed.
965963
\begin{example}
966-
\indextext{example!nested class definition}%
967-
968964
\begin{codeblock}
969965
class E {
970966
int x;

source/basic.tex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@
183183
\end{itemize}
184184
A declaration is said to be a \defn{definition} of each entity that it defines.
185185
\begin{example} All but one of the following are definitions:
186-
\indextext{example!definition}%
187186
\begin{codeblock}
188187
int a; // defines \tcode{a}
189188
extern const int c = 1; // defines \tcode{c}
@@ -202,7 +201,6 @@
202201

203202
\end{codeblock}
204203
whereas these are just declarations:
205-
\indextext{example!declaration}%
206204
\begin{codeblock}
207205
extern int a; // declares \tcode{a}
208206
extern const int c; // declares \tcode{c}

source/classes.tex

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@
364364
\end{example}
365365
\begin{note}
366366
Such declarations allow definition of classes that refer to each other.
367-
\indextext{example!friend}%
368367
\begin{example}
369368
\begin{codeblock}
370369
class Vector;
@@ -673,7 +672,6 @@
673672
\end{note}
674673

675674
\pnum
676-
\indextext{example!class definition}%
677675
\begin{example}
678676
A simple example of a class definition is
679677

@@ -971,7 +969,6 @@
971969
\grammarterm{nested-name-specifier} names the class of the member function.
972970
These transformations do not apply in the
973971
template definition context\iref{temp.dep.type}.
974-
\indextext{example!member function}%
975972
\begin{example}
976973

977974
\begin{codeblock}
@@ -1236,7 +1233,6 @@
12361233
operator. The \grammarterm{initializer} expression in the definition of a
12371234
static data member is in the scope of its
12381235
class\iref{basic.scope.class}.
1239-
\indextext{example!static member}%
12401236
\begin{example}
12411237

12421238
\begin{codeblock}
@@ -1420,9 +1416,7 @@
14201416
members and non-static member functions.
14211417
\end{note}
14221418

1423-
\indextext{example!nested class}%
14241419
\begin{example}
1425-
14261420
\begin{codeblock}
14271421
int x;
14281422
int y;
@@ -1452,9 +1446,7 @@
14521446
\pnum
14531447
Member functions and static data members of a nested class can be
14541448
defined in a namespace scope enclosing the definition of their class.
1455-
\indextext{example!nested class definition}%
14561449
\begin{example}
1457-
14581450
\begin{codeblock}
14591451
struct enclose {
14601452
struct inner {
@@ -1474,9 +1466,7 @@
14741466
\tcode{Y} may be declared in class \tcode{X} and later defined in the
14751467
definition of class \tcode{X} or be later defined in a namespace scope
14761468
enclosing the definition of class \tcode{X}.
1477-
\indextext{example!nested class forward declaration}%
14781469
\begin{example}
1479-
14801470
\begin{codeblock}
14811471
class E {
14821472
class I1; // forward declaration of nested class
@@ -1504,8 +1494,6 @@
15041494
particular, type names defined within a class definition cannot be used
15051495
outside their class without qualification.
15061496
\begin{example}
1507-
1508-
\indextext{example!nested type name}%
15091497
\begin{codeblock}
15101498
struct X {
15111499
typedef int I;
@@ -1794,7 +1782,6 @@
17941782
enclosing scope.
17951783
\end{note}
17961784
\begin{example}
1797-
\indextext{example!local class}%
17981785
\begin{codeblock}
17991786
int x;
18001787
void f() {

source/declarations.tex

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@
414414
the same linkage. Each function in a given set of overloaded functions
415415
can have a different linkage, however.
416416
\begin{example}
417-
\indextext{example!linkage consistency}%
418417
\begin{codeblock}
419418
static char* f(); // \tcode{f()} has internal linkage
420419
char* f() // \tcode{f()} still has internal linkage
@@ -549,7 +548,6 @@
549548
\grammarterm{typedef-name} does not introduce a new type the way a class
550549
declaration\iref{class.name} or enum declaration does.
551550
\begin{example}
552-
\indextext{example!\idxcode{typedef}}%
553551
After
554552

555553
\begin{codeblock}
@@ -2145,7 +2143,6 @@
21452143
The value of an enumerator or an object of an unscoped enumeration type is
21462144
converted to an integer by integral promotion\iref{conv.prom}.
21472145
\begin{example}
2148-
\indextext{example!enumeration}%
21492146
\begin{codeblock}
21502147
enum color { red, yellow, green=20, blue };
21512148
color col = red;

source/declarators.tex

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,6 @@
255255
The named type is then the same as the type of the
256256
hypothetical identifier.
257257
\begin{example}
258-
\indextext{example!type name}%
259-
\indextext{example!declarator}%
260258
\begin{codeblock}
261259
int // \tcode{int i}
262260
int * // \tcode{int *pi}
@@ -567,8 +565,6 @@
567565
\pnum
568566
\begin{example}
569567
The declarations
570-
\indextext{example!\idxcode{const}}%
571-
\indextext{example!constant pointer}%
572568
\begin{codeblock}
573569
const int ci = 10, *pc = &ci, *const cpc = pc, **ppc;
574570
int i, *p, *const cp = &i;
@@ -870,9 +866,7 @@
870866
pointer-to-member.
871867

872868
\pnum
873-
\begin{example}%
874-
\indextext{example!pointer-to-member}
875-
869+
\begin{example}
876870
\begin{codeblock}
877871
struct X {
878872
void f(int);
@@ -1091,7 +1085,6 @@
10911085

10921086
\pnum
10931087
\begin{example}
1094-
\indextext{example!array}%
10951088
\begin{codeblock}
10961089
float fa[17], *afp[17];
10971090
\end{codeblock}
@@ -1120,7 +1113,6 @@
11201113
\tcode{x3d[i][j]},
11211114
\tcode{x3d[i][j][k]}
11221115
can reasonably appear in an expression.
1123-
\indextext{example!subscripting}%
11241116
The expression
11251117
\tcode{x3d[i]}
11261118
is equivalent to
@@ -1364,8 +1356,6 @@
13641356
is synonymous with
13651357
``\tcode{...}''.
13661358
\begin{example}
1367-
\indextext{example!ellipsis}%
1368-
\indextext{example!variable parameter list}%
13691359
The declaration
13701360

13711361
\begin{codeblock}
@@ -1482,7 +1472,6 @@
14821472

14831473
\pnum
14841474
\begin{example}
1485-
\indextext{example!function declaration}%
14861475
The declaration
14871476

14881477
\begin{codeblock}
@@ -1548,7 +1537,6 @@
15481537
\begin{example}
15491538
The declaration
15501539

1551-
\indextext{example!declaration}%
15521540
\begin{codeblock}
15531541
int i,
15541542
*pi,
@@ -2020,7 +2008,6 @@
20202008
\begin{example}
20212009
A simple example of a complete function definition is
20222010

2023-
\indextext{example!function definition}%
20242011
\begin{codeblock}
20252012
int max(int a, int b, int c) {
20262013
int m = (a > b) ? a : b;
@@ -2064,7 +2051,6 @@
20642051
Unused parameters need not be named.
20652052
For example,
20662053

2067-
\indextext{example!unnamed parameter}%
20682054
\begin{codeblock}
20692055
void print(int a, int) {
20702056
std::printf("a = %d\n",a);

source/derived.tex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
\term{base class subobjects} contained in an
105105
object of the derived class type.
106106
\begin{example}
107-
\indextext{example!derived class}%
108107
\begin{codeblock}
109108
struct Base {
110109
int a, b, c;
@@ -421,8 +420,6 @@
421420
If the name of an overloaded function is unambiguously found,
422421
overload resolution\iref{over.match} also takes place before access
423422
control.
424-
\indextext{example!scope resolution operator}%
425-
\indextext{example!explicit qualification}%
426423
\indextext{overloading!resolution!scoping ambiguity}%
427424
Ambiguities can often be resolved by qualifying a name with its class name.
428425
\begin{example}
@@ -733,7 +730,6 @@
733730
the type returned by the (statically chosen) overridden
734731
function\iref{expr.call}.
735732
\begin{example}
736-
\indextext{example!virtual function}%
737733
\begin{codeblock}
738734
class B { };
739735
class D : private B { friend class Derived; };
@@ -807,7 +803,6 @@
807803
\indextext{multiple inheritance!\tcode{virtual} and}%
808804
\begin{example}
809805
Here are some uses of virtual functions with multiple base classes:
810-
\indextext{example!virtual function}%
811806
\begin{codeblock}
812807
struct A {
813808
virtual void f();
@@ -942,7 +937,6 @@
942937
with\iref{class.dtor}, the \grammarterm{qualified-id}
943938
syntax\iref{expr.prim}.
944939
\begin{example}
945-
\indextext{example!pure virtual function}%
946940
\begin{codeblock}
947941
class point { @\commentellip@ };
948942
class shape { // abstract class

source/special.tex

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,6 @@
298298
The syntax looks like an explicit call of the constructor.
299299
\end{note}
300300
\begin{example}
301-
\indextext{example!constructor}%
302-
303301
\begin{codeblock}
304302
complex zz = complex(1,2.3);
305303
cprint( complex(7.8,1.2) );
@@ -1271,7 +1269,6 @@
12711269
to cope with dedicated hardware resources and for writing memory management
12721270
facilities.
12731271
For example,
1274-
\indextext{example!explicit destructor call}%
12751272
\begin{codeblock}
12761273
void* operator new(std::size_t, void* p) { return p; }
12771274
struct X {
@@ -1387,9 +1384,7 @@
13871384
\tcode{X}
13881385
is a static member (even if not explicitly declared
13891386
\tcode{static}).
1390-
\indextext{example!\idxcode{delete}}%
13911387
\begin{example}
1392-
13931388
\begin{codeblock}
13941389
class X {
13951390
void operator delete(void*);
@@ -1408,8 +1403,6 @@
14081403
\tcode{static}
14091404
they cannot be virtual.
14101405
\begin{note}
1411-
\indextext{example!destructor and \tcode{delete}}%
1412-
\indextext{example!scope of \tcode{delete}}%
14131406
However, when the
14141407
\grammarterm{cast-expression}
14151408
of a
@@ -1531,7 +1524,6 @@
15311524
form of initialization.
15321525
Either direct-initialization semantics or copy-initialization semantics apply;
15331526
see~\ref{dcl.init}.
1534-
\indextext{example!constructor and initialization}%
15351527
\begin{example}
15361528
\begin{codeblock}
15371529
struct complex {

0 commit comments

Comments
 (0)