revises function object concepts and functional module documenation to reflect

boost::result_of-based result computation


[SVN r38209]
This commit is contained in:
Tobias Schwinger
2007-07-13 19:25:34 +00:00
parent f05493abf0
commit 9df373af5f
227 changed files with 10684 additions and 4457 deletions

View File

@ -30,7 +30,7 @@
Sequence">Associative
Sequence</a></h4></div></div></div>
<a name="fusion.sequences.concepts.associative_sequence.description"></a><h5>
<a name="id966184"></a>
<a name="id974544"></a>
<a href="associative_sequence.html#fusion.sequences.concepts.associative_sequence.description">Description</a>
</h5>
<p>
@ -71,7 +71,7 @@
</dl>
</div>
<a name="fusion.sequences.concepts.associative_sequence.valid_expressions"></a><h5>
<a name="id966333"></a>
<a name="id974700"></a>
<a href="associative_sequence.html#fusion.sequences.concepts.associative_sequence.valid_expressions">Valid
Expressions</a>
</h5>
@ -86,43 +86,101 @@
<col>
</colgroup>
<thead><tr>
<th>Expression</th>
<th>Return type</th>
<th>Type Requirements</th>
<th>Runtime
Complexity</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Return type
</p>
</th>
<th>
<p>
Type Requirements
</p>
</th>
<th>
<p>
Runtime Complexity
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td><code class="computeroutput"><a href="../intrinsics/functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a><span class="special">&lt;</span><span class="identifier">K</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span></code></td>
<td>
<a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
Boolean Constant</a>. Convertible to bool.</td>
<td><EFBFBD></td>
<td>Constant</td>
<p>
<code class="computeroutput"><a href="../intrinsics/functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a><span class="special">&lt;</span><span class="identifier">K</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
<a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
Boolean Constant</a>. Convertible to bool.
</p>
</td>
<td>
<p>
</p>
</td>
<td>
<p>
Constant
</p>
</td>
</tr>
<tr>
<td><code class="computeroutput"><a href="../intrinsics/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">K</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span></code></td>
<td>Any
type</td>
<td><EFBFBD></td>
<td>Constant</td>
<td>
<p>
<code class="computeroutput"><a href="../intrinsics/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">K</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
Any type
</p>
</td>
<td>
<p>
</p>
</td>
<td>
<p>
Constant
</p>
</td>
</tr>
<tr>
<td><code class="computeroutput"><a href="../intrinsics/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">K</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">o</span></code></td>
<td>Any
type</td>
<td>
<code class="computeroutput"><span class="identifier">s</span></code>
is mutable and <code class="computeroutput"><span class="identifier">e</span> <span class="special">=</span> <span class="identifier">o</span></code>,
where <code class="computeroutput"><span class="identifier">e</span></code> is the first
element in the sequence, is a valid expression.</td>
<td>Constant</td>
<p>
<code class="computeroutput"><a href="../intrinsics/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">K</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span>
<span class="special">=</span> <span class="identifier">o</span></code>
</p>
</td>
<td>
<p>
Any type
</p>
</td>
<td>
<p>
<code class="computeroutput"><span class="identifier">s</span></code> is mutable and
<code class="computeroutput"><span class="identifier">e</span> <span class="special">=</span>
<span class="identifier">o</span></code>, where <code class="computeroutput"><span class="identifier">e</span></code> is the first element in the
sequence, is a valid expression.
</p>
</td>
<td>
<p>
Constant
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="fusion.sequences.concepts.associative_sequence.result_type_expressions"></a><h5>
<a name="id966601"></a>
<a name="id975042"></a>
<a href="associative_sequence.html#fusion.sequences.concepts.associative_sequence.result_type_expressions">Result
Type Expressions</a>
</h5>
@ -132,37 +190,69 @@
<col>
</colgroup>
<thead><tr>
<th>Expression</th>
<th>Compile Time Complexity</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Compile Time Complexity
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td><code class="computeroutput"><a href="../intrinsics/metafunctions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">has_key</span></code></a><span class="special">&lt;</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">K</span><span class="special">&gt;::</span><span class="identifier">type</span></code></td>
<td>Amortized constant
time</td>
<td>
<p>
<code class="computeroutput"><a href="../intrinsics/metafunctions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">has_key</span></code></a><span class="special">&lt;</span><span class="identifier">S</span><span class="special">,</span>
<span class="identifier">K</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
<td>
<p>
Amortized constant time
</p>
</td>
</tr>
<tr>
<td><code class="computeroutput"><a href="../intrinsics/metafunctions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">K</span><span class="special">&gt;::</span><span class="identifier">type</span></code></td>
<td>Amortized constant
time</td>
<td>
<p>
<code class="computeroutput"><a href="../intrinsics/metafunctions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">S</span><span class="special">,</span>
<span class="identifier">K</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
<td>
<p>
Amortized constant time
</p>
</td>
</tr>
<tr>
<td><code class="computeroutput"><a href="../intrinsics/metafunctions/value_at_key.html" title="value_at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_key</span></code></a><span class="special">&lt;</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">K</span><span class="special">&gt;::</span><span class="identifier">type</span></code></td>
<td>Amortized constant
time</td>
<td>
<p>
<code class="computeroutput"><a href="../intrinsics/metafunctions/value_at_key.html" title="value_at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_key</span></code></a><span class="special">&lt;</span><span class="identifier">S</span><span class="special">,</span>
<span class="identifier">K</span><span class="special">&gt;::</span><span class="identifier">type</span></code>
</p>
</td>
<td>
<p>
Amortized constant time
</p>
</td>
</tr>
</tbody>
</table></div>
<p class="blurb">
<div class="sidebar"><p>
<span class="inlinemediaobject"><img src="../../../images/note.png" alt="note"></span> <code class="computeroutput"><a href="../intrinsics/metafunctions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">K</span><span class="special">&gt;</span></code> returns the actual type returned by
<code class="computeroutput"><a href="../intrinsics/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">K</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span></code>. In
most cases, this is a reference. Hence, there is no way to know the exact
element type using <code class="computeroutput"><a href="../intrinsics/metafunctions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">K</span><span class="special">&gt;</span></code>.The element at <code class="computeroutput"><span class="identifier">K</span></code>
may actually be a reference to begin with. For this purpose, you can use
<code class="computeroutput"><a href="../intrinsics/metafunctions/value_at_key.html" title="value_at_key"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_at_key</span></code></a><span class="special">&lt;</span><span class="identifier">S</span><span class="special">,</span> <span class="identifier">N</span><span class="special">&gt;</span></code>.
</p>
</p></div>
<a name="fusion.sequences.concepts.associative_sequence.expression_semantics"></a><h5>
<a name="id967064"></a>
<a name="id975553"></a>
<a href="associative_sequence.html#fusion.sequences.concepts.associative_sequence.expression_semantics">Expression
Semantics</a>
</h5>
@ -172,30 +262,52 @@
<col>
</colgroup>
<thead><tr>
<th>Expression</th>
<th>Semantics</th>
<th>
<p>
Expression
</p>
</th>
<th>
<p>
Semantics
</p>
</th>
</tr></thead>
<tbody>
<tr>
<td><code class="computeroutput"><a href="../intrinsics/functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a><span class="special">&lt;</span><span class="identifier">K</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span></code></td>
<td>A
boolean Integral Constant <code class="computeroutput"><span class="identifier">c</span></code>
such that <code class="computeroutput"><span class="identifier">c</span><span class="special">::</span><span class="identifier">value</span> <span class="special">==</span>
<span class="keyword">true</span></code> if and only if there
is one or more elements with the key <code class="computeroutput"><span class="identifier">k</span></code>
in <code class="computeroutput"><span class="identifier">s</span></code>; see <a href="../intrinsics/functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a>.</td>
<td>
<p>
<code class="computeroutput"><a href="../intrinsics/functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a><span class="special">&lt;</span><span class="identifier">K</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
A boolean Integral Constant <code class="computeroutput"><span class="identifier">c</span></code>
such that <code class="computeroutput"><span class="identifier">c</span><span class="special">::</span><span class="identifier">value</span> <span class="special">==</span>
<span class="keyword">true</span></code> if and only if there
is one or more elements with the key <code class="computeroutput"><span class="identifier">k</span></code>
in <code class="computeroutput"><span class="identifier">s</span></code>; see <a href="../intrinsics/functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a>.
</p>
</td>
</tr>
<tr>
<td><code class="computeroutput"><a href="../intrinsics/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">K</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span></code></td>
<td>The
element associated with the key <code class="computeroutput"><span class="identifier">K</span></code>
in the sequence <code class="computeroutput"><span class="identifier">s</span></code>;
see <a href="../intrinsics/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a>.</td>
<td>
<p>
<code class="computeroutput"><a href="../intrinsics/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a><span class="special">&lt;</span><span class="identifier">K</span><span class="special">&gt;(</span><span class="identifier">s</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
The element associated with the key <code class="computeroutput"><span class="identifier">K</span></code>
in the sequence <code class="computeroutput"><span class="identifier">s</span></code>;
see <a href="../intrinsics/functions/at.html" title="at"><code class="computeroutput"><span class="identifier">at</span></code></a>.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="fusion.sequences.concepts.associative_sequence.models"></a><h5>
<a name="id967310"></a>
<a name="id975837"></a>
<a href="associative_sequence.html#fusion.sequences.concepts.associative_sequence.models">Models</a>
</h5>
<div class="itemizedlist"><ul type="disc">