forked from timsong-cpp/cppwp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtmlgen.patch
More file actions
16963 lines (15471 loc) · 677 KB
/
htmlgen.patch
File metadata and controls
16963 lines (15471 loc) · 677 KB
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 6a3736c658384f3d798202848621a0dda1dc3fd6 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <eelis@eelis.net>
Date: Wed, 23 Jan 2019 15:43:24 +0100
Subject: [PATCH 01/23] Fix code margins.
---
source/basic.tex | 12 ++++++------
source/classes.tex | 26 +++++++++++++-------------
source/concepts.tex | 8 ++++----
source/declarations.tex | 22 +++++++++++-----------
source/expressions.tex | 32 ++++++++++++++++----------------
source/iterators.tex | 4 ++--
source/overloading.tex | 16 ++++++++--------
source/ranges.tex | 16 ++++++++--------
source/templates.tex | 2 +-
source/utilities.tex | 8 ++++----
10 files changed, 73 insertions(+), 73 deletions(-)
diff --git a/source/basic.tex b/source/basic.tex
index af3c080..83b9fca 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -3151,12 +3151,12 @@ the behavior is undefined except in the following cases:
\end{itemize}
\begin{example}
\begin{codeblock}
- int f(bool b) {
- unsigned char c;
- unsigned char d = c; // OK, \tcode{d} has an indeterminate value
- int e = d; // undefined behavior
- return b ? d : 0; // undefined behavior if \tcode{b} is \tcode{true}
- }
+int f(bool b) {
+ unsigned char c;
+ unsigned char d = c; // OK, \tcode{d} has an indeterminate value
+ int e = d; // undefined behavior
+ return b ? d : 0; // undefined behavior if \tcode{b} is \tcode{true}
+}
\end{codeblock}
\end{example}
diff --git a/source/classes.tex b/source/classes.tex
index 26432ad..fba7ecf 100644
--- a/source/classes.tex
+++ b/source/classes.tex
@@ -219,15 +219,15 @@ and the elements of $M(\mathtt{X}_e)$.
\pnum
\begin{example}
\begin{codeblock}
- struct B { int i; }; // standard-layout class
- struct C : B { }; // standard-layout class
- struct D : C { }; // standard-layout class
- struct E : D { char : 4; }; // not a standard-layout class
+struct B { int i; }; // standard-layout class
+struct C : B { }; // standard-layout class
+struct D : C { }; // standard-layout class
+struct E : D { char : 4; }; // not a standard-layout class
- struct Q {};
- struct S : Q { };
- struct T : Q { };
- struct U : S, T { }; // not a standard-layout class
+struct Q {};
+struct S : Q { };
+struct T : Q { };
+struct U : S, T { }; // not a standard-layout class
\end{codeblock}
\end{example}
@@ -769,11 +769,11 @@ and either both entities are bit-fields with the same width
or neither is a bit-field.
\begin{example}
\begin{codeblock}
- struct A { int a; char b; };
- struct B { const int b1; volatile char b2; };
- struct C { int c; unsigned : 0; char b; };
- struct D { int d; char b : 4; };
- struct E { unsigned int e; char b; };
+struct A { int a; char b; };
+struct B { const int b1; volatile char b2; };
+struct C { int c; unsigned : 0; char b; };
+struct D { int d; char b : 4; };
+struct E { unsigned int e; char b; };
\end{codeblock}
The common initial sequence of \tcode{A} and \tcode{B} comprises all members
of either class. The common initial sequence of \tcode{A} and \tcode{C} and
diff --git a/source/concepts.tex b/source/concepts.tex
index 6eea186..48c53d6 100644
--- a/source/concepts.tex
+++ b/source/concepts.tex
@@ -574,10 +574,10 @@ and \tcode{E2} is expression-equivalent to an expression
has class or enumeration type\iref{basic.compound} and that expression is valid, with
overload resolution performed in a context that includes the declarations
\begin{codeblock}
- template<class T>
- void swap(T&, T&) = delete;
- template<class T, size_t N>
- void swap(T(&)[N], T(&)[N]) = delete;
+template<class T>
+ void swap(T&, T&) = delete;
+template<class T, size_t N>
+ void swap(T(&)[N], T(&)[N]) = delete;
\end{codeblock}
and does not include a declaration of \tcode{ranges::swap}.
If the function selected by overload resolution does not
diff --git a/source/declarations.tex b/source/declarations.tex
index 591d7c5..ef8cfbd 100644
--- a/source/declarations.tex
+++ b/source/declarations.tex
@@ -4810,13 +4810,13 @@ initialization that would use that default member initializer,
the program is ill-formed.
\begin{example}
\begin{codeblock}
- struct A;
- extern A a;
- struct A {
- const A& a1 { A{a,a} }; // OK
- const A& a2 { A{} }; // error
- };
- A a{a,a}; // OK
+struct A;
+extern A a;
+struct A {
+ const A& a1 { A{a,a} }; // OK
+ const A& a2 { A{} }; // error
+};
+A a{a,a}; // OK
\end{codeblock}
\end{example}
@@ -6456,10 +6456,10 @@ The value of an enumerator or an object of an unscoped enumeration type is
converted to an integer by integral promotion\iref{conv.prom}.
\begin{example}
\begin{codeblock}
- enum color { red, yellow, green=20, blue };
- color col = red;
- color* cp = &col;
- if (*cp == blue) // ...
+enum color { red, yellow, green=20, blue };
+color col = red;
+color* cp = &col;
+if (*cp == blue) // ...
\end{codeblock}
makes \tcode{color} a type describing various colors, and then declares
\tcode{col} as an object of that type, and \tcode{cp} as a pointer to an
diff --git a/source/expressions.tex b/source/expressions.tex
index 30f4eb6..b5df1f9 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -4654,25 +4654,25 @@ by \tcode{e1}.
\begin{example}
\begin{codeblock}
- void mergeable(int x) {
- // These allocations are safe for merging:
- std::unique_ptr<char[]> a{new (std::nothrow) char[8]};
- std::unique_ptr<char[]> b{new (std::nothrow) char[8]};
- std::unique_ptr<char[]> c{new (std::nothrow) char[x]};
+void mergeable(int x) {
+ // These allocations are safe for merging:
+ std::unique_ptr<char[]> a{new (std::nothrow) char[8]};
+ std::unique_ptr<char[]> b{new (std::nothrow) char[8]};
+ std::unique_ptr<char[]> c{new (std::nothrow) char[x]};
- g(a.get(), b.get(), c.get());
- }
+ g(a.get(), b.get(), c.get());
+}
- void unmergeable(int x) {
- std::unique_ptr<char[]> a{new char[8]};
- try {
- // Merging this allocation would change its catch handler.
- std::unique_ptr<char[]> b{new char[x]};
- } catch (const std::bad_alloc& e) {
- std::cerr << "Allocation failed: " << e.what() << std::endl;
- throw;
- }
+void unmergeable(int x) {
+ std::unique_ptr<char[]> a{new char[8]};
+ try {
+ // Merging this allocation would change its catch handler.
+ std::unique_ptr<char[]> b{new char[x]};
+ } catch (const std::bad_alloc& e) {
+ std::cerr << "Allocation failed: " << e.what() << std::endl;
+ throw;
}
+}
\end{codeblock}
\end{example}
diff --git a/source/iterators.tex b/source/iterators.tex
index a2bba55..14bb97f 100644
--- a/source/iterators.tex
+++ b/source/iterators.tex
@@ -1513,8 +1513,8 @@ Let \tcode{E} be an expression such that \tcode{decltype((E))} is \tcode{T}, and
dereferenceable object of type \tcode{I}. \tcode{I} and \tcode{T} model \tcode{OutputIterator<I, T>} only if
\tcode{*i++ = E;} has effects equivalent to:
\begin{codeblock}
- *i = E;
- ++i;
+*i = E;
+++i;
\end{codeblock}
\pnum
diff --git a/source/overloading.tex b/source/overloading.tex
index 0602fc5..b5b07a9 100644
--- a/source/overloading.tex
+++ b/source/overloading.tex
@@ -2013,14 +2013,14 @@ applied during overload resolution, thereby avoiding infinite recursion.
\end{note}
\begin{example}
\begin{codeblock}
- struct Y { Y(int); };
- struct A { operator int(); };
- Y y1 = A(); // error: \tcode{A::operator int()} is not a candidate
-
- struct X { X(); };
- struct B { operator X(); };
- B b;
- X x{{b}}; // error: \tcode{B::operator X()} is not a candidate
+struct Y { Y(int); };
+struct A { operator int(); };
+Y y1 = A(); // error: \tcode{A::operator int()} is not a candidate
+
+struct X { X(); };
+struct B { operator X(); };
+B b;
+X x{{b}}; // error: \tcode{B::operator X()} is not a candidate
\end{codeblock}
\end{example}
diff --git a/source/ranges.tex b/source/ranges.tex
index 6a1313f..f15a010 100644
--- a/source/ranges.tex
+++ b/source/ranges.tex
@@ -249,8 +249,8 @@ expression-equivalent to:
valid expression and its type \tcode{I} models \tcode{Iterator} with overload
resolution performed in a context that includes the declarations:
\begin{codeblock}
- template<class T> void begin(T&&) = delete;
- template<class T> void begin(initializer_list<T>&&) = delete;
+template<class T> void begin(T&&) = delete;
+template<class T> void begin(initializer_list<T>&&) = delete;
\end{codeblock}
and does not include a declaration of \tcode{ranges::begin}.
@@ -293,8 +293,8 @@ expression-equivalent to:
\tcode{Sentinel<decltype(\brk{}ranges::\brk{}begin(E))>} with overload
resolution performed in a context that includes the declarations:
\begin{codeblock}
- template<class T> void end(T&&) = delete;
- template<class T> void end(initializer_list<T>&&) = delete;
+template<class T> void end(T&&) = delete;
+template<class T> void end(initializer_list<T>&&) = delete;
\end{codeblock}
and does not include a declaration of \tcode{ranges::end}.
@@ -369,7 +369,7 @@ expression-equivalent to:
expression and its type \tcode{I} models \tcode{Iterator} with overload
resolution performed in a context that includes the declaration:
\begin{codeblock}
- template<class T> void rbegin(T&&) = delete;
+template<class T> void rbegin(T&&) = delete;
\end{codeblock}
and does not include a declaration of \tcode{ranges::rbegin}.
@@ -413,7 +413,7 @@ expression-equivalent to:
\tcode{Sentinel<decltype(\brk{}ranges::rbegin(E))>} with overload
resolution performed in a context that includes the declaration:
\begin{codeblock}
- template<class T> void rend(T&&) = delete;
+template<class T> void rend(T&&) = delete;
\end{codeblock}
and does not include a declaration of \tcode{ranges::rend}.
@@ -507,7 +507,7 @@ object\iref{customization.point.object}. The expression
with overload resolution performed in a context that includes
the declaration:
\begin{codeblock}
- template<class T> void size(T&&) = delete;
+template<class T> void size(T&&) = delete;
\end{codeblock}
and does not include a declaration of \tcode{ranges::size}.
@@ -587,7 +587,7 @@ expression-equivalent to:
Otherwise, if \tcode{ranges::begin(E)} is a valid expression whose type models
\tcode{ContiguousIterator},
\begin{codeblock}
- ranges::begin(E) == ranges::end(E) ? nullptr : addressof(*ranges::begin(E))
+ranges::begin(E) == ranges::end(E) ? nullptr : addressof(*ranges::begin(E))
\end{codeblock}
except that \tcode{E} is evaluated only once.
diff --git a/source/templates.tex b/source/templates.tex
index 8ce5e96..19eb238 100644
--- a/source/templates.tex
+++ b/source/templates.tex
@@ -1199,7 +1199,7 @@ or a placeholder for a deduced class type\iref{dcl.type.class.deduct},
the type of the parameter is the type deduced
for the variable \tcode{x} in the invented declaration
\begin{codeblock}
- T x = @\grammartermnc{template-argument}@ ;
+T x = @\grammartermnc{template-argument}@ ;
\end{codeblock}
If a deduced parameter type is not permitted
for a \grammarterm{template-parameter} declaration\iref{temp.param},
diff --git a/source/utilities.tex b/source/utilities.tex
index cf2505c..7141b95 100644
--- a/source/utilities.tex
+++ b/source/utilities.tex
@@ -1955,10 +1955,10 @@ Otherwise, the program is ill-formed.
\pnum
\begin{example}
\begin{codeblock}
- const tuple<int, const int, double, double> t(1, 2, 3.4, 5.6);
- const int& i1 = get<int>(t); // OK. Not ambiguous. \tcode{i1 == 1}
- const int& i2 = get<const int>(t); // OK. Not ambiguous. \tcode{i2 == 2}
- const double& d = get<double>(t); // ERROR. ill-formed
+const tuple<int, const int, double, double> t(1, 2, 3.4, 5.6);
+const int& i1 = get<int>(t); // OK. Not ambiguous. \tcode{i1 == 1}
+const int& i2 = get<const int>(t); // OK. Not ambiguous. \tcode{i2 == 2}
+const double& d = get<double>(t); // ERROR. ill-formed
\end{codeblock}
\end{example}
\end{itemdescr}
--
2.7.4
From c18e893e8c7dd842f4f18a2d4edd09ef47e3608e Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <eelis@eelis.net>
Date: Wed, 5 Dec 2018 01:09:09 +0100
Subject: [PATCH 02/23] Use \range where appropriate.
---
source/algorithms.tex | 6 +++---
source/containers.tex | 60 +++++++++++++++++++++++++--------------------------
source/regex.tex | 2 +-
source/strings.tex | 20 ++++++++---------
4 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/source/algorithms.tex b/source/algorithms.tex
index 4b61488..30241b6 100644
--- a/source/algorithms.tex
+++ b/source/algorithms.tex
@@ -6459,7 +6459,7 @@ The elements \tcode{e} of \range{first}{last}
shall be 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))} shall imply \tcode{!bool(comp(\brk{}value, e))}
for the overloads in namespace \tcode{std}.
@@ -6523,7 +6523,7 @@ The elements \tcode{e} of \range{first}{last}
shall be 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))} shall imply \tcode{!bool(comp(\brk{}value, e))}
for the overloads in namespace \tcode{std}.
@@ -9663,7 +9663,7 @@ move assigns from \tcode{val} to \tcode{acc}.
\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/containers.tex b/source/containers.tex
index 79ed5d6..2dfc401 100644
--- a/source/containers.tex
+++ b/source/containers.tex
@@ -793,7 +793,7 @@ type\iref{temp.deduct} and
\tcode{i} and \tcode{j}
denote iterators satisfying input iterator 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}
@@ -801,7 +801,7 @@ denotes a value of type \tcode{X::size_type},
\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
@@ -844,7 +844,7 @@ The complexities of the expressions are sequence dependent.
Each iterator in the range \range{i}{j} shall be dereferenced exactly once.\br
\ensures \tcode{distance(begin(), end()) ==}
\tcode{distance(i, j)}\br
- Constructs a sequence container equal to the range \tcode{[i, j)} \\ \rowsep
+ Constructs a sequence container equal to the range \range{i}{j} \\ \rowsep
\tcode{X(il)} &
&
@@ -900,7 +900,7 @@ The complexities of the expressions are sequence dependent.
and swappable\iref{swappable.requirements}.
Each iterator in the range \range{i}{j} shall be dereferenced exactly once.\br
\requires \tcode{i} and \tcode{j} are not iterators into \tcode{a}.\br
- Inserts copies of elements in \tcode{[i, j)} before \tcode{p} \\ \rowsep
+ Inserts copies of elements in \range{i}{j} before \tcode{p} \\ \rowsep
\tcode{a.insert(p, il)} &
\tcode{iterator} &
@@ -916,7 +916,7 @@ The complexities of the expressions are sequence dependent.
\tcode{iterator} &
\requires\ For \tcode{vector} and \tcode{deque},
\tcode{T} shall be \oldconcept{MoveAssignable}.\br
- \effects\ Erases the elements in the range \tcode{[q1, q2)}. \\ \rowsep
+ \effects\ Erases the elements in the range \range{q1}{q2}. \\ \rowsep
\tcode{a.clear()} &
\tcode{void} &
@@ -934,7 +934,7 @@ The complexities of the expressions are sequence dependent.
\oldconcept{MoveInsertable} into \tcode{X}.\br
Each iterator in the range \range{i}{j} shall be dereferenced exactly once.\br
\requires \tcode{i}, \tcode{j} are not iterators into \tcode{a}.\br
- Replaces elements in \tcode{a} with a copy of \tcode{[i, j)}.\br
+ Replaces elements in \tcode{a} with a copy of \range{i}{j}.\br
Invalidates all references, pointers and iterators
referring to the elements of \tcode{a}.
For \tcode{vector} and \tcode{deque},
@@ -1607,7 +1607,7 @@ denotes a valid range,
\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}
@@ -1714,9 +1714,9 @@ and \tcode{nh} denotes a non-const rvalue of type \tcode{X::node_type}.
&
\requires\ \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);} &
&
@@ -2272,12 +2272,12 @@ In \tref{HashRequirements}:
is valid and denotes a type\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},
@@ -2433,7 +2433,7 @@ as the key equality predicate.
& \requires\ \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
@@ -2444,7 +2444,7 @@ equality predicate, and inserts elements from \tcode{[i, j)} into it.
\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
@@ -2455,7 +2455,7 @@ equality predicate, and inserts elements from \tcode{[i, j)} into it.
\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}
@@ -2468,7 +2468,7 @@ into it.
\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
@@ -2613,7 +2613,7 @@ start. Implementations are permitted to ignore the hint.%
& \tcode{void}
& \requires\ \tcode{value_type} shall be \oldconcept{EmplaceConstructible} into \tcode{X} from \tcode{*i}.\br
\requires \tcode{i} and \tcode{j} are not iterators in \tcode{a}.\br
- \effects Equivalent to \tcode{a.insert(t)} for each element in \tcode{[i,j)}.%
+ \effects Equivalent to \tcode{a.insert(t)} for each element in \range{i}{j}.%
& Average case \bigoh{N}, where $N$ is \tcode{distance(i, j)}.
Worst case \bigoh{N(\tcode{a.size()}\brk{}+\brk{}1)}.
\\ \rowsep
@@ -2723,7 +2723,7 @@ the number of elements erased.
%
\tcode{a.erase(q1, q2)}
& \tcode{iterator}
-& Erases all elements in the range \tcode{[q1, q2)}. Returns
+& Erases all elements in the range \range{q1}{q2}. Returns
the iterator immediately following the erased elements prior to the
erasure.%
& Average case linear in \tcode{distance(q1, q2)},
@@ -2826,14 +2826,14 @@ the number of elements erased.
\requires \tcode{b.bucket_count() > 0}.\br
Returns the index of the bucket in which elements with keys equivalent
to \tcode{k} would be found, if any such element existed.
- \ensures the return value shall be in the range \tcode{[0, b.bucket_count())}.%
+ \ensures the return value shall be in the range \range{0}{b.bucket_count()}.%
& Constant
\\ \rowsep
%
\indexunordmem{bucket_size}%
\tcode{b.bucket_size(n)}
& \tcode{size_type}
-& \requires \tcode{n} shall be in the range \tcode{[0, b.bucket_count())}.
+& \requires \tcode{n} shall be in the range \range{0}{b.bucket_count()}.
Returns the number of elements in the $\tcode{n}^\text{th}$ bucket.%
& \bigoh{\tcode{b.bucket_}\-\tcode{size(n)}}
\\ \rowsep
@@ -2842,7 +2842,7 @@ the number of elements erased.
\tcode{b.begin(n)}
& \tcode{local_iterator}; \br
\tcode{const_local_iterator} for const \tcode{b}.
-& \requires \tcode{n} shall be in the range \tcode{[0, b.bucket_count())}.
+& \requires \tcode{n} shall be in the range \range{0}{b.bucket_count()}.
\tcode{b.begin(n)} returns an iterator referring to the
first element in the bucket. If the bucket is empty, then
\tcode{b.begin(n) == b.end(n)}.%
@@ -2853,7 +2853,7 @@ the number of elements erased.
\tcode{b.end(n)}
& \tcode{local_iterator}; \br
\tcode{const_local_iterator} for const \tcode{b}.
-& \requires \tcode{n} shall be in the range \tcode{[0, b.bucket_count())}.
+& \requires \tcode{n} shall be in the range \range{0}{b.bucket_count()}.
\tcode{b.end(n)} returns an iterator which is the past-the-end
value for the bucket.%
& Constant
@@ -2862,7 +2862,7 @@ the number of elements erased.
\indexunordmem{cbegin}%
\tcode{b.cbegin(n)}
& \tcode{const_local_iterator}
-& \requires \tcode{n} shall be in the range \tcode{[0, b.bucket_count())}.
+& \requires \tcode{n} shall be in the range \range{0}{b.bucket_count()}.
\tcode{b.cbegin(n)} returns an iterator referring to the
first element in the bucket. If the bucket is empty, then
\tcode{b.cbegin(n) == b.cend(n)}.%
@@ -2872,7 +2872,7 @@ the number of elements erased.
\indexunordmem{cend}%
\tcode{b.cend(n)}
& \tcode{const_local_iterator}
-& \requires \tcode{n} shall be in the range \tcode{[0, b.bucket_count())}.%
+& \requires \tcode{n} shall be in the range \range{0}{b.bucket_count()}.%
\tcode{b.cend(n)} returns an iterator which is the past-the-end
value for the bucket.%
& Constant
@@ -4547,8 +4547,8 @@ the comparator \tcode{operator<} (for the first two overloads) or
\tcode{get_allocator() == x.get_allocator()} is \tcode{true}.
\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
+\effects 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
@@ -5108,7 +5108,7 @@ void splice(const_iterator position, list&& x, const_iterator first,
\begin{itemdescr}
\pnum
\requires
-\tcode{[first, last)}
+\range{first}{last}
is a valid range in
\tcode{x}.
The program has undefined behavior if
@@ -5206,7 +5206,7 @@ or
\pnum
\complexity
If the range
-\tcode{[first, last)}
+\range{first}{last}
is not empty, exactly
\tcode{(last - first) - 1}
applications of the corresponding predicate,
@@ -5231,8 +5231,8 @@ the comparator \tcode{operator<} (for the first two overloads) or
\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}.
@@ -5242,7 +5242,7 @@ refer to their elements, but they now behave as iterators into \tcode{*this}, no
\tcode{x}.
\pnum
-\remarks Stable\iref{algorithm.stable}. If \tcode{addressof(x) != this}, the range \tcode{[x.begin(), x.end())}
+\remarks 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. The behavior is undefined if
\tcode{get_allocator() != x.get_allocator()}.
diff --git a/source/regex.tex b/source/regex.tex
index 2d2f8c9..608c876 100644
--- a/source/regex.tex
+++ b/source/regex.tex
@@ -3637,7 +3637,7 @@ iterator then returns \tcode{*this}.
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)}.
diff --git a/source/strings.tex b/source/strings.tex
index 364a553..773327e 100644
--- a/source/strings.tex
+++ b/source/strings.tex
@@ -137,27 +137,27 @@ Operations on \tcode{X} shall not throw exceptions.
\tcode{X::lt(c,d)} & \tcode{bool} &
\returns 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)}
+\returns \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
+\returns 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
+\expects \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
\tcode{X::not_eof(e)} & \tcode{int_type} &
@@ -2434,7 +2434,7 @@ iterator erase(const_iterator first, const_iterator last);
\pnum
\effects
Removes the characters in the range
-\tcode{[first, last)}.
+\range{first}{last}.
\pnum
\returns
--
2.7.4
From 94a9dd680fd0ce86b9a3dd47fbd06ca88eb71d52 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <eelis@eelis.net>
Date: Fri, 10 Mar 2017 14:45:02 +0100
Subject: [PATCH 03/23] [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 b5df1f9..81daa3c 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -5354,9 +5354,9 @@ struct S {
};
void f()
{
-const S cs;
-int S::* pm = &S::i; // \tcode{pm} refers to \tcode{mutable} member \tcode{S::i}
-cs.*pm = 88; // ill-formed: \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; // ill-formed: \tcode{cs} is a const object
}
\end{codeblock}
\end{note}
--
2.7.4
From 03ee8674e20921005b29e73477fabb044722009d Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <eelis@eelis.net>
Date: Sun, 26 Feb 2017 14:24:19 +0100
Subject: [PATCH 04/23] [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 81daa3c..1e108c2 100644
--- a/source/expressions.tex
+++ b/source/expressions.tex
@@ -3472,7 +3472,7 @@ The result of a \tcode{typeid} expression is an lvalue of static type
\indextext{\idxcode{type_info}}%
\indexlibrary{\idxcode{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.7.4
From edf3ee963f2ddf6b68c178a7fc46394fcd188014 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <eelis@eelis.net>
Date: Wed, 1 Feb 2017 03:39:27 +0100
Subject: [PATCH 05/23] Make references more precise.
---
source/basic.tex | 4 ++--
source/declarations.tex | 2 +-
source/statements.tex | 2 +-
source/strings.tex | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/source/basic.tex b/source/basic.tex
index 83b9fca..cdc0449 100644
--- a/source/basic.tex
+++ b/source/basic.tex
@@ -105,7 +105,7 @@ A declaration may also have effects including:
\item a static assertion\iref{dcl.dcl},
\item controlling template instantiation\iref{temp.explicit},
\item guiding template argument deduction for constructors\iref{temp.deduct.guide},
-\item use of attributes\iref{dcl.dcl}, and
+\item use of attributes\iref{dcl.attr}, and
\item nothing (in the case of an \grammarterm{empty-declaration}).
\end{itemize}
@@ -4488,7 +4488,7 @@ Integral and floating-point types are collectively
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/declarations.tex b/source/declarations.tex
index ef8cfbd..7d073d7 100644
--- a/source/declarations.tex
+++ b/source/declarations.tex
@@ -7718,7 +7718,7 @@ extern "C" {
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/statements.tex b/source/statements.tex
index 6a18726..b3f0661 100644
--- a/source/statements.tex
+++ b/source/statements.tex
@@ -958,7 +958,7 @@ to determine whether this is the case. This resolves the meaning
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 773327e..c982992 100644
--- a/source/strings.tex
+++ b/source/strings.tex
@@ -1398,7 +1398,7 @@ basic_string& operator=(basic_string&& str)
\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.7.4
From 98940dbd971c25a25b9470dc8161cce71ef85788 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <eelis@eelis.net>
Date: Sat, 7 Jan 2017 01:59:05 +0100
Subject: [PATCH 06/23] [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 7f85dc7..a55ace9 100644
--- a/source/numerics.tex
+++ b/source/numerics.tex
@@ -2141,21 +2141,21 @@ according to \ref{strings} and \ref{input.output}.
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
@@ -2234,13 +2234,13 @@ according to \ref{strings} and \ref{input.output}.
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}
@@ -2256,7 +2256,7 @@ according to \ref{strings} and \ref{input.output}.
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}
@@ -2287,7 +2287,7 @@ according to \ref{strings} and \ref{input.output}.
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.7.4
From 0398e157869e83554d1c1b9d057abc9b65f8b645 Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <eelis@eelis.net>
Date: Thu, 5 Jan 2017 23:06:32 +0100
Subject: [PATCH 07/23] Move index entries for first item in enumeration into
item.
---
source/lex.tex | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/source/lex.tex b/source/lex.tex
index 4e76e71..b218a5f 100644
--- a/source/lex.tex
+++ b/source/lex.tex
@@ -58,9 +58,10 @@ following phases.\footnote{Implementations must behave as if these separate phas
occur, although in practice different phases might be folded together.}
\begin{enumerate}
+\item
\indextext{character!source file}%
\indextext{character set!basic source}%
-\item Physical source file characters are mapped, in an
+Physical source file characters are mapped, in an
\impldef{mapping physical source file characters to basic source character set} manner,
to the basic source character set (introducing new-line characters for end-of-line
indicators) if necessary.
--
2.7.4
From 0afe3754ce4251988050493b03fb57f64bde2697 Mon Sep 17 00:00:00 2001
From: timsong-cpp <rs2740@gmail.com>
Date: Sun, 1 Jan 2017 16:12:50 +0100
Subject: [PATCH 08/23] Use floattable for [optional] tables.
---
source/tables.tex | 31 ++++---------------------------
1 file changed, 4 insertions(+), 27 deletions(-)
diff --git a/source/tables.tex b/source/tables.tex
index 1b63834..a733e40 100644
--- a/source/tables.tex
+++ b/source/tables.tex
@@ -472,36 +472,13 @@
% tables.
\newenvironment{lib2dtab2base}[7]
{
- %% no lines in the top-left cell, and leave a gap around the headers
- %% FIXME: I tried to use hhline here, but it doesn't appear to support
- %% the join between the leftmost top header and the topmost left header,
- %% so we fake it with an empty row and column.
- \newcommand{\topline}{\cline{3-4}}
- \newcommand{\rowsep}{\cline{1-1}\cline{3-4}}
- \newcommand{\capsep}{
- \topline
- \multicolumn{4}{c}{}\\[-0.8\normalbaselineskip]
- \rowsep
- }
- \newcommand{\bottomline}{\rowsep}
- \newcommand{\hdstyle}[1]{\textbf{##1}}
- \newcommand{\rowhdr}[1]{\hdstyle{##1}&}
- \newcommand{\colhdr}[1]{\multicolumn{1}{|>{\centering}m{#6}|}{\hdstyle{##1}}}
- %% FIXME: figure out a way to reuse floattable here
- \begin{table}[htbp]
- \caption{\label{#2}#1}
- \begin{center}
- \begin{tabular}{|>{\centering}m{#5}|@{}p{0.2\normalbaselineskip}@{}|m{#6}|m{#7}|}
- %% table header
+ \newcommand{\rowhdr}[1]{\textbf{##1}}
+ \begin{floattable}{#1}{#2}{p{#5}|p{#6}|p{#7}}
\topline
- \multicolumn{1}{c}{}&&\colhdr{#3}&\colhdr{#4}\\
- \capsep
+ & \chdr{#3} & \rhdr{#4} \\ \rowsep
}
{
- \bottomline
- \end{tabular}
- \end{center}
- \end{table}
+ \end{floattable}
}
\newenvironment{lib2dtab2}[4]{
--
2.7.4
From 962b9a95a8da9e5a383750d63d1224596f21a38d Mon Sep 17 00:00:00 2001
From: Eelis van der Weegen <eelis@eelis.net>
Date: Mon, 23 Jan 2017 06:58:26 +0100
Subject: [PATCH 09/23] 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 ++++++++--------