-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathn4868.patch
15095 lines (14063 loc) · 598 KB
/
n4868.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 a952e58a2d99752e980c75867807ef7618474efe Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Sun, 4 Oct 2020 05:24:40 +0200
Subject: [PATCH 01/29] [expr.const] Fix index entries for contextually
converted constant expression of type bool.
---
source/expressions.tex | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/source/expressions.tex b/source/expressions.tex
index 43df35d1..ebbb0950 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -7313,9 +7313,8 @@ [expr.const]
as non-type template
arguments\iref{temp.arg}.
\end{note}
-\indextext{contextually converted constant expression of type \tcode{bool}|see{conversion, contextual}}%
-\indextext{conversion!contextual to constant expression of type \tcode{bool}}%
-A \term{contextually converted constant expression of type \tcode{bool}} is
+\indextext{contextually converted constant expression of type \tcode{bool}|see{conversion, contextual to constant expression of type \tcode{bool}}}%
+A \defnx{contextually converted constant expression of type \tcode{bool}}{conversion!contextual to constant expression of type \tcode{bool}} is
an expression, contextually converted to \tcode{bool}\iref{conv},
where the converted expression is a constant expression and
the conversion sequence contains only the conversions above.
--
2.17.1
From 3a2c44a6ce0e599539d9d2f0fd4f19cc5114a65f 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 02/29] Use \defnadj more.
---
source/lex.tex | 3 +--
source/basic.tex | 3 +--
source/statements.tex | 3 +--
source/classes.tex | 3 +--
4 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/source/lex.tex b/source/lex.tex
index 9bce0346..40b18405 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}
@@ -290,7 +289,7 @@ [lex.charset]
\defnx{basic execution wide-character set}{wide-character set!basic execution}
shall each contain all the members of the
basic source character set, plus control characters representing alert,
-backspace, and carriage return, plus a \defnx{null character}{character!null}
+backspace, and carriage return, plus a \defnadj{null}{character}
(respectively, \defnx{null wide character}{wide-character!null}), whose value is 0.
For each basic execution character set, the values of the
members shall be non-negative and distinct from one another. In both the
diff --git a/source/basic.tex b/source/basic.tex
index f078e90b..9a2f1d40 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -3824,10 +3824,9 @@ [basic.stc.general]
\rSec3[basic.stc.static]{Static storage duration}
\pnum
-\indextext{storage duration!static}%
All variables which do not have dynamic storage duration, do not have thread
storage duration, and are not local
-have \defn{static storage duration}. The
+have \defnadj{static}{storage duration}. The
storage for these entities lasts for the duration of the
program~(\ref{basic.start.static}, \ref{basic.start.term}).
diff --git a/source/statements.tex b/source/statements.tex
index 215a35a0..24ecc18e 100644
--- a/source/statements.tex
+++ b/source/statements.tex
@@ -183,10 +183,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 carry a label just before
diff --git a/source/classes.tex b/source/classes.tex
index 51b5d730..f25f2dc5 100644
--- a/source/classes.tex
+++ b/source/classes.tex
@@ -2961,9 +2961,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.17.1
From c1cac0eba82c34e9fe42d1573b39772505abad1e Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Sun, 4 Oct 2020 05:10:07 +0200
Subject: [PATCH 03/29] [basic.fundamental] Redirect index entry for 'narrow
character type'.
---
source/basic.tex | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/basic.tex b/source/basic.tex
index 9a2f1d40..96cb123d 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -5072,11 +5072,11 @@ [basic.fundamental]
\indextext{type!\idxcode{char}}%
\indextext{type!character}%
\indextext{type!ordinary character}%
-\indextext{type!narrow character}%
\indextext{\idxcode{char}!implementation-defined sign of}%
\indextext{type!\idxcode{signed char}}%
\indextext{character!\idxcode{signed}}%
\indextext{type!\idxcode{unsigned char}}%
+\indextext{narrow character type|see{type, narrow character}}%
Type \tcode{char} is a distinct type
that has an \impldef{underlying type of \tcode{char}} choice of
``\tcode{signed char}'' or ``\tcode{unsigned char}'' as its underlying type.
@@ -5086,7 +5086,7 @@ [basic.fundamental]
are collectively called
\defnx{ordinary character types}{type!ordinary character}.
The ordinary character types and \tcode{char8_t}
-are collectively called \defnx{narrow character types}{narrow character type}.
+are collectively called \defnx{narrow character types}{type!narrow character}.
For narrow character types,
each possible bit pattern of the object representation represents
a distinct value.
--
2.17.1
From c7a5700c6d9c80f155af535b9deca37303fdb29e Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Sun, 4 Oct 2020 05:05:14 +0200
Subject: [PATCH 04/29] [conv.general] Fix index redirect for contextual
conversion to bool.
---
source/expressions.tex | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/expressions.tex b/source/expressions.tex
index ebbb0950..fa5144c9 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -483,7 +483,7 @@ [conv]
\rSec2[conv.general]{General}
\indextext{implicit conversion|see{conversion, implicit}}
-\indextext{contextually converted to bool|see{conversion, contextual}}
+\indextext{contextually converted to bool|see{conversion, contextual to \tcode{bool}}}
\indextext{rvalue!lvalue conversion to|see{conversion, lvalue-to-rvalue}}%
\pnum
--
2.17.1
From 1e580bc80b5a04a128f2ac0e41df47540acbf577 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 05/29] [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 8cb10c99..7b156538 100644
--- a/source/declarations.tex
+++ b/source/declarations.tex
@@ -1682,7 +1682,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.17.1
From 60c4fc7a464584e9872d255b1f739f969c9227e9 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Wed, 9 Sep 2020 03:14:52 +0200
Subject: [PATCH 06/29] Add index entries.
---
source/utilities.tex | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/source/utilities.tex b/source/utilities.tex
index 058c58e5..2925ed5e 100644
--- a/source/utilities.tex
+++ b/source/utilities.tex
@@ -16301,7 +16301,7 @@ [meta.type.synop]
template<class T, class U>
inline constexpr bool @\libglobal{is_layout_compatible_v}@ = is_layout_compatible<T, U>::value;
template<class Base, class Derived>
- inline constexpr bool is_pointer_interconvertible_base_of_v
+ inline constexpr bool @\libglobal{is_pointer_interconvertible_base_of_v}@
= is_pointer_interconvertible_base_of<Base, Derived>::value;
template<class Fn, class... ArgTypes>
inline constexpr bool @\libglobal{is_invocable_v}@ = is_invocable<Fn, ArgTypes...>::value;
@@ -17114,7 +17114,7 @@ [meta.rel]
\lhdr{Template} & \chdr{Condition} & \rhdr{Comments} \\ \capsep
\endhead
\tcode{template<class T, class U>}\br
- \tcode{struct is_same;} &
+ \tcode{struct \libglobal{is_same};} &
\tcode{T} and \tcode{U} name the same type with the same cv-qualifications & \\ \rowsep
\indexlibraryglobal{is_base_of}%
@@ -17599,7 +17599,7 @@ [meta.trans.other]
\tcode{template<bool B, class T,}
\tcode{class F>}\br
- \tcode{struct conditional;}
+ \tcode{struct \libglobal{conditional};}
&
If \tcode{B} is \tcode{true}, the member typedef \tcode{type} shall equal \tcode{T}.
If \tcode{B} is \tcode{false}, the member typedef \tcode{type} shall equal \tcode{F}. \\ \rowsep
@@ -17640,7 +17640,7 @@ [meta.trans.other]
\tcode{template<class Fn,}\br
\tcode{class... ArgTypes>}\br
- \tcode{struct invoke_result;}
+ \tcode{struct \libglobal{invoke_result};}
&
If the expression \tcode{\placeholdernc{INVOKE}(declval<Fn>(), declval<ArgTypes>()...)}
is well-formed when treated as an unevaluated operand\iref{expr.prop},
--
2.17.1
From 833846f0daf4c97e12dd0eef5b1ff8de1024096a Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <[email protected]>
Date: Tue, 11 Aug 2020 03:33:07 +0200
Subject: [PATCH 07/29] Use \keyword more.
---
source/lex.tex | 6 +++---
source/expressions.tex | 19 ++++++-------------
source/declarations.tex | 4 ----
source/templates.tex | 2 --
source/exceptions.tex | 14 ++++----------
source/preprocessor.tex | 3 +--
6 files changed, 14 insertions(+), 34 deletions(-)
diff --git a/source/lex.tex b/source/lex.tex
index 40b18405..f0823f64 100644
--- a/source/lex.tex
+++ b/source/lex.tex
@@ -1849,8 +1849,8 @@ [lex.bool]
\indextext{literal!boolean}%
\begin{bnf}
\nontermdef{boolean-literal}\br
- \terminal{false}\br
- \terminal{true}
+ \keyword{false}\br
+ \keyword{true}
\end{bnf}
\pnum
@@ -1863,7 +1863,7 @@ [lex.nullptr]
\indextext{literal!pointer}%
\begin{bnf}
\nontermdef{pointer-literal}\br
- \terminal{nullptr}
+ \keyword{nullptr}
\end{bnf}
\pnum
diff --git a/source/expressions.tex b/source/expressions.tex
index fa5144c9..e0190616 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -1194,8 +1194,7 @@ [expr.prim.literal]
\rSec2[expr.prim.this]{This}
\pnum
-\indextext{\idxcode{this}}%
-The keyword \tcode{this} names a pointer to the object for which a non-static member
+The keyword \keyword{this} names a pointer to the object for which a non-static member
function\iref{class.this} is invoked or a non-static data member's
initializer\iref{class.mem} is evaluated.
@@ -3561,8 +3560,7 @@ [expr.typeid]
\pnum
\indextext{expression!type identification}%
-\indextext{\idxcode{typeid}}%
-The result of a \tcode{typeid} expression is an lvalue of static type
+The result of a \keyword{typeid} expression is an lvalue of static type
\indextext{\idxcode{type_info}}%
\indexlibraryglobal{type_info}%
\tcode{const} \tcode{std::type_info}\iref{type.info} and dynamic type \tcode{const}
@@ -4406,16 +4404,15 @@ [expr.pre.incr]
\rSec3[expr.await]{Await}
\indextext{expression!await}%
-\indextext{\idxcode{co_await}}%
\pnum
-The \tcode{co_await} expression is used to suspend evaluation of a
+The \keyword{co_await} expression is used to suspend evaluation of a
coroutine\iref{dcl.fct.def.coroutine} while awaiting completion of
the computation represented by the operand expression.
\begin{bnf}
\nontermdef{await-expression}\br
- \terminal{co_await} cast-expression
+ \keyword{co_await} cast-expression
\end{bnf}
\pnum
@@ -4682,9 +4679,8 @@ [expr.sizeof]
\rSec3[expr.alignof]{Alignof}
\pnum
-\indextext{\idxcode{alignof}}%
\indextext{expression!\idxcode{alignof}}%
-An \tcode{alignof} expression yields the alignment requirement
+An \keyword{alignof} expression yields the alignment requirement
of its operand type. The operand shall be a \grammarterm{type-id}
representing a complete object type, or an array thereof, or a reference
to one of those types.
@@ -4707,9 +4703,8 @@ [expr.alignof]
\rSec3[expr.unary.noexcept]{\tcode{noexcept} operator}
\pnum
-\indextext{\idxcode{noexcept}}%
\indextext{expression!\idxcode{noexcept}}%
-The \tcode{noexcept} operator determines whether the evaluation of its operand,
+The \keyword{noexcept} operator determines whether the evaluation of its operand,
which is an unevaluated operand\iref{expr.prop}, can throw an
exception\iref{except.throw}.
@@ -5319,7 +5314,6 @@ [expr.delete]
\pnum
\indextext{expression!\idxcode{delete}}%
-\indextext{\idxcode{delete}}%
The \grammarterm{delete-expression} operator destroys a most derived
object\iref{intro.object} or array created by a
\grammarterm{new-expression}.
@@ -6685,7 +6679,6 @@ [expr.yield]
\rSec2[expr.throw]{Throwing an exception}%
\indextext{expression!\idxcode{throw}}%
\indextext{exception handling!throwing}%
-\indextext{\idxcode{throw}}%
%
\begin{bnf}
\nontermdef{throw-expression}\br
diff --git a/source/declarations.tex b/source/declarations.tex
index 7b156538..836901ce 100644
--- a/source/declarations.tex
+++ b/source/declarations.tex
@@ -330,10 +330,6 @@ [dcl.spec.general]
\rSec2[dcl.stc]{Storage class specifiers}%
\indextext{specifier!storage class}%
\indextext{declaration!storage class}%
-\indextext{\idxcode{static}}%
-\indextext{\idxcode{thread_local}}%
-\indextext{\idxcode{extern}}%
-\indextext{\idxcode{mutable}}
\pnum
The storage class specifiers are
diff --git a/source/templates.tex b/source/templates.tex
index d886adc6..1af9b3ea 100644
--- a/source/templates.tex
+++ b/source/templates.tex
@@ -13,8 +13,6 @@ [temp.pre]
A \defn{template} defines a family of classes, functions, or variables,
an alias for a family of types, or a concept.
-\indextext{\idxcode{template}}%
-%
\begin{bnf}
\nontermdef{template-declaration}\br
template-head declaration\br
diff --git a/source/exceptions.tex b/source/exceptions.tex
index 4b24c2ba..3e63cb63 100644
--- a/source/exceptions.tex
+++ b/source/exceptions.tex
@@ -17,18 +17,14 @@ [except.pre]
in code executed in the handler's try block
or in functions called from the handler's try block.
-\indextext{\idxcode{try}}%
-%
\begin{bnf}
\nontermdef{try-block}\br
- \terminal{try} compound-statement handler-seq
+ \keyword{try} compound-statement handler-seq
\end{bnf}
-\indextext{\idxcode{try}}%
-%
\begin{bnf}
\nontermdef{function-try-block}\br
- \terminal{try} \opt{ctor-initializer} compound-statement handler-seq
+ \keyword{try} \opt{ctor-initializer} compound-statement handler-seq
\end{bnf}
\begin{bnf}
@@ -36,11 +32,9 @@ [except.pre]
handler \opt{handler-seq}
\end{bnf}
-\indextext{\idxcode{catch}}%
-%
\begin{bnf}
\nontermdef{handler}\br
- \terminal{catch} \terminal{(} exception-declaration \terminal{)} compound-statement
+ \keyword{catch} \terminal{(} exception-declaration \terminal{)} compound-statement
\end{bnf}
\begin{bnf}
@@ -704,7 +698,7 @@ [except.spec]
\begin{bnf}
\nontermdef{noexcept-specifier}\br
- \terminal{noexcept} \terminal{(} constant-expression \terminal{)}\br
+ \keyword{noexcept} \terminal{(} constant-expression \terminal{)}\br
\terminal{noexcept}\br
\end{bnf}
diff --git a/source/preprocessor.tex b/source/preprocessor.tex
index c3e3db6c..afc2ed3c 100644
--- a/source/preprocessor.tex
+++ b/source/preprocessor.tex
@@ -273,10 +273,9 @@ [cpp.cond]
\indextext{preprocessing directive!conditional inclusion}%
\indextext{inclusion!conditional|see{preprocessing directive, conditional inclusion}}
-\indextext{\idxcode{defined}}%
\begin{bnf}
\nontermdef{defined-macro-expression}\br
- \terminal{defined} identifier\br
+ \keyword{defined} identifier\br
\terminal{defined (} identifier \terminal{)}
\end{bnf}
--
2.17.1
From dd9bfa8e1019476af113c6b2ca8fed3439df484b 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 08/29] 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 46dcf6b4..2d3ac622 100644
--- a/source/strings.tex
+++ b/source/strings.tex
@@ -139,31 +139,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)}.\par
+\tcode{p} not in \range{s}{s+n}.\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
@@ -2488,7 +2488,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 ad9fba22..cbbb0f66 100644
--- a/source/containers.tex
+++ b/source/containers.tex
@@ -802,7 +802,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}
@@ -810,7 +810,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
@@ -1651,7 +1651,7 @@ [associative.reqmts.general]
\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}
@@ -1758,9 +1758,9 @@ [associative.reqmts.general]
&
\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);} &
&
@@ -2332,12 +2332,12 @@ [unord.req.general]
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},
@@ -2491,7 +2491,7 @@ [unord.req.general]
& \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
@@ -2502,7 +2502,7 @@ [unord.req.general]
\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
@@ -2513,7 +2513,7 @@ [unord.req.general]
\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}
@@ -2526,7 +2526,7 @@ [unord.req.general]
\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
@@ -4758,8 +4758,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
@@ -5433,7 +5433,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,
@@ -5459,8 +5459,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}.
@@ -5480,7 +5480,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.
\end{itemdescr}
diff --git a/source/algorithms.tex b/source/algorithms.tex
index d3c60b50..3d9719ad 100644
--- a/source/algorithms.tex
+++ b/source/algorithms.tex
@@ -6708,7 +6708,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}.
@@ -6772,7 +6772,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}.
@@ -9931,7 +9931,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 7ce7418a..a6d789d5 100644
--- a/source/regex.tex
+++ b/source/regex.tex
@@ -3221,7 +3221,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 30333a4d4a271b8705df0908e6608add710d0f06 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 09/29] [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 e0190616..2063348e 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -5718,9 +5718,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 0a9a87ff1312771e20b7d12a5e278c7ab14d02b0 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 10/29] [some.where] Replace \term with \placeholder.
---
source/expressions.tex | 2 +-
source/time.tex | 20 ++++++++++----------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/source/expressions.tex b/source/expressions.tex
index 2063348e..0ef04e09 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -3564,7 +3564,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}.
diff --git a/source/time.tex b/source/time.tex
index aefb0722..585671cf 100644
--- a/source/time.tex
+++ b/source/time.tex
@@ -164,19 +164,19 @@ [time.syn]
minutes* offset = nullptr);
// convenience typedefs
- using nanoseconds = duration<@\term{signed integer type of at least 64 bits}@, nano>;
- using microseconds = duration<@\term{signed integer type of at least 55 bits}@, micro>;
- using milliseconds = duration<@\term{signed integer type of at least 45 bits}@, milli>;
- using seconds = duration<@\term{signed integer type of at least 35 bits}@>;
- using minutes = duration<@\term{signed integer type of at least 29 bits}@, ratio< 60>>;
- using hours = duration<@\term{signed integer type of at least 23 bits}@, ratio<3600>>;
- using days = duration<@\term{signed integer type of at least 25 bits}@,
+ using nanoseconds = duration<@\placeholder{signed integer type of at least 64 bits}@, nano>;
+ using microseconds = duration<@\placeholder{signed integer type of at least 55 bits}@, micro>;
+ using milliseconds = duration<@\placeholder{signed integer type of at least 45 bits}@, milli>;
+ using seconds = duration<@\placeholder{signed integer type of at least 35 bits}@>;
+ using minutes = duration<@\placeholder{signed integer type of at least 29 bits}@, ratio< 60>>;
+ using hours = duration<@\placeholder{signed integer type of at least 23 bits}@, ratio<3600>>;
+ using days = duration<@\placeholder{signed integer type of at least 25 bits}@,
ratio_multiply<ratio<24>, hours::period>>;
- using weeks = duration<@\term{signed integer type of at least 22 bits}@,
+ using weeks = duration<@\placeholder{signed integer type of at least 22 bits}@,
ratio_multiply<ratio<7>, days::period>>;
- using years = duration<@\term{signed integer type of at least 17 bits}@,
+ using years = duration<@\placeholder{signed integer type of at least 17 bits}@,
ratio_multiply<ratio<146097, 400>, days::period>>;
- using months = duration<@\term{signed integer type of at least 20 bits}@,
+ using months = duration<@\placeholder{signed integer type of at least 20 bits}@,
ratio_divide<years::period, ratio<12>>>;
// \ref{time.point.nonmember}, \tcode{time_point} arithmetic
--
2.17.1
From 5d0a553d076414b407342db074ad831124727dc1 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 11/29] 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 96cb123d..9b7441fd 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -5182,7 +5182,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 24ecc18e..fc01e765 100644
--- a/source/statements.tex
+++ b/source/statements.tex
@@ -1061,7 +1061,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 836901ce..d5666d95 100644
--- a/source/declarations.tex
+++ b/source/declarations.tex
@@ -8264,7 +8264,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 2d3ac622..917e32e1 100644
--- a/source/strings.tex
+++ b/source/strings.tex
@@ -1398,7 +1398,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 a10660e6a5ecec56de7bcbbd6a2ae4055817c925 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 12/29] [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 61f5b109..b519b9ca 100644
--- a/source/numerics.tex
+++ b/source/numerics.tex
@@ -2299,21 +2299,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}%
@@ -2395,13 +2395,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}
@@ -2417,7 +2417,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}
@@ -2448,7 +2448,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 1349f9d8f5ee34fdd6275333aa988732612f49c2 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 13/29] 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 9b7441fd..c0f31742 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -245,7 +245,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() {
@@ -1817,8 +1817,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}
@@ -2282,23 +2282,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