-
Notifications
You must be signed in to change notification settings - Fork 27
/
n4950.patch
10424 lines (9714 loc) · 394 KB
/
n4950.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 acf9a8298f4562d59c2eef22d037365503bbbe68 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Sun, 4 Oct 2020 05:12:13 +0200
Subject: [PATCH 01/21] Use \defnadj more.
---
source/lex.tex | 1 -
source/basic.tex | 3 +--
source/statements.tex | 3 +--
source/classes.tex | 3 +--
4 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/source/lex.tex b/source/lex.tex
index a253a50b..5963cdcf 100644
--- a/source/lex.tex
+++ b/source/lex.tex
@@ -19,7 +19,6 @@ [lex]
\indextext{pointer literal|see{literal, pointer}}
\indextext{user-defined literal|see{literal, user-defined}}
\indextext{file, source|see{source file}}
-\indextext{null character|see{character, null}}
\indextext{null wide character|see{wide-character, null}}
\rSec1[lex.separate]{Separate translation}
diff --git a/source/basic.tex b/source/basic.tex
index e7d171d6..521d42c5 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -3756,7 +3756,6 @@ [basic.stc.general]
\rSec3[basic.stc.static]{Static storage duration}
\pnum
-\indextext{storage duration!static}%
All variables which
\begin{itemize}
\item
@@ -3766,7 +3765,7 @@ [basic.stc.static]
are first declared with
the \keyword{static} or \keyword{extern} keywords\iref{dcl.stc}
\end{itemize}
-have \defn{static storage duration}.
+have \defnadj{static}{storage duration}.
The storage for these entities lasts for the duration of the
program\iref{basic.start.static,basic.start.term}.
diff --git a/source/statements.tex b/source/statements.tex
index aa9ae2bb..9eb08406 100644
--- a/source/statements.tex
+++ b/source/statements.tex
@@ -187,10 +187,9 @@ [stmt.expr]
\indextext{side effects}%
side effects from an expression statement
are completed before the next statement is executed.
-\indextext{statement!null}%
\indextext{statement!empty}%
An expression statement with the expression missing is called
-a \defn{null statement}.
+a \defnadj{null}{statement}.
\begin{note}
Most statements are expression statements --- usually assignments or
function calls. A null statement is useful to supply a null body to an
diff --git a/source/classes.tex b/source/classes.tex
index c1756861..0edcc6b7 100644
--- a/source/classes.tex
+++ b/source/classes.tex
@@ -2795,9 +2795,8 @@ [class.bit]
\end{note}
\pnum
-\indextext{bit-field!unnamed}%
A declaration for a bit-field that omits the \grammarterm{identifier}
-declares an \defn{unnamed bit-field}. Unnamed bit-fields are not
+declares an \defnadj{unnamed}{bit-field}. Unnamed bit-fields are not
members and cannot be initialized.
An unnamed bit-field shall not be declared with a cv-qualified type.
\begin{note}
--
2.25.1
From b7ec4c049d3aec43053ea949650e4e91c4cc209f Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Sun, 4 Oct 2020 04:26:58 +0200
Subject: [PATCH 02/21] [dcl.spec.auto] Add index entry for 'placeholder type'.
---
source/declarations.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/declarations.tex b/source/declarations.tex
index fed6acc5..f07b1396 100644
--- a/source/declarations.tex
+++ b/source/declarations.tex
@@ -1624,7 +1624,7 @@ [dcl.spec.auto.general]
\pnum
A \grammarterm{placeholder-type-specifier}
-designates a placeholder type that will be replaced later by deduction
+designates a \defnadj{placeholder}{type} that will be replaced later by deduction
from an initializer.
\pnum
--
2.25.1
From 97c6891bc95947ce1b94405bec76eda53acee858 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 03/21] Use \range where appropriate.
---
source/strings.tex | 8 ++++----
source/algorithms.tex | 6 +++---
source/regex.tex | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/source/strings.tex b/source/strings.tex
index 66fc8b20..26c298f3 100644
--- a/source/strings.tex
+++ b/source/strings.tex
@@ -153,19 +153,19 @@ [char.traits.require]
the smallest \tcode{q} in \tcode{[p,p+n)} such that
\tcode{X::eq(*q,c)} is \tcode{true}, \tcode{nullptr} 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
The ranges \range{p}{p+n} and \range{s}{s+n} do not overlap.\par
\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
diff --git a/source/algorithms.tex b/source/algorithms.tex
index b6a4acd7..448ffe21 100644
--- a/source/algorithms.tex
+++ b/source/algorithms.tex
@@ -7322,7 +7322,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}.
@@ -7386,7 +7386,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}.
@@ -10559,7 +10559,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 dcd432b3..6fc3b5a0 100644
--- a/source/regex.tex
+++ b/source/regex.tex
@@ -3426,7 +3426,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.25.1
From 6e0ba52d66283c83796baf10daf6f588b33dc625 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 04/21] [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 8026d159..c4beb4c0 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -3826,7 +3826,7 @@ [expr.typeid]
\indextext{\idxcode{type_info}}%
\indexlibraryglobal{type_info}%
\keyword{const} \tcode{std::type_info}\iref{type.info} and dynamic type \keyword{const}
-\tcode{std::type_info} or \keyword{const} \term{name} where \term{name} is an
+\tcode{std::type_info} or \keyword{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}.
--
2.25.1
From 5d1a6ea83a504f12729d7f2bc517d3fe47f9eee3 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 05/21] Make references more precise.
---
source/statements.tex | 2 +-
source/strings.tex | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/statements.tex b/source/statements.tex
index 9eb08406..d635f1a6 100644
--- a/source/statements.tex
+++ b/source/statements.tex
@@ -1092,7 +1092,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/strings.tex b/source/strings.tex
index 26c298f3..9adcd211 100644
--- a/source/strings.tex
+++ b/source/strings.tex
@@ -2725,7 +2725,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.25.1
From 1fbc6951f68fe063be355ee1050e3fc82f34c7a6 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 06/21] [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 785bb29f..9f2ebe47 100644
--- a/source/numerics.tex
+++ b/source/numerics.tex
@@ -1832,19 +1832,19 @@ [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)}
&
& Creates an engine
that compares equal to \tcode{x}.
- & \bigoh{$\text{size of state}$}
+ & \bigoh{\text{size of state}}
\\ \rowsep
\tcode{E(s)}%
&
& Creates an engine
with initial state determined by \tcode{s}.
- & \bigoh{$\text{size of state}$}
+ & \bigoh{\text{size of state}}
\\ \rowsep
\tcode{E(q)}%
\begin{footnote}
@@ -1919,12 +1919,12 @@ [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}%
& \tcode{bool}
& \tcode{!(x == y)}.
- & \bigoh{$\text{size of state}$}
+ & \bigoh{\text{size of state}}
\\ \rowsep
\tcode{os << x}%
& reference to the type of \tcode{os}
@@ -1939,7 +1939,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}%
& reference to the type of \tcode{is}
@@ -1969,7 +1969,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.25.1
From b4c4aee5d9f0682b0c3ede28afdf0b0d8d3d4755 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 07/21] Reduce excessive indentation of comments. Helps layout
on smaller (e.g. half-screen) window sizes.
---
source/basic.tex | 26 +++++++++++++-------------
source/expressions.tex | 2 +-
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/source/basic.tex b/source/basic.tex
index 521d42c5..969f9cd8 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -282,7 +282,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() {
@@ -2382,23 +2382,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 c4beb4c0..c17a1d20 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -2482,7 +2482,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}
}();
}
};
--
2.25.1
From 8ee70e9ada56b1fc83189fa2cc64942b4d33a54a 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 08/21] Use new link macros.
---
source/intro.tex | 19 ++-
source/lex.tex | 16 +-
source/basic.tex | 129 +++++++-------
source/expressions.tex | 354 ++++++++++++++++++++-------------------
source/statements.tex | 32 ++--
source/declarations.tex | 69 ++++----
source/classes.tex | 28 ++--
source/overloading.tex | 70 ++++----
source/templates.tex | 143 ++++++++--------
source/exceptions.tex | 46 ++---
source/preprocessor.tex | 14 +-
source/lib-intro.tex | 79 ++++-----
source/support.tex | 109 ++++++------
source/concepts.tex | 12 +-
source/diagnostics.tex | 6 +-
source/utilities.tex | 45 +++--
source/strings.tex | 10 +-
source/containers.tex | 54 +++---
source/iterators.tex | 9 +-
source/algorithms.tex | 6 +-
source/numerics.tex | 60 ++++---
source/time.tex | 10 +-
source/locales.tex | 32 ++--
source/iostreams.tex | 74 ++++----
source/regex.tex | 53 +++---
source/threads.tex | 47 +++---
source/limits.tex | 2 +-
source/compatibility.tex | 4 +-
source/future.tex | 10 +-
29 files changed, 750 insertions(+), 792 deletions(-)
diff --git a/source/intro.tex b/source/intro.tex
index c247ada6..4203ff1f 100644
--- a/source/intro.tex
+++ b/source/intro.tex
@@ -126,8 +126,8 @@ [intro.defs]
modifications of scalar objects are described in
\ref{expr.ass}, \ref{expr.post.incr}, and \ref{expr.pre.incr}.
Attempts to read or modify an object of class type
-typically invoke a constructor\iref{class.ctor}
-or assignment operator\iref{class.copy.assign};
+typically invoke a \deflink{constructor}{class.ctor}
+or \link{assignment operator}{class.copy.assign};
such invocations do not themselves constitute accesses,
although they may involve accesses of scalar subobjects.
\end{defnote}
@@ -278,10 +278,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}
@@ -338,7 +339,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}
@@ -817,7 +818,7 @@ [intro.compliance.general]
\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.
@@ -834,7 +835,7 @@ [intro.compliance.general]
\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 5963cdcf..a1ad8a34 100644
--- a/source/lex.tex
+++ b/source/lex.tex
@@ -28,10 +28,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 \defnadj{preprocessing}{translation unit}.
\begin{note}
A \Cpp{} program need not all be translated at the same time.
@@ -46,8 +46,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|)}
@@ -469,7 +469,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.
@@ -1052,7 +1052,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|)}
@@ -2226,7 +2226,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 \deflinkx{literal operator}{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 969f9cd8..ec3f3e3e 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -97,8 +97,8 @@ [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{*\keyword{this}} object\iref{expr.prim.this}.
@@ -126,7 +126,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}
@@ -135,7 +135,7 @@ [basic.def]
\indextext{declaration!definition versus}%
\indextext{declaration}%
\indextext{declaration!name}%
-A declaration\iref{dcl.dcl} may (re)introduce
+A \link{declaration}{dcl.dcl} may (re)introduce
one or more names and/or entities into a translation
unit.
If so, the
@@ -148,7 +148,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}
@@ -232,7 +232,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.
@@ -274,7 +274,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
@@ -358,7 +358,7 @@ [basic.def.odr]
\item If $E$ is an
\grammarterm{id-expression}\iref{expr.prim.id}, the set
contains only $E$.
-\item If $E$ is a subscripting operation\iref{expr.sub} with
+\item If $E$ is a \link{subscripting}{expr.sub} operation with
an array operand, the set contains the potential results of that operand.
\item If $E$ is a class member access
expression\iref{expr.ref} of the form
@@ -368,16 +368,15 @@ [basic.def.odr]
\item If $E$ is a class member access expression
naming a static data member,
the set contains the \grammarterm{id-expression} designating the data member.
-\item If $E$ is a pointer-to-member
-expression\iref{expr.mptr.oper} of the form
+\item If $E$ is a \link{pointer-to-member expression}{expr.mptr.oper} of the form
$E_1$ \tcode{.*} $E_2$,
the set contains the potential results of $E_1$.
\item If $E$ has the form \tcode{($E_1$)}, the set contains the
potential results of $E_1$.
-\item If $E$ is a glvalue conditional
-expression\iref{expr.cond}, the set is the union of the sets of
+\item If $E$ is a glvalue \link{conditional expression}{expr.cond},
+the set is the union of the sets of
potential results of the second and third operands.
-\item If $E$ is a comma expression\iref{expr.comma}, the set
+\item If $E$ is a \link{comma expression}{expr.comma}, the set
contains the potential results of the right operand.
\item Otherwise, the set is empty.
\end{itemize}
@@ -492,12 +491,12 @@ [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}
-is \defn{odr-usable} in a scope\iref{basic.scope.scope} if:
+A \deflinkx{local entity}{entity!local}{basic.pre}
+is \defn{odr-usable} in a \link{scope}{basic.scope.scope} if:
\begin{itemize}
\item either the local entity is not \tcode{*\keyword{this}}, or
an enclosing class or non-lambda function parameter scope exists and,
@@ -540,7 +539,7 @@ [basic.def.odr]
\pnum
Every program shall contain at least one definition of every
function or variable that is odr-used in that program
-outside of a discarded statement\iref{stmt.if}; no diagnostic required.
+outside of a \deflink{discarded statement}{stmt.if}; no diagnostic required.
The definition can appear explicitly in the program, it can be found in
the standard or a user-defined library, or (when appropriate) it is
implicitly defined (see~\ref{class.default.ctor}, \ref{class.copy.ctor},
@@ -588,9 +587,9 @@ [basic.def.odr]
describe in which contexts complete class types are required. A class
type \tcode{T} must be complete if:
\begin{itemize}
-\item an object of type \tcode{T} is defined\iref{basic.def}, or
-\item a non-static class data member of type \tcode{T} is
-declared\iref{class.mem}, or
+\item an object of type \tcode{T} is \link{defined}{basic.def}, or
+\item a non-static class \deflink{data member}{class.mem} of
+type \tcode{T} is declared, or
\item \tcode{T} is used as the allocated type or array element type in a
\grammarterm{new-expression}\iref{expr.new}, or
\item an lvalue-to-rvalue conversion is applied to
@@ -610,10 +609,10 @@ [basic.def.odr]
\keyword{sizeof} operator\iref{expr.sizeof} is applied to an operand of
type \tcode{T}, or
\item a function with a return type or argument type of type \tcode{T}
-is defined\iref{basic.def} or called\iref{expr.call}, or
+is defined\iref{basic.def} or \link{called}{expr.call}, or
\item a class with a base class of type \tcode{T} is
defined\iref{class.derived}, or
-\item an lvalue of type \tcode{T} is assigned to\iref{expr.ass}, or
+\item an lvalue of type \tcode{T} is \link{assigned to}{expr.ass}, or
\item the type \tcode{T} is the subject of an
\keyword{alignof} expression\iref{expr.alignof}, or
\item an \grammarterm{exception-declaration} has type \tcode{T}, reference to
@@ -656,7 +655,7 @@ [basic.def.odr]
a non-volatile const object with internal or no linkage if the object
\begin{itemize}
\item has the same literal type in all definitions of \tcode{D},
-\item is initialized with a constant expression\iref{expr.const},
+\item is initialized with a \link{constant expression}{expr.const},
\item is not odr-used in any definition of \tcode{D}, and
\item has the same value in all definitions of \tcode{D},
\end{itemize}
@@ -2577,7 +2576,7 @@ [basic.link]
\pnum
\indextext{program}%
-A \defn{program} consists of one or more translation units\iref{lex.separate}
+A \defn{program} consists of one or more \deflinkx{translation units}{translation unit}{lex.separate}
linked together. A translation unit consists
of a sequence of declarations.
@@ -2600,7 +2599,7 @@ [basic.link]
\item When a name has \defnx{module linkage}{linkage!module},
the entity it denotes
-can be referred to by names from other scopes of the same module unit\iref{module.unit} or
+can be referred to by names from other scopes of the same \deflink{module unit}{module.unit} or
from scopes of other module units of that same module.
\item When a name has \defnadj{internal}{linkage},
@@ -2620,7 +2619,7 @@ [basic.link]
\indextext{linkage!\idxcode{inline} and}%
\indextext{\idxcode{inline}!linkage of}%
The name of an entity
-that belongs to a namespace scope\iref{basic.scope.namespace}
+that belongs to a \link{namespace scope}{basic.scope.namespace}
has internal linkage if it is the name of
\begin{itemize}
\item
@@ -2661,7 +2660,7 @@ [basic.link]
purposes\iref{dcl.typedef}; or
\item
\indextext{enumeration!linkage of}%
-a named enumeration\iref{dcl.enum}, or an unnamed enumeration defined
+a named \link{enumeration}{dcl.enum}, or an unnamed enumeration defined
in a typedef declaration in which the enumeration has the typedef name
for linkage purposes\iref{dcl.typedef}; or
\item an unnamed enumeration
@@ -2719,7 +2718,7 @@ [basic.link]
\pnum
\indextext{linkage!no}%
Names not covered by these rules have no linkage. Moreover, except as
-noted, a name declared at block scope\iref{basic.scope.block} has no
+noted, a name declared at \deflinkx{block scope}{scope!block}{basic.scope.block} has no
linkage.
\pnum
@@ -3044,8 +3043,8 @@ [intro.memory]
involve additional memory locations that are not accessible to programs but are
managed by the implementation.
\end{note}
-Two or more threads of
-execution\iref{intro.multithread} can access separate memory
+Two or more \deflinkx{threads of
+execution}{thread of execution}{intro.multithread} can access separate memory
locations without interfering with each other.
\pnum
@@ -3089,15 +3088,15 @@ [intro.object]
The constructs in a \Cpp{} program create, destroy, refer to, access, and
manipulate objects.
An \defn{object} is created
-by a definition\iref{basic.def},
+by a \link{definition}{basic.def},
by a \grammarterm{new-expression}\iref{expr.new},
by an operation that implicitly creates objects (see below),
-when implicitly changing the active member of a union\iref{class.union},
+when implicitly changing the active member of a \link{union}{class.union},
or
when a temporary object is created\iref{conv.rval,class.temporary}.
An object occupies a region of storage
in its period of construction\iref{class.cdtor},
-throughout its lifetime\iref{basic.life},
+throughout its \link{lifetime}{basic.life},
and
in its period of destruction\iref{class.cdtor}.
\begin{note}
@@ -3225,7 +3224,7 @@ [intro.object]
\begin{itemize}
\item a base class subobject, or
\item a non-static data member
-declared with the \tcode{no_unique_address} attribute\iref{dcl.attr.nouniqueaddr}.
+declared with the \link{\tcode{no_unique_address}}{dcl.attr.nouniqueaddr} attribute.
\end{itemize}
\pnum
@@ -3246,7 +3245,7 @@ [intro.object]
are \impldef{which non-standard-layout objects
containing no data are considered empty}.
\indextext{most derived object!bit-field}%
-Unless it is a bit-field\iref{class.bit},
+Unless it is a \link{bit-field}{class.bit},
an object with nonzero size
shall occupy one or more bytes of storage,
including every byte that is occupied in full or in part
@@ -3660,16 +3659,16 @@ [basic.indet]
is produced by the evaluation of:
\begin{itemize}
\item
- the second or third operand of a conditional expression\iref{expr.cond},
+ the second or third operand of a \link{conditional expression}{expr.cond},
\item
- the right operand of a comma expression\iref{expr.comma},
+ the right operand of a \link{comma expression}{expr.comma},
\item
the operand of a cast or conversion\iref{conv.integral,
expr.type.conv,expr.static.cast,expr.cast}
to an unsigned ordinary character type
or \tcode{std::byte} type\iref{cstddef.syn}, or
\item
- a discarded-value expression\iref{expr.context},
+ a \deflink{discarded-value expression}{expr.context},
\end{itemize}
then the result of the operation is an indeterminate value.
\item
@@ -3728,8 +3727,8 @@ [basic.stc.general]
\indextext{storage duration!automatic}%
\indextext{storage duration!dynamic}%
Static, thread, and automatic storage durations are associated with objects
-introduced by declarations\iref{basic.def} and implicitly created by
-the implementation\iref{class.temporary}. The dynamic storage duration
+introduced by declarations\iref{basic.def} and \link{implicitly created by
+the implementation}{class.temporary}. The dynamic storage duration
is associated with objects created by a
\grammarterm{new-expression}\iref{expr.new}.
@@ -3740,7 +3739,7 @@ [basic.stc.general]
When the end of the duration of a region of storage is reached,
the values of all pointers
representing the address of any part of that region of storage
-become invalid pointer values\iref{basic.compound}.
+become \deflinkx{invalid pointer values}{value!invalid pointer}{basic.compound}.
Indirection through an invalid pointer value and
passing an invalid pointer value to a deallocation function
have undefined behavior.
@@ -3832,8 +3831,8 @@ [basic.stc.dynamic.general]
\indextext{storage duration!dynamic|(}
\pnum
-Objects can be created dynamically during program
-execution\iref{intro.execution}, using
+Objects can be created dynamically during \link{program
+execution}{intro.execution}, using
\indextext{\idxcode{new}}%
\grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using
\indextext{\idxcode{delete}}%
@@ -4002,19 +4001,19 @@ [basic.stc.dynamic.allocation]
\tcode{std::bad_alloc}\iref{bad.alloc}.
\pnum
-A global allocation function is only called as the result of a new
-expression\iref{expr.new}, or called directly using the function call
-syntax\iref{expr.call}, or called indirectly to allocate storage for
+A global allocation function is only called as the result of a \link{new
+expression}{expr.new}, or called directly using the \link{function call}{expr.call}
+syntax, or called indirectly to allocate storage for
a coroutine state\iref{dcl.fct.def.coroutine},
or called indirectly through calls to the
functions in the \Cpp{} standard library.
\begin{note}
In particular, a
global allocation function is not called to allocate storage for objects
-with static storage duration\iref{basic.stc.static}, for objects or references
-with thread storage duration\iref{basic.stc.thread}, for objects of
-type \tcode{std::type_info}\iref{expr.typeid}, or for an
-exception object\iref{except.throw}.
+with \link{static storage duration}{basic.stc.static}, for objects or references
+with \link{thread storage duration}{basic.stc.thread}, for objects of
+type \link{\tcode{std::type_info}}{expr.typeid}, or for an
+\link{exception object}{except.throw}.
\end{note}
\rSec4[basic.stc.dynamic.deallocation]{Deallocation functions}
@@ -4101,7 +4100,7 @@ [basic.align]
integer value representing the number of bytes between successive addresses
at which a given object can be allocated. An object type imposes an alignment
requirement on every object of that type; stricter alignment can be requested
-using the alignment specifier\iref{dcl.align}.
+using the \link{alignment specifier}{dcl.align}.
\pnum
A \defnadj{fundamental}{alignment} is represented by an alignment
@@ -4577,9 +4576,9 @@ [basic.types.general]
impose requirements on implementations regarding the representation
of types.
There are two kinds of types: fundamental types and compound types.
-Types describe objects\iref{intro.object},
-references\iref{dcl.ref},
-or functions\iref{dcl.fct}.
+Types describe \link{objects}{intro.object},
+\link{references}{dcl.ref},
+or \link{functions}{dcl.fct}.
\end{note}
\pnum
@@ -4741,7 +4740,7 @@ [basic.types.general]
pointer types, pointer-to-member types\iref{basic.compound},
\tcode{std::nullptr_t},
and
-cv-qualified\iref{basic.type.qualifier} versions of these
+\link{cv-qualified}{basic.type.qualifier} versions of these
types are collectively called
\defnadjx{scalar}{types}{type}.
\label{term.trivially.copyable.type}%
@@ -4770,7 +4769,7 @@ [basic.types.general]
\item a scalar type; or
\item a reference type; or
\item an array of literal type; or
-\item a possibly cv-qualified class type\iref{class} that
+\item a possibly cv-qualified \link{class type}{class} that
has all of the following properties:
\begin{itemize}
\item it has a constexpr destructor\iref{dcl.constexpr},
@@ -4804,8 +4803,8 @@ [basic.types.general]
Two types \cvqual{cv1} \tcode{T1} and \cvqual{cv2} \tcode{T2} are
\defnadjx{layout-compatible}{types}{type}
if \tcode{T1} and \tcode{T2} are the same type,
-layout-compatible enumerations\iref{dcl.enum}, or
-layout-compatible standard-layout class types\iref{class.mem}.
+\deflinkx{layout-compatible enumerations}{layout-compatible!enumeration}{dcl.enum}, or
+\deflinkx{layout-compatible standard-layout class types}{layout-compatible!class}{class.mem}.
\rSec2[basic.fundamental]{Fundamental types}
@@ -5233,7 +5232,7 @@ [basic.compound]
which identify members of a given
type within objects of a given class, \ref{dcl.mptr}.
Pointers to data members and pointers to member functions are collectively
-called \term{pointer-to-member} types.
+called \defn{pointer-to-member} types.
\end{itemize}
\pnum
@@ -5315,7 +5314,7 @@ [basic.compound]
have the same value representation and alignment
requirements\iref{basic.align}.
\begin{note}
-Pointers to over-aligned types\iref{basic.align} have no special
+Pointers to \deflinkx{over-aligned types}{type!over-aligned}{basic.align} have no special
representation, but their range of valid values is restricted by the extended
alignment requirement.
\end{note}
@@ -5596,8 +5595,8 @@ [intro.execution]
\indextext{program execution|(}
\pnum
-An instance of each object with automatic storage
-duration\iref{basic.stc.auto} is associated with each entry into its
+An instance of each object with \link{automatic storage
+duration}{basic.stc.auto} is associated with each entry into its
block. Such an object exists and retains its last-stored value during
the execution of the block and while the block is suspended (by a call
of a function, suspension of a coroutine\iref{expr.await}, or receipt of a signal).
@@ -5642,7 +5641,7 @@ [intro.execution]
the initialization of the entities captured by copy and
the constituent expressions of the \grammarterm{initializer} of the \grammarterm{init-capture}{s},
\item
-if $E$ is a function call\iref{expr.call} or implicitly invokes a function,
+if $E$ is a \link{function call}{expr.call} or implicitly invokes a function,
the constituent expressions of each default argument\iref{dcl.fct.default}
used in the call, or
\item
@@ -5673,7 +5672,7 @@ [intro.execution]
A \defn{full-expression} is
\begin{itemize}
\item
-an unevaluated operand\iref{expr.context},
+an \deflink{unevaluated operand}{expr.context},
\item
a \grammarterm{constant-expression}\iref{expr.const},
\item
diff --git a/source/expressions.tex b/source/expressions.tex
index c17a1d20..efcea31f 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -33,14 +33,14 @@ [expr.pre]
\indextext{operator!overloaded}%
\begin{note}
Operators can be overloaded, that is, given meaning when applied to
-expressions of class type\iref{class} or enumeration
-type\iref{dcl.enum}. Uses of overloaded operators are transformed into
+expressions of \link{class}{class} type or
+\link{enumeration}{dcl.enum} type. Uses of overloaded operators are transformed into
function calls as described in~\ref{over.oper}. Overloaded operators
obey the rules for syntax and evaluation order specified in \ref{expr.compound},
but the requirements of operand type and value category are replaced
by the rules for function call. Relations between operators, such as
-\tcode{++a} meaning \tcode{a+=1}, are not guaranteed for overloaded
-operators\iref{over.oper}.
+\tcode{++a} meaning \tcode{a+=1}, are not guaranteed for \link{overloaded