Skip to content

Commit 49cd132

Browse files
committed
Fixed references to Doxygen-generated reference and between sections.
Since BoostBook stylesheets were updated to pass through Doxygen anchor names to BoostBook output, references from QuickBook and manually written BoostBook docs were broken. Fix this by using classref/classname and similar tools to reference Doxygen-generated content. Also, to avoid anchor clashes between different parts of Boost.Utility docs, use proper anchor namespacing: avoid using manual anchors where possible and use fully qualified namespace where not. Fixes #110.
1 parent 67d8cbd commit 49cd132

File tree

13 files changed

+573
-617
lines changed

13 files changed

+573
-617
lines changed

doc/BOOST_BINARY.qbk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
/]
77

88
[/===============]
9-
[#sec:BOOST_BINARY]
10-
[section Binary Integer Literals]
9+
[section:BOOST_BINARY Binary Integer Literals]
1110
[/===============]
1211

1312
[section Introduction]

doc/Jamfile.v2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ doxygen result_of_reference
285285
doxygen string_view_reference
286286
:
287287
$(INCLUDES)/boost/utility/string_view.hpp
288+
$(INCLUDES)/boost/utility/string_ref.hpp
288289
:
289290
<location>tmp
290291
<doxygen:param>ENABLE_PREPROCESSING=YES

doc/call_traits.qbk

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/]
88

99
[/===============]
10-
[section Call Traits]
10+
[section:call_traits Call Traits]
1111
[/===============]
1212

1313
[section Introduction]
@@ -19,9 +19,9 @@ The template class __call_traits_T__ encapsulates the
1919
"best" method to pass a parameter of some type `T` to or
2020
from a function, and consists of a collection of `typedef`s defined
2121
as in the table below. The purpose of __call_traits__ is to ensure
22-
that problems like [link sec:refs "references to references"]
22+
that problems like [link utility.utilities.call_traits.examples.refs "references to references"]
2323
never occur, and that parameters are passed in the most efficient
24-
manner possible, as in the [link sec:examples examples]. In each
24+
manner possible, as in the [link utility.utilities.call_traits.examples examples]. In each
2525
case, if your existing practice is to use the type defined on the
2626
left, then replace it with the __call_traits__ defined type on the
2727
right.
@@ -100,7 +100,7 @@ used to solve the reference to reference problem.
100100
Notes:
101101

102102
# If `T` is already reference type, then __call_traits__ is
103-
defined such that [link sec:refs "references to references"]
103+
defined such that [link utility.utilities.call_traits.examples.refs "references to references"]
104104
do not occur (requires partial specialization).
105105
# If `T` is an array type, then __call_traits__ defines `value_type`
106106
as a "constant pointer to type" rather than an
@@ -145,8 +145,7 @@ If `T` is an assignable type the following assignments are possible:
145145
]
146146
[endsect]
147147

148-
[#sec:examples]
149-
[section Examples]
148+
[section:examples Examples]
150149

151150
The following table shows the effect that __call_traits__ has on
152151
various types.
@@ -204,8 +203,7 @@ struct contained
204203
```
205204
[endsect]
206205

207-
[#sec:refs]
208-
[section Example 2 (the reference to reference problem):]
206+
[section:refs Example 2 (the reference to reference problem):]
209207

210208
Consider the definition of __std_binder1st__:
211209

@@ -241,8 +239,7 @@ the no "reference to reference" occurs.
241239

242240
[endsect]
243241

244-
[#sec:example3]
245-
[section Example 3 (the `make_pair` problem):]
242+
[section:example3 Example 3 (the `make_pair` problem):]
246243

247244
If we pass the name of an array as one (or both) arguments to `__std_make_pair__`,
248245
then template argument deduction deduces the passed parameter as
@@ -277,8 +274,7 @@ __std_make_pair__ are not expressed in terms of __call_traits__: doing so
277274
would prevent template argument deduction from functioning.
278275
[endsect]
279276

280-
[#sec:example4]
281-
[section Example 4 (optimising fill):]
277+
[section:example4 Example 4 (optimising fill):]
282278

283279
The __call_traits__ template will "optimize" the passing
284280
of a small built-in type as a function parameter. This mainly has
@@ -359,12 +355,12 @@ Small built-in types, what the standard calls [@https://en.cppreference.com/w/cp
359355
types], differ from existing practice only in the `param_type`
360356
`typedef`. In this case passing `T const` is compatible
361357
with existing practice, but may improve performance in some cases
362-
(see [link sec:example4 Example 4]). In any case this should never
358+
(see [link utility.utilities.call_traits.examples.example4 Example 4]). In any case this should never
363359
be any worse than existing practice.
364360

365361
Pointers follow the same rationale as small built-in types.
366362

367-
For reference types the rationale follows [link sec:refs Example 2]
363+
For reference types the rationale follows [link utility.utilities.call_traits.examples.refs Example 2]
368364
- references to references are not allowed, so the __call_traits__
369365
members must be defined such that these problems do
370366
not occur. There is a proposal to modify the language such that
@@ -425,7 +421,7 @@ For `value_type` (return by value), again only a pointer may be
425421
returned, not a copy of the whole array, and again __call_traits__
426422
makes the degradation explicit. The `value_type` member is useful
427423
whenever an array must be explicitly degraded to a pointer -
428-
[link sec:example3 Example 3] provides the test case.
424+
[link utility.utilities.call_traits.examples.example3 Example 3] provides the test case.
429425

430426
Footnote: the array specialisation for __call_traits__ is the least
431427
well understood of all the __call_traits__ specialisations. If the given

doc/compressed_pair.qbk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
or copy at http://boost.org/LICENSE_1_0.txt
99
]
1010

11-
[section Compressed Pair]
11+
[section:compressed_pair Compressed Pair]
1212

1313
[section Introduction]
1414

doc/in_place_factory.qbk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
/]
88

99
[/===============]
10-
[#sec:in_place_factory]
11-
[section In-place Factory]
10+
[section:in_place_factory In-place Factory]
1211
[/===============]
1312

1413
[section Introduction]
@@ -296,7 +295,6 @@ void foo()
296295
[endsect]
297296

298297
[/===============]
299-
[#boost.typed_in_place_factory_base]
300298
[xinclude tmp/in_place_factory_reference.xml]
301299
[/===============]
302300

0 commit comments

Comments
 (0)