Fix bug report #1797.

[SVN r44126]
This commit is contained in:
John Maddock
2008-04-09 15:21:03 +00:00
parent 4298d36237
commit aaefead804
24 changed files with 47 additions and 47 deletions

View File

@ -8,7 +8,7 @@
[section:function_traits function_traits]
[def __argN '''arg<replaceable>N</replaceable>_type''']
template <class T>
template <class F>
struct function_traits
{
static const std::size_t arity = __below;
@ -19,7 +19,7 @@
The class template function_traits will only compile if:
* The compiler supports partial specialization of class templates.
* The template argument `T` is a /function type/, note that this ['[*is not]]
* The template argument `F` is a /function type/, note that this ['[*is not]]
the same thing as a /pointer to a function/.
[tip
@ -30,11 +30,11 @@ type use __remove_pointer.]
[table Function Traits Members
[[Member] [Description]]
[[`function_traits<T>::arity`]
[[`function_traits<F>::arity`]
[An integral constant expression that gives the number of arguments accepted by the function type `F`.]]
[[`function_traits<T>::result_type`]
[[`function_traits<F>::result_type`]
[The type returned by function type `F`.]]
[[`function_traits<T>::__argN`]
[[`function_traits<F>::__argN`]
[The '''<replaceable>N</replaceable>th''' argument type of function type `F`, where `1 <= N <= arity` of `F`.]]
]
@ -47,7 +47,7 @@ type use __remove_pointer.]
[[`function_traits<long (int)>::result_type`] [The type `long`.]]
[[`function_traits<long (int)>::arg1_type`] [The type `int`.]]
[[`function_traits<long (int, long, double, void*)>::arg4_type`] [The type `void*`.]]
[[`function_traits<long (int, long, double, void*)>::arg5_type`] [A compiler error: there is no `arg4_type` since there are only three arguments.]]
[[`function_traits<long (int, long, double, void*)>::arg5_type`] [A compiler error: there is no `arg5_type` since there are only four arguments.]]
[[`function_traits<long (*)(void)>::arity`] [A compiler error: argument type is a /function pointer/, and not a /function type/.]]
]

View File

@ -56,7 +56,7 @@
method available to them.
</p>
<a name="boost_typetraits.background.type_traits"></a><h5>
<a name="id436271"></a>
<a name="id436329"></a>
<a href="background.html#boost_typetraits.background.type_traits">Type Traits</a>
</h5>
<p>
@ -84,7 +84,7 @@
given.
</p>
<a name="boost_typetraits.background.implementation"></a><h5>
<a name="id436382"></a>
<a name="id436440"></a>
<a href="background.html#boost_typetraits.background.implementation">Implementation</a>
</h5>
<p>
@ -174,7 +174,7 @@
in the default template.
</p>
<a name="boost_typetraits.background.optimized_copy"></a><h5>
<a name="id490300"></a>
<a name="id490355"></a>
<a href="background.html#boost_typetraits.background.optimized_copy">Optimized copy</a>
</h5>
<p>
@ -247,7 +247,7 @@
otherwise it will call the "slow but safe version".
</p>
<a name="boost_typetraits.background.was_it_worth_it_"></a><h5>
<a name="id490845"></a>
<a name="id490900"></a>
<a href="background.html#boost_typetraits.background.was_it_worth_it_">Was it worth it?</a>
</h5>
<p>
@ -280,7 +280,7 @@
</li>
</ul></div>
<div class="table">
<a name="id490916"></a><p class="title"><b>Table<EFBFBD>1.1.<2E>Time taken to copy 1000 elements using `copy&lt;const
<a name="id490971"></a><p class="title"><b>Table<EFBFBD>1.1.<2E>Time taken to copy 1000 elements using `copy&lt;const
T*, T*&gt;` (times in micro-seconds)</b></p>
<div class="table-contents"><table class="table" summary="Time taken to copy 1000 elements using `copy&lt;const
T*, T*&gt;` (times in micro-seconds)">
@ -379,7 +379,7 @@
</table></div>
</div>
<br class="table-break"><a name="boost_typetraits.background.pair_of_references"></a><h5>
<a name="id491072"></a>
<a name="id491128"></a>
<a href="background.html#boost_typetraits.background.pair_of_references">Pair of References</a>
</h5>
<p>
@ -416,7 +416,7 @@
to hold non-reference types, references, and constant references:
</p>
<div class="table">
<a name="id491434"></a><p class="title"><b>Table<EFBFBD>1.2.<2E>Required Constructor Argument Types</b></p>
<a name="id491489"></a><p class="title"><b>Table<EFBFBD>1.2.<2E>Required Constructor Argument Types</b></p>
<div class="table-contents"><table class="table" summary="Required Constructor Argument Types">
<colgroup>
<col>
@ -481,7 +481,7 @@
adds a reference to its type, unless it is already a reference.
</p>
<div class="table">
<a name="id491559"></a><p class="title"><b>Table<EFBFBD>1.3.<2E>Using add_reference to synthesize the correct constructor
<a name="id491614"></a><p class="title"><b>Table<EFBFBD>1.3.<2E>Using add_reference to synthesize the correct constructor
type</b></p>
<div class="table-contents"><table class="table" summary="Using add_reference to synthesize the correct constructor
type">
@ -598,7 +598,7 @@
easier to maintain and easier to understand.
</p>
<a name="boost_typetraits.background.conclusion"></a><h5>
<a name="id492181"></a>
<a name="id492236"></a>
<a href="background.html#boost_typetraits.background.conclusion">Conclusion</a>
</h5>
<p>
@ -611,7 +611,7 @@
can be optimal as well as generic.
</p>
<a name="boost_typetraits.background.acknowledgements"></a><h5>
<a name="id492227"></a>
<a name="id492282"></a>
<a href="background.html#boost_typetraits.background.acknowledgements">Acknowledgements</a>
</h5>
<p>
@ -619,7 +619,7 @@
comments when preparing this article.
</p>
<a name="background.references"></a><a name="boost_typetraits.background.references"></a><h5>
<a name="id492261"></a>
<a name="id492316"></a>
<a href="background.html#boost_typetraits.background.references">References</a>
</h5>
<div class="orderedlist"><ol type="1">

View File

@ -91,7 +91,7 @@
<span class="keyword">struct</span> <a href="../reference/remove_volatile.html" title="remove_volatile">remove_volatile</a><span class="special">;</span>
</pre>
<a name="boost_typetraits.category.transform.broken_compiler_workarounds_"></a><h5>
<a name="id496208"></a>
<a name="id496263"></a>
<a href="transform.html#boost_typetraits.category.transform.broken_compiler_workarounds_">Broken
Compiler Workarounds:</a>
</h5>

View File

@ -71,7 +71,7 @@
of the following macros:
</p>
<div class="table">
<a name="id498446"></a><p class="title"><b>Table<EFBFBD>1.4.<2E>Macros for Compiler Intrinsics</b></p>
<a name="id498501"></a><p class="title"><b>Table<EFBFBD>1.4.<2E>Macros for Compiler Intrinsics</b></p>
<div class="table-contents"><table class="table" summary="Macros for Compiler Intrinsics">
<colgroup>
<col>

View File

@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id503581"></a><p class="title"><b>Table<EFBFBD>1.5.<2E>Examples</b></p>
<a name="id503636"></a><p class="title"><b>Table<EFBFBD>1.5.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id504219"></a><p class="title"><b>Table<EFBFBD>1.6.<2E>Examples</b></p>
<a name="id504275"></a><p class="title"><b>Table<EFBFBD>1.6.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -56,7 +56,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id504931"></a><p class="title"><b>Table<EFBFBD>1.7.<2E>Examples</b></p>
<a name="id504987"></a><p class="title"><b>Table<EFBFBD>1.7.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id505569"></a><p class="title"><b>Table<EFBFBD>1.8.<2E>Examples</b></p>
<a name="id505624"></a><p class="title"><b>Table<EFBFBD>1.8.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id506198"></a><p class="title"><b>Table<EFBFBD>1.9.<2E>Examples</b></p>
<a name="id506254"></a><p class="title"><b>Table<EFBFBD>1.9.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -48,7 +48,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id507857"></a><p class="title"><b>Table<EFBFBD>1.10.<2E>Examples</b></p>
<a name="id507911"></a><p class="title"><b>Table<EFBFBD>1.10.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -49,7 +49,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id509642"></a><p class="title"><b>Table<EFBFBD>1.11.<2E>Examples</b></p>
<a name="id509697"></a><p class="title"><b>Table<EFBFBD>1.11.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -26,7 +26,7 @@
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_typetraits.reference.function_traits"></a><a href="function_traits.html" title="function_traits"> function_traits</a>
</h3></div></div></div>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">F</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">function_traits</span>
<span class="special">{</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">arity</span> <span class="special">=</span> <em class="replaceable"><code>see-below</code></em><span class="special">;</span>
@ -42,7 +42,7 @@
The compiler supports partial specialization of class templates.
</li>
<li>
The template argument <code class="computeroutput"><span class="identifier">T</span></code>
The template argument <code class="computeroutput"><span class="identifier">F</span></code>
is a <span class="emphasis"><em>function type</em></span>, note that this <span class="emphasis"><em><span class="bold"><strong>is not</strong></span></em></span> the same thing as a <span class="emphasis"><em>pointer
to a function</em></span>.
</li>
@ -59,7 +59,7 @@
</p></td></tr>
</table></div>
<div class="table">
<a name="id510122"></a><p class="title"><b>Table<EFBFBD>1.12.<2E>Function Traits Members</b></p>
<a name="id510177"></a><p class="title"><b>Table<EFBFBD>1.12.<2E>Function Traits Members</b></p>
<div class="table-contents"><table class="table" summary="Function Traits Members">
<colgroup>
<col>
@ -81,7 +81,7 @@
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">arity</span></code>
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">&gt;::</span><span class="identifier">arity</span></code>
</p>
</td>
<td>
@ -94,7 +94,7 @@
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">result_type</span></code>
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">&gt;::</span><span class="identifier">result_type</span></code>
</p>
</td>
<td>
@ -106,7 +106,7 @@
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span>arg<em class="replaceable"><code>N</code></em>_type</code>
<code class="computeroutput"><span class="identifier">function_traits</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">&gt;::</span>arg<em class="replaceable"><code>N</code></em>_type</code>
</p>
</td>
<td>
@ -122,7 +122,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
<a name="id510400"></a><p class="title"><b>Table<EFBFBD>1.13.<2E>Examples</b></p>
<a name="id510455"></a><p class="title"><b>Table<EFBFBD>1.13.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>
@ -233,8 +233,8 @@
</td>
<td>
<p>
A compiler error: there is no <code class="computeroutput"><span class="identifier">arg4_type</span></code>
since there are only three arguments.
A compiler error: there is no <code class="computeroutput"><span class="identifier">arg5_type</span></code>
since there are only four arguments.
</p>
</td>
</tr>

View File

@ -49,7 +49,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id515889"></a><p class="title"><b>Table<EFBFBD>1.14.<2E>Examples</b></p>
<a name="id515944"></a><p class="title"><b>Table<EFBFBD>1.14.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id536228"></a><p class="title"><b>Table<EFBFBD>1.15.<2E>Examples</b></p>
<a name="id536284"></a><p class="title"><b>Table<EFBFBD>1.15.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id536861"></a><p class="title"><b>Table<EFBFBD>1.16.<2E>Examples</b></p>
<a name="id536916"></a><p class="title"><b>Table<EFBFBD>1.16.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -51,7 +51,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id537561"></a><p class="title"><b>Table<EFBFBD>1.17.<2E>Examples</b></p>
<a name="id537616"></a><p class="title"><b>Table<EFBFBD>1.17.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id538994"></a><p class="title"><b>Table<EFBFBD>1.18.<2E>Examples</b></p>
<a name="id539049"></a><p class="title"><b>Table<EFBFBD>1.18.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id539715"></a><p class="title"><b>Table<EFBFBD>1.19.<2E>Examples</b></p>
<a name="id539771"></a><p class="title"><b>Table<EFBFBD>1.19.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id540419"></a><p class="title"><b>Table<EFBFBD>1.20.<2E>Examples</b></p>
<a name="id540474"></a><p class="title"><b>Table<EFBFBD>1.20.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -54,7 +54,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id541122"></a><p class="title"><b>Table<EFBFBD>1.21.<2E>Examples</b></p>
<a name="id541178"></a><p class="title"><b>Table<EFBFBD>1.21.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id541858"></a><p class="title"><b>Table<EFBFBD>1.22.<2E>Examples</b></p>
<a name="id541913"></a><p class="title"><b>Table<EFBFBD>1.22.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id542538"></a><p class="title"><b>Table<EFBFBD>1.23.<2E>Examples</b></p>
<a name="id542592"></a><p class="title"><b>Table<EFBFBD>1.23.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -53,7 +53,7 @@
or <code class="computeroutput"> <span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">type_traits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
</p>
<div class="table">
<a name="id543144"></a><p class="title"><b>Table<EFBFBD>1.24.<2E>Examples</b></p>
<a name="id543198"></a><p class="title"><b>Table<EFBFBD>1.24.<2E>Examples</b></p>
<div class="table-contents"><table class="table" summary="Examples">
<colgroup>
<col>

View File

@ -30,7 +30,7 @@
Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
Ramey and Jeremy Siek</p></div>
<div><div class="legalnotice">
<a name="id437579"></a><p>
<a name="id437635"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>