forked from timsong-cpp/cppwp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathn4861.patch
11158 lines (10113 loc) · 433 KB
/
n4861.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From 8c64b78f234812820f82613686a845c4a201fb51 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Wed, 5 Dec 2018 01:09:09 +0100
Subject: [PATCH 01/19] Use \range where appropriate.
---
source/strings.tex | 20 ++++++++++----------
source/containers.tex | 34 +++++++++++++++++-----------------
source/algorithms.tex | 6 +++---
source/regex.tex | 2 +-
4 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/source/strings.tex b/source/strings.tex
index f135dfd6..4a58aade 100644
--- a/source/strings.tex
+++ b/source/strings.tex
@@ -137,31 +137,31 @@ [char.traits.require]
whether \tcode{c} is to be treated as less than \tcode{d}. & constant \\ \rowsep
\tcode{X::compare(p,q,n)} & \tcode{int} &
\returns
-\tcode{0} if for each \tcode{i} in \tcode{[0,n)}, \tcode{X::eq(p[i],q[i])}
-is \tcode{true}; else, a negative value if, for some \tcode{j} in \tcode{[0,n)},
-\tcode{X::lt(p[j],q[j])} is \tcode{true} and for each \tcode{i} in \tcode{[0,j)}
+\tcode{0} if for each \tcode{i} in \range{0}{n}, \tcode{X::eq(p[i],q[i])}
+is \tcode{true}; else, a negative value if, for some \tcode{j} in \range{0}{n},
+\tcode{X::lt(p[j],q[j])} is \tcode{true} and for each \tcode{i} in \range{0}{j}
\tcode{X::eq(p[i],q[i])} is \tcode{true}; else a positive value. & linear \\ \rowsep
\tcode{X::length(p)} & \tcode{size_t} &
\returns
the smallest \tcode{i} such that \tcode{X::eq(p[i],charT())} is \tcode{true}. & linear \\ \rowsep
\tcode{X::find(p,n,c)} & \tcode{const X::char_type*} &
\returns
-the smallest \tcode{q} in \tcode{[p,p+n)} such that
+the smallest \tcode{q} in \range{p}{p+n} such that
\tcode{X::eq(*q,c)} is \tcode{true}, zero otherwise. & linear \\ \rowsep
\tcode{X::move(s,p,n)} & \tcode{X::char_type*} &
-for each \tcode{i} in \tcode{[0,n)}, performs \tcode{X::assign(s[i],p[i])}.
-Copies correctly even where the ranges \tcode{[p,p+n)} and \tcode{[s,s+n)} overlap.\br \returns \tcode{s}. & linear \\ \rowsep
+for each \tcode{i} in \range{0}{n}, performs \tcode{X::assign(s[i],p[i])}.
+Copies correctly even where the ranges \range{p}{p+n} and \range{s}{s+n} overlap.\br \returns \tcode{s}. & linear \\ \rowsep
\tcode{X::copy(s,p,n)} & \tcode{X::char_type*} &
\expects
-\tcode{p} not in \tcode{[s,s+n)}. \br
+\tcode{p} not in \range{s}{s+n}. \br
\returns
\tcode{s}.\br
for each \tcode{i} in
-\tcode{[0,n)}, performs \tcode{X::assign(s[i],p[i])}. & linear \\ \rowsep
+\range{0}{n}, performs \tcode{X::assign(s[i],p[i])}. & linear \\ \rowsep
\tcode{X::assign(r,d)} & (not used) &
assigns \tcode{r=d}. & constant \\ \rowsep
\tcode{X::assign\-(s,n,c)} & \tcode{X::char_type*} &
-for each \tcode{i} in \tcode{[0,n)}, performs
+for each \tcode{i} in \range{0}{n}, performs
\tcode{X::assign(s[i],c)}.\br
\returns
\tcode{s}. & linear \\ \rowsep
@@ -2479,7 +2479,7 @@ [string.erase]
\pnum
\effects
Removes the characters in the range
-\tcode{[first, last)}.
+\range{first}{last}.
\pnum
\returns
diff --git a/source/containers.tex b/source/containers.tex
index c01656a9..b1506522 100644
--- a/source/containers.tex
+++ b/source/containers.tex
@@ -800,7 +800,7 @@ [sequence.reqmts]
\tcode{i} and \tcode{j}
denote iterators that meet the \oldconcept{InputIterator} requirements
and refer to elements implicitly convertible to \tcode{value_type},
-\tcode{[i, j)}
+\range{i}{j}
denotes a valid range,
\tcode{il} designates an object of type \tcode{initializer_list<value_type>},
\tcode{n}
@@ -808,7 +808,7 @@ [sequence.reqmts]
\tcode{p} denotes a valid constant iterator to
\tcode{a}, \tcode{q}
denotes a valid dereferenceable constant iterator to
-\tcode{a}, \tcode{[q1, q2)}
+\tcode{a}, \range{q1}{q2}
denotes a valid range of constant iterators in
\tcode{a}, \tcode{t}
denotes an lvalue or a const rvalue of
@@ -1647,7 +1647,7 @@ [associative.reqmts]
\tcode{p} denotes a valid constant iterator to \tcode{a},
\tcode{q} denotes a valid dereferenceable constant iterator to \tcode{a},
\tcode{r} denotes a valid dereferenceable iterator to \tcode{a},
-\tcode{[q1, q2)} denotes a valid range of constant iterators in \tcode{a},
+\range{q1}{q2} denotes a valid range of constant iterators in \tcode{a},
\tcode{il} designates an object of type \tcode{initializer_list<value_type>},
\tcode{t} denotes a value of type \tcode{X::value_type},
\tcode{k} denotes a value of type \tcode{X::key_type}
@@ -1754,9 +1754,9 @@ [associative.reqmts]
&
\expects \tcode{value_type} is \oldconcept{EmplaceConstructible} into \tcode{X} from \tcode{*i}.\br
\effects\ Constructs an empty container and inserts elements from the
- range \tcode{[i, j)} into it; uses \tcode{c} as a comparison object. &
+ range \range{i}{j} into it; uses \tcode{c} as a comparison object. &
$N \log N$ in general, where $N$ has the value \tcode{distance(i, j)};
- linear if \tcode{[i, j)} is sorted with \tcode{value_comp()} \\ \rowsep
+ linear if \range{i}{j} is sorted with \tcode{value_comp()} \\ \rowsep
\tcode{X(i,j)}\br\tcode{X~u(i,j);} &
&
@@ -2324,12 +2324,12 @@ [unord.req]
are both valid and denote types\iref{temp.deduct},
\item \tcode{i} and \tcode{j} denote input iterators
that refer to \tcode{value_type},
-\item \tcode{[i, j)} denotes a valid range,
+\item \range{i}{j} denotes a valid range,
\item \tcode{p} and \tcode{q2} denote valid constant iterators to \tcode{a},
\item \tcode{q} and \tcode{q1} denote
valid dereferenceable constant iterators to \tcode{a},
\item \tcode{r} denotes a valid dereferenceable iterator to \tcode{a},
-\item \tcode{[q1, q2)} denotes a valid range in \tcode{a},
+\item \range{q1}{q2} denotes a valid range in \tcode{a},
\item \tcode{il} denotes a value of type \tcode{initializer_list<value_type>},
\item \tcode{t} denotes a value of type \tcode{X::value_type},
\item \tcode{k} denotes a value of type \tcode{key_type},
@@ -2483,7 +2483,7 @@ [unord.req]
& \expects \tcode{value_type} is \oldconcept{EmplaceConstructible} into \tcode{X} from \tcode{*i}.\br
\effects\ Constructs an empty container with at least \tcode{n} buckets,
using \tcode{hf} as the hash function and \tcode{eq} as the key
-equality predicate, and inserts elements from \tcode{[i, j)} into it.
+equality predicate, and inserts elements from \range{i}{j} into it.
& Average case \bigoh{N} ($N$ is \tcode{distance(i, j)}), worst case
\bigoh{N^2}
\\ \rowsep
@@ -2494,7 +2494,7 @@ [unord.req]
\tcode{value_type} is \oldconcept{EmplaceConstructible} into \tcode{X} from \tcode{*i}.\br
\effects\ Constructs an empty container with at least \tcode{n} buckets,
using \tcode{hf} as the hash function and \tcode{key_equal()} as the key
-equality predicate, and inserts elements from \tcode{[i, j)} into it.
+equality predicate, and inserts elements from \range{i}{j} into it.
& Average case \bigoh{N} ($N$ is \tcode{distance(i, j)}), worst case
\bigoh{N^2}
\\ \rowsep
@@ -2505,7 +2505,7 @@ [unord.req]
\tcode{value_type} is \oldconcept{EmplaceConstructible} into \tcode{X} from \tcode{*i}.\br
\effects\ Constructs an empty container with at least \tcode{n} buckets,
using \tcode{hasher()} as the hash function and \tcode{key_equal()}
-as the key equality predicate, and inserts elements from \tcode{[i, j)}
+as the key equality predicate, and inserts elements from \range{i}{j}
into it.
& Average case \bigoh{N} ($N$ is \tcode{distance(i, j)}), worst case
\bigoh{N^2}
@@ -2518,7 +2518,7 @@ [unord.req]
\effects\ Constructs an empty container with an unspecified number of
buckets, using \tcode{hasher()} as the hash function and
\tcode{key_equal()} as the key equality predicate, and inserts elements
-from \tcode{[i, j)} into it.
+from \range{i}{j} into it.
& Average case \bigoh{N} ($N$ is \tcode{distance(i, j)}), worst case
\bigoh{N^2}
\\ \rowsep
@@ -4746,8 +4746,8 @@ [forwardlist.ops]
\pnum
\effects
-Merges the two sorted ranges \tcode{[begin(), end())} and
-\tcode{[x.begin(), x.end())}. \tcode{x} is empty after the merge. If an
+Merges the two sorted ranges \range{begin()}{end()} and
+\range{x.begin()}{x.end()}. \tcode{x} is empty after the merge. If an
exception is thrown other than by a comparison there are no effects.
Pointers and references to the moved elements of \tcode{x} now refer to those same elements
but as members of \tcode{*this}. Iterators referring to the moved elements will continue to
@@ -5416,7 +5416,7 @@ [list.ops]
\pnum
\complexity
If the range
-\tcode{[first, last)}
+\range{first}{last}
is not empty, exactly
\tcode{(last - first) - 1}
applications of the corresponding predicate,
@@ -5442,8 +5442,8 @@ [list.ops]
\pnum
\effects
-If \tcode{addressof(x) == this}, does nothing; otherwise, merges the two sorted ranges \tcode{[begin(),
-end())} and \tcode{[x.\brk{}begin(), x.end())}. The result is a range in which the elements
+If \tcode{addressof(x) == this}, does nothing; otherwise, merges the two sorted ranges \range{begin()}{end()}
+and \range{x.\brk{}begin()}{x.end()}. The result is a range in which the elements
will be sorted in non-decreasing order according to the ordering defined by \tcode{comp}; that
is, for every iterator \tcode{i}, in the range other than the first, the condition
\tcode{comp(*i, *(i - 1))} will be \tcode{false}.
@@ -5454,7 +5454,7 @@ [list.ops]
\pnum
\remarks
-Stable\iref{algorithm.stable}. If \tcode{addressof(x) != this}, the range \tcode{[x.begin(), x.end())}
+Stable\iref{algorithm.stable}. If \tcode{addressof(x) != this}, the range \range{x.begin()}{x.end()}
is empty after the merge.
No elements are copied by this operation.
diff --git a/source/algorithms.tex b/source/algorithms.tex
index f33175aa..861af6ec 100644
--- a/source/algorithms.tex
+++ b/source/algorithms.tex
@@ -6712,7 +6712,7 @@ [equal.range]
are partitioned with respect to the expressions
\tcode{bool(invoke(comp, invoke(proj, e), value))} and
\tcode{!bool(invoke(comp, value, invoke(proj, e)))}.
-Also, for all elements \tcode{e} of \tcode{[first, last)},
+Also, for all elements \tcode{e} of \range{first}{last},
\tcode{bool(comp(e, value))} implies \tcode{!bool(comp(\brk{}value, e))}
for the overloads in namespace \tcode{std}.
@@ -6776,7 +6776,7 @@ [binary.search]
are partitioned with respect to the expressions
\tcode{bool(invoke(comp, invoke(proj, e), value))} and
\tcode{!bool(invoke(comp, value, invoke(proj, e)))}.
-Also, for all elements \tcode{e} of \tcode{[first, last)},
+Also, for all elements \tcode{e} of \range{first}{last},
\tcode{bool(comp(e, value))} implies \tcode{!bool(comp(\brk{}value, e))}
for the overloads in namespace \tcode{std}.
@@ -9920,7 +9920,7 @@ [adjacent.difference]
\pnum
For the overloads with an \tcode{ExecutionPolicy} and a non-empty range,
performs \tcode{*result = *first}.
-Then, for every \tcode{d} in \tcode{[1, last - first - 1]},
+Then, for every \tcode{d} in \crange{1}{last - first - 1},
performs \tcode{*(result + d) = binary_op(*(first + d), *(first + (d - 1)))}.
\pnum
diff --git a/source/regex.tex b/source/regex.tex
index e47b609b..4b1c53e3 100644
--- a/source/regex.tex
+++ b/source/regex.tex
@@ -3256,7 +3256,7 @@ [re.regiter.incr]
In all cases in which the call to \tcode{regex_search} returns \tcode{true},
\tcode{match.prefix().first} shall be equal to the previous value of
\tcode{match[0].second}, and for each index \tcode{i} in the half-open range
-\tcode{[0, match.size())} for which \tcode{match[i].matched} is \tcode{true},
+\range{0}{match.size()} for which \tcode{match[i].matched} is \tcode{true},
\tcode{match.position(i)}
shall return \tcode{distance(begin, match[i].\brk{}first)}.
--
2.17.1
From 8e778dd7e9bdb1c0b9f9f30b757a51d848208c61 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Fri, 10 Mar 2017 14:45:02 +0100
Subject: [PATCH 02/19] [expr.mptr.oper] Add missing indentation in example
code. [rejected upstream: 1529]
---
source/expressions.tex | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/source/expressions.tex b/source/expressions.tex
index 50e48c1f..69e2287d 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -5627,9 +5627,9 @@ [expr.mptr.oper]
};
void f()
{
-const S cs;
-int S::* pm = &S::i; // \tcode{pm} refers to \tcode{mutable} member \tcode{S::i}
-cs.*pm = 88; // error: \tcode{cs} is a const object
+ const S cs;
+ int S::* pm = &S::i; // \tcode{pm} refers to \tcode{mutable} member \tcode{S::i}
+ cs.*pm = 88; // error: \tcode{cs} is a const object
}
\end{codeblock}
\end{note}
--
2.17.1
From 081404ebc73a611059f8cd18c20ff32b9bbd5ce1 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Sun, 26 Feb 2017 14:24:19 +0100
Subject: [PATCH 03/19] [some.where] Replace \term with \placeholder.
---
source/expressions.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/expressions.tex b/source/expressions.tex
index 69e2287d..5974f469 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -3515,7 +3515,7 @@ [expr.typeid]
\indextext{\idxcode{type_info}}%
\indexlibraryglobal{type_info}%
\tcode{const} \tcode{std::type_info}\iref{type.info} and dynamic type \tcode{const}
-\tcode{std::type_info} or \tcode{const} \term{name} where \term{name} is an
+\tcode{std::type_info} or \tcode{const} \placeholder{name} where \placeholder{name} is an
\impldef{derived type for \tcode{typeid}} class publicly derived from
\tcode{std::type_info} which preserves the behavior described
in~\ref{type.info}.\footnote{The recommended name for such a class is
--
2.17.1
From ade172965bd2a9f67eabd67a6a40eb747f060743 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Wed, 1 Feb 2017 03:39:27 +0100
Subject: [PATCH 04/19] Make references more precise.
---
source/basic.tex | 2 +-
source/statements.tex | 2 +-
source/declarations.tex | 2 +-
source/strings.tex | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/source/basic.tex b/source/basic.tex
index 0f96f782..4acf25bd 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -5110,7 +5110,7 @@ [basic.fundamental]
called \defnx{arithmetic}{type!arithmetic} types.
\indextext{\idxcode{numeric_limits}!specializations for arithmetic types}%
Specializations of the standard library template
-\tcode{std::numeric_limits}\iref{support.limits} shall specify the
+\tcode{std::numeric_limits}\iref{numeric.limits} shall specify the
maximum and minimum values of each arithmetic type for an
implementation.
diff --git a/source/statements.tex b/source/statements.tex
index 98266a4d..d26ffd79 100644
--- a/source/statements.tex
+++ b/source/statements.tex
@@ -1043,7 +1043,7 @@ [stmt.ambig]
of many examples.
\begin{example}
Assuming \tcode{T} is a
-\grammarterm{simple-type-specifier}\iref{dcl.type},
+\grammarterm{simple-type-specifier}\iref{dcl.type.simple},
\begin{codeblock}
T(a)->m = 7; // expression-statement
diff --git a/source/declarations.tex b/source/declarations.tex
index be7d23d0..4aeddae1 100644
--- a/source/declarations.tex
+++ b/source/declarations.tex
@@ -8225,7 +8225,7 @@ [dcl.link]
Linkage specifications nest. When linkage specifications nest, the
innermost one determines the language linkage. A linkage specification
does not establish a scope. A \grammarterm{linkage-specification} shall
-occur only in namespace scope\iref{basic.scope}. In a
+occur only in namespace scope\iref{basic.scope.namespace}. In a
\grammarterm{linkage-specification}, the specified language linkage applies
to the function types of all function declarators, function names with
external linkage, and variable names with external linkage declared
diff --git a/source/strings.tex b/source/strings.tex
index 4a58aade..aa0db595 100644
--- a/source/strings.tex
+++ b/source/strings.tex
@@ -1385,7 +1385,7 @@ [string.cons]
\begin{itemdescr}
\pnum
\effects
-Move assigns as a sequence container\iref{container.requirements},
+Move assigns as a sequence container\iref{sequence.reqmts},
except that iterators, pointers and references may be invalidated.
\pnum
--
2.17.1
From bc7568694f90d4d336a02aec1f16b0a263fe24a2 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Sat, 7 Jan 2017 01:59:05 +0100
Subject: [PATCH 05/19] [rand.req.eng] Omit superfluous dollar-math wrapping
inside \bigoh. [rejected upstream: 1340]
---
source/numerics.tex | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/source/numerics.tex b/source/numerics.tex
index 22ff2390..b0a0a98a 100644
--- a/source/numerics.tex
+++ b/source/numerics.tex
@@ -2290,21 +2290,21 @@ [rand.req.eng]
with the same initial state
as all other default-constructed engines
of type \tcode{E}.
- & \bigoh{$\text{size of state}$}
+ & \bigoh{\text{size of state}}
\\ \rowsep
\tcode{E(x)}
\indextext{copy constructor!random number engine requirement}
&
& Creates an engine
that compares equal to \tcode{x}.
- & \bigoh{$\text{size of state}$}
+ & \bigoh{\text{size of state}}
\\ \rowsep
\tcode{E(s)}%
\indextext{constructor!random number engine requirement}
&
& Creates an engine
with initial state determined by \tcode{s}.
- & \bigoh{$\text{size of state}$}
+ & \bigoh{\text{size of state}}
\\ \rowsep
\tcode{E(q)}%
\indextext{constructor!random number engine requirement}\footnote{ This constructor
@@ -2383,13 +2383,13 @@ [rand.req.eng]
returns \tcode{true}
if $S_x = S_y$;
else returns \tcode{false}.
- & \bigoh{$\text{size of state}$}
+ & \bigoh{\text{size of state}}
\\ \rowsep
\tcode{x != y}%
\indextext{\idxcode{operator"!=}!random number engine requirement}
& \tcode{bool}
& \tcode{!(x == y)}.
- & \bigoh{$\text{size of state}$}
+ & \bigoh{\text{size of state}}
\\ \rowsep
\tcode{os << x}%
\indextext{\idxcode{operator<<}!random number engine requirement}
@@ -2405,7 +2405,7 @@ [rand.req.eng]
by one or more space characters.
\ensures The \tcode{os.}\textit{fmtflags} and fill character are unchanged.
- & \bigoh{$\text{size of state}$}
+ & \bigoh{\text{size of state}}
\\ \rowsep
\tcode{is >> v}%
\indextext{\idxcode{operator>>}!random number engine requirement}
@@ -2436,7 +2436,7 @@ [rand.req.eng]
were respectively the same as those of \tcode{is}.
\ensures The \tcode{is.}\textit{fmtflags} are unchanged.
- & \bigoh{$\text{size of state}$}
+ & \bigoh{\text{size of state}}
\\
\end{libreqtab4d}
--
2.17.1
From 4e4346a13e9440199ec7b83b016f0424dcf2a7e0 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Mon, 23 Jan 2017 06:58:26 +0100
Subject: [PATCH 06/19] Reduce excessive indentation of comments. Helps layout
on smaller (e.g. half-screen) window sizes.
---
source/basic.tex | 30 +++++++++++++++---------------
source/expressions.tex | 18 +++++++++---------
source/templates.tex | 16 ++++++++--------
3 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/source/basic.tex b/source/basic.tex
index 4acf25bd..2c4e3b72 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -241,7 +241,7 @@ [basic.def]
#include <string>
struct C {
- std::string s; // \tcode{std::string} is the standard library class\iref{string.classes}
+ std::string s; // \tcode{std::string} is the standard library class\iref{string.classes}
};
int main() {
@@ -1793,8 +1793,8 @@ [basic.lookup.argdep]
void g() {
N::S s;
- f(s); // OK: calls \tcode{N::f}
- (f)(s); // error: \tcode{N::f} not considered; parentheses prevent argument-dependent lookup
+ f(s); // OK: calls \tcode{N::f}
+ (f)(s); // error: \tcode{N::f} not considered; parentheses prevent argument-dependent lookup
}
\end{codeblock}
\end{example}
@@ -2253,23 +2253,23 @@ [namespace.qual]
void h()
{
- AB::g(); // \tcode{g} is declared directly in \tcode{AB}, therefore \tcode{S} is $\{ \tcode{AB::g()} \}$ and \tcode{AB::g()} is chosen
+ AB::g(); // \tcode{g} is declared directly in \tcode{AB}, therefore \tcode{S} is $\{ \tcode{AB::g()} \}$ and \tcode{AB::g()} is chosen
- AB::f(1); // \tcode{f} is not declared directly in \tcode{AB} so the rules are applied recursively to \tcode{A} and \tcode{B};
- // namespace \tcode{Y} is not searched and \tcode{Y::f(float)} is not considered;
- // \tcode{S} is $\{ \tcode{A::f(int)}, \tcode{B::f(char)} \}$ and overload resolution chooses \tcode{A::f(int)}
+ AB::f(1); // \tcode{f} is not declared directly in \tcode{AB} so the rules are applied recursively to \tcode{A} and \tcode{B};
+ // namespace \tcode{Y} is not searched and \tcode{Y::f(float)} is not considered;
+ // \tcode{S} is $\{ \tcode{A::f(int)}, \tcode{B::f(char)} \}$ and overload resolution chooses \tcode{A::f(int)}
- AB::f('c'); // as above but resolution chooses \tcode{B::f(char)}
+ AB::f('c'); // as above but resolution chooses \tcode{B::f(char)}
- AB::x++; // \tcode{x} is not declared directly in \tcode{AB}, and is not declared in \tcode{A} or \tcode{B}, so the rules
- // are applied recursively to \tcode{Y} and \tcode{Z}, \tcode{S} is $\{ \}$ so the program is ill-formed
+ AB::x++; // \tcode{x} is not declared directly in \tcode{AB}, and is not declared in \tcode{A} or \tcode{B}, so the rules
+ // are applied recursively to \tcode{Y} and \tcode{Z}, \tcode{S} is $\{ \}$ so the program is ill-formed
- AB::i++; // \tcode{i} is not declared directly in \tcode{AB} so the rules are applied recursively to \tcode{A} and \tcode{B},
- // \tcode{S} is $\{ \tcode{A::i}, \tcode{B::i} \}$ so the use is ambiguous and the program is ill-formed
+ AB::i++; // \tcode{i} is not declared directly in \tcode{AB} so the rules are applied recursively to \tcode{A} and \tcode{B},
+ // \tcode{S} is $\{ \tcode{A::i}, \tcode{B::i} \}$ so the use is ambiguous and the program is ill-formed
- AB::h(16.8); // \tcode{h} is not declared directly in \tcode{AB} and not declared directly in \tcode{A} or \tcode{B} so the rules
- // are applied recursively to \tcode{Y} and \tcode{Z}, \tcode{S} is $\{ \tcode{Y::h(int)}, \tcode{Z::h(double)} \}$ and
- // overload resolution chooses \tcode{Z::h(double)}
+ AB::h(16.8); // \tcode{h} is not declared directly in \tcode{AB} and not declared directly in \tcode{A} or \tcode{B} so the rules
+ // are applied recursively to \tcode{Y} and \tcode{Z}, \tcode{S} is $\{ \tcode{Y::h(int)}, \tcode{Z::h(double)} \}$ and
+ // overload resolution chooses \tcode{Z::h(double)}
}
\end{codeblock}
\end{example}
diff --git a/source/expressions.tex b/source/expressions.tex
index 5974f469..475fc87a 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -2171,8 +2171,8 @@ [expr.prim.lambda.capture]
auto m1 = [=]{
int const M = 30;
auto m2 = [i]{
- int x[N][M]; // OK: \tcode{N} and \tcode{M} are not odr-used
- x[0][0] = i; // OK: \tcode{i} is explicitly captured by \tcode{m2} and implicitly captured by \tcode{m1}
+ int x[N][M]; // OK: \tcode{N} and \tcode{M} are not odr-used
+ x[0][0] = i; // OK: \tcode{i} is explicitly captured by \tcode{m2} and implicitly captured by \tcode{m1}
};
};
struct s1 {
@@ -2181,12 +2181,12 @@ [expr.prim.lambda.capture]
int m = n*n;
int j = 40;
auto m3 = [this,m] {
- auto m4 = [&,j] { // error: \tcode{j} not odr-usable due to intervening lambda \tcode{m3}
- int x = n; // error: \tcode{n} is odr-used but not odr-usable due to intervening lambda \tcode{m3}
- x += m; // OK: \tcode{m} implicitly captured by \tcode{m4} and explicitly captured by \tcode{m3}
- x += i; // error: \tcode{i} is odr-used but not odr-usable
- // due to intervening function and class scopes
- x += f; // OK: \tcode{this} captured implicitly by \tcode{m4} and explicitly by \tcode{m3}
+ auto m4 = [&,j] { // error: \tcode{j} not odr-usable due to intervening lambda \tcode{m3}
+ int x = n; // error: \tcode{n} is odr-used but not odr-usable due to intervening lambda \tcode{m3}
+ x += m; // OK: \tcode{m} implicitly captured by \tcode{m4} and explicitly captured by \tcode{m3}
+ x += i; // error: \tcode{i} is odr-used but not odr-usable
+ // due to intervening function and class scopes
+ x += f; // OK: \tcode{this} captured implicitly by \tcode{m4} and explicitly by \tcode{m3}
};
};
}
@@ -2204,7 +2204,7 @@ [expr.prim.lambda.capture]
}
auto g() {
return [] {
- return [*this] { }; // error: \tcode{*this} not captured by outer \grammarterm{lambda-expression}
+ return [*this] { }; // error: \tcode{*this} not captured by outer \grammarterm{lambda-expression}
}();
}
};
diff --git a/source/templates.tex b/source/templates.tex
index 8630072b..318d03b5 100644
--- a/source/templates.tex
+++ b/source/templates.tex
@@ -1403,11 +1403,11 @@ [temp.arg.template]
template <class T1, int N> struct D;
template <class T1, class T2, int N = 17> struct E;
-eval<A<int>> eA; // OK: matches partial specialization of \tcode{eval}
-eval<B<int, float>> eB; // OK: matches partial specialization of \tcode{eval}
-eval<C<17>> eC; // error: \tcode{C} does not match \tcode{TT} in partial specialization
-eval<D<int, 17>> eD; // error: \tcode{D} does not match \tcode{TT} in partial specialization
-eval<E<int, float>> eE; // error: \tcode{E} does not match \tcode{TT} in partial specialization
+eval<A<int>> eA; // OK: matches partial specialization of \tcode{eval}
+eval<B<int, float>> eB; // OK: matches partial specialization of \tcode{eval}
+eval<C<17>> eC; // error: \tcode{C} does not match \tcode{TT} in partial specialization
+eval<D<int, 17>> eD; // error: \tcode{D} does not match \tcode{TT} in partial specialization
+eval<E<int, float>> eE; // error: \tcode{E} does not match \tcode{TT} in partial specialization
\end{codeblock}
\end{example}
\begin{example}
@@ -5301,9 +5301,9 @@ [temp.dep.type]
int g() { return m; } // finds \tcode{A::m} in the template definition context
};
-template int C<B>::f(); // error: finds both \tcode{A::m} and \tcode{B::m}
-template int C<B>::g(); // OK: transformation to class member access syntax
- // does not occur in the template definition context; see~\ref{class.mfct.non-static}
+template int C<B>::f(); // error: finds both \tcode{A::m} and \tcode{B::m}
+template int C<B>::g(); // OK: transformation to class member access syntax
+ // does not occur in the template definition context; see~\ref{class.mfct.non-static}
\end{codeblock}
\end{example}
--
2.17.1
From 0828b655aaadb7867521d4651c89d60d28fe6661 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Wed, 1 Feb 2017 03:24:29 +0100
Subject: [PATCH 07/19] Add and use new link macros.
---
source/macros.tex | 48 ++++
source/intro.tex | 19 +-
source/lex.tex | 40 +--
source/basic.tex | 248 +++++++++----------
source/expressions.tex | 507 ++++++++++++++++++++-------------------
source/statements.tex | 68 +++---
source/declarations.tex | 148 ++++++------
source/classes.tex | 91 ++++---
source/overloading.tex | 98 ++++----
source/templates.tex | 223 ++++++++---------
source/exceptions.tex | 82 ++++---
source/preprocessor.tex | 18 +-
source/lib-intro.tex | 123 +++++-----
source/support.tex | 111 +++++----
source/diagnostics.tex | 8 +-
source/utilities.tex | 346 ++++++++++++++++----------
source/strings.tex | 44 ++--
source/containers.tex | 68 +++---
source/iterators.tex | 30 ++-
source/ranges.tex | 2 +-
source/algorithms.tex | 4 +-
source/numerics.tex | 173 +++++++------
source/locales.tex | 19 +-
source/iostreams.tex | 196 +++++++++------
source/regex.tex | 63 ++---
source/atomics.tex | 8 +-
source/threads.tex | 63 ++---
source/grammar.tex | 8 +-
source/limits.tex | 2 +-
source/compatibility.tex | 14 +-
source/future.tex | 8 +-
31 files changed, 1566 insertions(+), 1314 deletions(-)
diff --git a/source/macros.tex b/source/macros.tex
index 08653422..fdf8ad6a 100644
--- a/source/macros.tex
+++ b/source/macros.tex
@@ -634,3 +634,51 @@ [temp.arg.type]
}
\newcommand{\defncontext}[1]{\textlangle#1\textrangle}
\newenvironment{defnote}{\addtocounter{termnote}{1}\noteintro{Note \thetermnote{} to entry}}{\noteoutro{note}\space}
+
+
+%%-------------------------------------------------
+%% cxxdraft-htmlgen macros
+
+\newcommand{\link}[2]{#1~(#2)}
+ % Link to section.
+ % arg 0: link text
+ % arg 1: section abbreviation
+
+\newcommand{\linkx}[3]{#1~(#3)}
+ % Link to indexed position.
+ % arg 0: link text
+ % arg 1: generalindex key
+ % arg 2: section abbreviation
+
+\newcommand{\liblinkx}[3]{#1~(#3)}
+ % Link to indexed position.
+ % arg 0: link text
+ % arg 1: libraryindex key
+ % arg 2: section abbreviation
+
+\newcommand{\deflinkx}[3]{#1~(#3)}
+ % Link to definition.
+ % arg 0: link text
+ % arg 1: definition key
+ % arg 2: section abbreviation
+
+\newcommand{\deflink}[2]{\deflinkx{#1}{#1}{#2}}
+ % Convenience macro for when the link
+ % text is also the definition key.
+
+\newcommand{\weblink}[2]{#1}
+ % arg 0: link text
+ % arg 1: URL
+
+\newcommand{\indexedspan}[2]{#1#2}
+ % arg 0: text
+ % arg 1: indices (zero or more \index commands)
+
+\newcommand{\libentity}[1]{\indexedspan{\tcode{#1}}{\indexlibrary{\idxcode{#1}}}}
+ % arg 0: entity name
+
+\newcommand{\libmember}[2]{\indexedspan{\tcode{#1}}{\indexlibrarymember{#1}{#2}}}
+ % arg 0: member name
+ % arg 1: parent name
+
+\newenvironment{indexed}[1]{}{}
diff --git a/source/intro.tex b/source/intro.tex
index 60bee58c..9fad326c 100644
--- a/source/intro.tex
+++ b/source/intro.tex
@@ -143,7 +143,7 @@ [intro.defs]
\indexdefn{argument}%
\indexdefn{argument!throw expression}%
\definition{argument}{defns.argument.throw}
-\defncontext{throw expression} operand of \tcode{throw}\iref{expr.throw}
+\defncontext{throw expression} operand of \link{\tcode{throw}}{expr.throw}
\indexdefn{argument}%
\indexdefn{argument!template instantiation}%
@@ -186,10 +186,11 @@ [intro.defs]
glvalue refers
\begin{example}
-If a pointer\iref{dcl.ptr} \tcode{p} whose static type is ``pointer to
-class \tcode{B}'' is pointing to an object of class \tcode{D}, derived
-from \tcode{B}\iref{class.derived}, the dynamic type of the
-expression \tcode{*p} is ``\tcode{D}''. References\iref{dcl.ref} are
+If a \link{pointer}{dcl.ptr} \tcode{p} whose static type is ``pointer to
+class \tcode{B}'' is pointing to an object of class \tcode{D},
+\link{derived}{class.derived}
+from \tcode{B}, the dynamic type of the
+expression \tcode{*p} is ``\tcode{D}''. \link{References}{dcl.ref} are
treated similarly.
\end{example}
@@ -199,7 +200,7 @@ [intro.defs]
\indexdefn{program!ill-formed}%
\definition{ill-formed program}{defns.ill.formed}
-program that is not well-formed\iref{defns.well.formed}
+program that is not \link{well-formed}{defns.well.formed}
\indexdefn{behavior!implementation-defined}%
\definition{implementation-defined behavior}{defns.impl.defined}
@@ -371,7 +372,7 @@ [intro.defs]
\indexdefn{program!well-formed}%
\definition{well-formed program}{defns.well.formed}
\Cpp{} program constructed according to the syntax rules, diagnosable
-semantic rules, and the one-definition rule\iref{basic.def.odr}%
+semantic rules, and the \link{one-definition rule}{basic.def.odr}%
\indextext{definitions|)}
\rSec0[intro]{General principles}
@@ -446,7 +447,7 @@ [intro.compliance]
\indextext{conformance requirements!classes}%
\indextext{conformance requirements!class templates}%
For classes and class templates, the library Clauses specify partial
-definitions. Private members\iref{class.access} are not
+definitions. \link{Private members}{class.access} are not
specified, but each implementation shall supply them to complete the
definitions according to the description in the library Clauses.
@@ -464,7 +465,7 @@ [intro.compliance]
\pnum
The templates, classes, functions, and objects in the library have
-external linkage\iref{basic.link}. The implementation provides
+external \link{linkage}{basic.link}. The implementation provides
definitions for standard library entities, as necessary, while combining
translation units to form a complete \Cpp{} program\iref{lex.phases}.%
\indextext{conformance requirements!library|)}
diff --git a/source/lex.tex b/source/lex.tex
index 6fa15f85..cfe3a010 100644
--- a/source/lex.tex
+++ b/source/lex.tex
@@ -29,10 +29,10 @@ [lex.separate]
\indextext{compilation!separate|(}%
The text of the program is kept in units called
\defnx{source files}{source file} in this document.
-A source file together with all the headers\iref{headers}
-and source files included\iref{cpp.include} via the preprocessing
+A source file together with all the \link{headers}{headers}
+and source files \link{included}{cpp.include} via the preprocessing
directive \tcode{\#include}, less any source lines skipped by any of the
-conditional inclusion\iref{cpp.cond} preprocessing directives, is
+\link{conditional inclusion}{cpp.cond} preprocessing directives, is
called a \defn{translation unit}.
\begin{note}
A \Cpp{} program need not all be translated at the same time.
@@ -47,8 +47,8 @@ [lex.separate]
calls to functions whose identifiers have external or module linkage,
manipulation of objects whose identifiers have external or module linkage, or
manipulation of data files. Translation units can be separately
-translated and then later linked to produce an executable
-program\iref{basic.link}.
+translated and then later \link{linked}{basic.link} to produce an executable
+program.
\end{note}
\indextext{compilation!separate|)}
@@ -71,8 +71,8 @@ [lex.phases]
The set of physical source file characters accepted is \impldef{physical source file
characters}.
Any
-source file character not in the basic source character
-set\iref{lex.charset} is replaced by the
+source file character not in the
+\deflink{basic source character set}{lex.charset} is replaced by the
\indextext{universal character name}\grammarterm{universal-character-name} that
designates that character. An implementation may use any internal
encoding, so long as an actual extended character encountered in the
@@ -97,8 +97,8 @@ [lex.phases]
shall be processed as if an additional new-line character were appended
to the file.
-\item The source file is decomposed into preprocessing
-tokens\iref{lex.pptoken} and sequences of white-space characters
+\item The source file is decomposed into \link{preprocessing
+tokens}{lex.pptoken} and sequences of white-space characters
(including comments). A source file shall not end in a partial
preprocessing token or in a partial comment.\footnote{A partial preprocessing
token would arise from a source file
@@ -121,8 +121,8 @@ [lex.phases]
\item Preprocessing directives are executed, macro invocations are
expanded, and \tcode{_Pragma} unary operator expressions are executed.
If a character sequence that matches the syntax of a
-\grammarterm{universal-character-name} is produced by token
-concatenation\iref{cpp.concat}, the behavior is undefined. A
+\grammarterm{universal-character-name} is produced by \link{token
+concatenation}{cpp.concat}, the behavior is undefined. A
\tcode{\#include} preprocessing directive causes the named header or
source file to be processed from phase 1 through phase 4, recursively.
All preprocessing directives are then deleted.
@@ -311,7 +311,7 @@ [lex.pptoken]
\end{bnf}
\pnum
-Each preprocessing token that is converted to a token\iref{lex.token}
+Each preprocessing token that is converted to a \link{token}{lex.token}
shall have the lexical form of a keyword, an identifier, a literal,
or an operator or punctuator.
@@ -329,7 +329,7 @@ [lex.pptoken]
\indextext{space!white}%
white space;
\indextext{comment}%
-this consists of comments\iref{lex.comment}, or white-space
+this consists of \link{comments}{lex.comment}, or white-space
characters (space, horizontal tab, new-line, vertical tab, and
form-feed), or both. As described in \ref{cpp}, in certain
circumstances during translation phase 4, white space (or the absence
@@ -432,7 +432,7 @@ [lex.digraph]
\pnum
In all respects of the language, each alternative token behaves the
-same, respectively, as its primary token, except for its spelling.\footnote{Thus the ``stringized'' values\iref{cpp.stringize} of
+same, respectively, as its primary token, except for its spelling.\footnote{Thus the \link{``stringized''}{cpp.stringize} values of
\tcode{[} and \tcode{<:} will be different, maintaining the source
spelling, but the tokens can otherwise be freely interchanged. }
The set of alternative tokens is defined in
@@ -914,7 +914,7 @@ [lex.operators]
\end{bnf}
Each \grammarterm{operator-or-punctuator} is converted to a single token
-in translation phase 7\iref{lex.phases}.%
+in \link{translation phase 7}{lex.phases}.%
\indextext{punctuator|)}%
\indextext{operator|)}
@@ -1894,12 +1894,12 @@ [lex.ext]
characters that could match that non-terminal.
\pnum
-A \grammarterm{user-defined-literal} is treated as a call to a literal operator or
-literal operator template\iref{over.literal}. To determine the form of this call for a
+A \grammarterm{user-defined-literal} is treated as a call to a \deflink{literal operator}{over.literal} or
+\deflink{literal operator template}{over.literal}. To determine the form of this call for a
given \grammarterm{user-defined-literal} \placeholder{L} with \grammarterm{ud-suffix} \placeholder{X},
the \grammarterm{literal-operator-id} whose literal suffix identifier is \placeholder{X} is
-looked up in the context of \placeholder{L} using the rules for unqualified name
-lookup\iref{basic.lookup.unqual}. Let \placeholder{S} be the set of declarations found by
+looked up in the context of \placeholder{L} using the rules for \link{unqualified name
+lookup}{basic.lookup.unqual}. Let \placeholder{S} be the set of declarations found by
this lookup. \placeholder{S} shall not be empty.
\pnum
@@ -1974,7 +1974,7 @@ [lex.ext]
\pnum
If \placeholder{L} is a \grammarterm{user-defined-character-literal}, let \placeholder{ch} be the
literal without its \grammarterm{ud-suffix}.
-\placeholder{S} shall contain a literal operator\iref{over.literal} whose only parameter has
+\placeholder{S} shall contain a \deflink{literal operator}{over.literal} whose only parameter has
the type of \placeholder{ch} and the
literal \placeholder{L} is treated as a call
of the form
diff --git a/source/basic.tex b/source/basic.tex
index 2c4e3b72..dbad08ce 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -50,7 +50,7 @@ [basic.pre]
\pnum
Every name that denotes an entity is introduced by a
\defn{declaration}. Every name that denotes a label is introduced
-either by a \tcode{goto} statement\iref{stmt.goto} or a
+either by a \link{\tcode{goto} statement}{stmt.goto} or a
\grammarterm{labeled-statement}\iref{stmt.label}.
\pnum
@@ -61,10 +61,10 @@ [basic.pre]
\pnum
A \defnadj{local}{entity} is a variable with
-automatic storage duration\iref{basic.stc.auto},
-a structured binding\iref{dcl.struct.bind}
+\link{automatic storage duration}{basic.stc.auto},
+a \link{structured binding}{dcl.struct.bind}
whose corresponding variable is such an entity,
-or the \tcode{*this} object\iref{expr.prim.this}.
+or the \link{\tcode{*this} object}{expr.prim.this}.
\pnum
Some names denote types or templates. In general,
@@ -92,7 +92,7 @@ [basic.pre]
\indextext{linkage}%
A name used in more than one translation unit can potentially
refer to the same entity in these translation units depending on the
-linkage\iref{basic.link} of the name specified in each
+\link{linkage}{basic.link} of the name specified in each
translation unit.
\rSec1[basic.def]{Declarations and definitions}
@@ -101,7 +101,7 @@ [basic.def]
\indextext{declaration!definition versus}%
\indextext{declaration}%
\indextext{declaration!name}%
-A declaration\iref{dcl.dcl} may introduce
+A \link{declaration}{dcl.dcl} may introduce
one or more names into a translation
unit or redeclare names introduced by previous declarations.
If so, the
@@ -111,7 +111,7 @@ [basic.def]
\item a static assertion\iref{dcl.pre},
\item controlling template instantiation\iref{temp.explicit},
\item guiding template argument deduction for constructors\iref{temp.deduct.guide},
-\item use of attributes\iref{dcl.attr}, and
+\item use of \link{attributes}{dcl.attr}, and
\item nothing (in the case of an \grammarterm{empty-declaration}).
\end{itemize}
@@ -128,7 +128,7 @@ [basic.def]
it contains
the
\indextext{declaration!\idxcode{extern}}%
-\tcode{extern} specifier\iref{dcl.stc} or a
+\linkx{\tcode{extern}}{\idxcode{extern}}{dcl.stc} specifier or a
\grammarterm{linkage-specification}\footnote{Appearing inside the brace-enclosed
\grammarterm{declaration-seq} in a \grammarterm{linkage-specification} does
not affect whether a declaration is a definition.}\iref{dcl.link}
@@ -163,7 +163,7 @@ [basic.def]
\item
it is a
\indextext{declaration!\idxcode{typedef}}%
-\tcode{typedef} declaration\iref{dcl.typedef},
+\link{\tcode{typedef}}{dcl.typedef} declaration,
\item it is
an \grammarterm{alias-declaration}\iref{dcl.typedef},
\item it is
@@ -191,7 +191,7 @@ [basic.def]
\item it is
an explicit instantiation declaration\iref{temp.explicit}, or
\item it is
-an explicit specialization\iref{temp.expl.spec} whose
+an \link{explicit specialization}{temp.expl.spec} whose
\grammarterm{declaration} is not a definition.
\end{itemize}
A declaration is said to be a \defn{definition} of each entity that it defines.
@@ -233,7 +233,7 @@ [basic.def]
default constructor\iref{class.default.ctor},
copy constructor, move constructor\iref{class.copy.ctor},
copy assignment operator, move assignment operator\iref{class.copy.assign},
-or destructor\iref{class.dtor} member functions.
+or \link{destructor}{class.dtor} member functions.
\end{note}
\begin{example}
Given
@@ -278,7 +278,7 @@ [basic.def]
In the definition of an object,
the type of that object shall not be
an incomplete type\iref{basic.types},
-an abstract class type\iref{class.abstract}, or
+an \link{abstract class type}{class.abstract}, or
a (possibly multi-dimensional) array thereof.
\indextext{object!definition}%
@@ -434,8 +434,8 @@ [basic.def.odr]
copy-assignment or move-assignment function for another class as specified
in~\ref{class.copy.assign}.
A constructor for a class is odr-used as specified
-in~\ref{dcl.init}. A destructor for a class is odr-used if it is potentially
-invoked\iref{class.dtor}.
+in~\ref{dcl.init}. A destructor for a class is odr-used if it is
+\deflink{potentially invoked}{class.dtor}.
\pnum
A local entity\iref{basic.pre}
@@ -482,7 +482,7 @@ [basic.def.odr]
\pnum
Every program shall contain exactly one definition of every non-inline