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
2020from a function, and consists of a collection of `typedef`s defined
2121as 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"]
2323never 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
2525case, if your existing practice is to use the type defined on the
2626left, then replace it with the __call_traits__ defined type on the
2727right.
@@ -100,7 +100,7 @@ used to solve the reference to reference problem.
100100Notes:
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
151150The following table shows the effect that __call_traits__ has on
152151various 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
210208Consider 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
247244If we pass the name of an array as one (or both) arguments to `__std_make_pair__`,
248245then 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
277274would 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
283279The __call_traits__ template will "optimize" the passing
284280of 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
359355types], differ from existing practice only in the `param_type`
360356`typedef`. In this case passing `T const` is compatible
361357with 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
363359be any worse than existing practice.
364360
365361Pointers 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__
369365members must be defined such that these problems do
370366not 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
425421returned, not a copy of the whole array, and again __call_traits__
426422makes the degradation explicit. The `value_type` member is useful
427423whenever 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
430426Footnote: the array specialisation for __call_traits__ is the least
431427well understood of all the __call_traits__ specialisations. If the given
0 commit comments