Skip to content

Commit 1506916

Browse files
committed
Fix heading numbering
1 parent 0b5b60f commit 1506916

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

articles/variadic-function-templates.dd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ $(CONSOLE
2929
language makes possible.
3030
)
3131

32-
$(H3 $(LNAME2 cpp-solutions, C++ Solutions))
32+
$(H2 $(LNAME2 cpp-solutions, C++ Solutions))
3333

34-
$(H4 The Standard C++ Solution)
34+
$(H3 The Overload Solution)
3535

3636
$(P The straightforward way to do this in standard C++
3737
is to use a series of function templates, one for
@@ -98,7 +98,7 @@ template<class T1, class T2, class T3> void print(T1 a1, T2 a2, T3 a3)
9898
compilation.
9999
)
100100

101-
$(H4 C++ Variadic Templates)
101+
$(H3 C++ Variadic Templates)
102102

103103
$(P C++11 supports variadic templates:
104104
)
@@ -120,9 +120,9 @@ template<class T, class... U> void print(T a1, U... an)
120120
A specialization with no arguments ends the recursion.
121121
)
122122

123-
$(H3 $(LNAME2 d-solutions, D Programming Language Solutions))
123+
$(H2 $(LNAME2 d-solutions, D Programming Language Solutions))
124124

125-
$(H4 The D Look Ma No Templates Solution)
125+
$(H3 The D Look Ma No Templates Solution)
126126

127127
$(P It is not practical to solve this problem in C++ without
128128
using templates. In D, one can because D supports typesafe
@@ -151,7 +151,7 @@ void print(...)
151151
which give a pointer to the values and their types, respectively.)
152152
)
153153

154-
$(H4 Translating the Variadic C++ Solution into D)
154+
$(H3 Translating the Variadic C++ Solution into D)
155155

156156
$(P Variadic templates in D enable a straightforward translation
157157
of the C++11 variadic solution:
@@ -187,7 +187,7 @@ void print(T, A...)(T t, A a)
187187
arguments by calling `print()()`.
188188
)
189189

190-
$(H4 The Static If Solution)
190+
$(H3 The Static If Solution)
191191

192192
$(P It would be nice to encapsulate all the logic into a
193193
single function. One way to do that is by using
@@ -213,7 +213,7 @@ void print(A...)(A a)
213213
from any remaining elements in the original sequence.
214214
)
215215

216-
$(H4 The Foreach Solution)
216+
$(H3 The Foreach Solution)
217217

218218
$(P But since sequences can be manipulated like arrays,
219219
we can use a `foreach` statement to iterate over

0 commit comments

Comments
 (0)