merge from trunk

[SVN r47205]
This commit is contained in:
Joel de Guzman committed 2008-07-08 02:43:21 +00:00
1 parent 099deb4385
commit 57725cb393
260 files changed
+9039 -8720

No files matched your search

@@ -3,19 +3,19 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>unfused_generic</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
<link rel="start" href="../../../index.html" title="Chapter 1. Fusion 2.0">
<link rel="up" href="../adapters.html" title="Adapters">
<link rel="up" href="../adapters.html" title=" Adapters">
<link rel="prev" href="fused_function_object.html" title="fused_function_object">
<link rel="next" href="unfused_lvalue_args.html" title="unfused_lvalue_args">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../index.htm">Home</a></td>
<td align="center"><a href="../../../../../../libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../people/people.htm">People</a></td>
<td align="center"><a href="../../../../../../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
@@ -24,53 +24,52 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="fusion.functional.adapters.unfused_generic"></a><a class="link" href="unfused_generic.html" title="unfused_generic">unfused_generic</a>
</h4></div></div></div>
<a name="fusion.functional.adapters.unfused_generic.description"></a><h6>
<a name="id2823433"></a>
<a class="link" href="unfused_generic.html#fusion.functional.adapters.unfused_generic.description">Description</a>
</h6>
<a name="fusion.functional.adapters.unfused_generic"></a><a href="unfused_generic.html" title="unfused_generic">unfused_generic</a></h4></div></div></div>
<a name="fusion.functional.adapters.unfused_generic.description"></a><h5>
<a name="id666625"></a>
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.description">Description</a>
</h5>
<p>
An n-ary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function
Object</a> adapter template for an unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic
An n-ary <a href="../concepts/poly.html" title=" Polymorphic Function
Object">Polymorphic Function
Object</a> adapter template for an unary <a href="../concepts/poly.html" title=" Polymorphic Function
Object">Polymorphic
Function Object</a> target function. When called, its arguments are
bundled to a <a class="link" href="../../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random
bundled to a <a href="../../sequence/concepts/random_access_sequence.html" title="Random
Access Sequence">Random
Access Sequence</a> of references that is passed to the target function.
Non-const LValue arguments are transported as references to non-const,
otherwise references to const are used.
</p>
<div class="sidebar">
<p class="title"><b></b></p>
<p>
<div class="sidebar"><p>
<span class="inlinemediaobject"><img src="../../../images/tip.png" alt="tip"></span> Detecting mutable LValues on a per-argument basis
is currently a compile time expensive operation (see <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm" target="_top">The
Forwarding Problem</a> for details). Therefore, there are two, lightweight
and more restricted variants of this class template, <a class="link" href="unfused_lvalue_args.html" title="unfused_lvalue_args"><code class="computeroutput"><span class="identifier">unfused_lvalue_args</span></code></a> and <a class="link" href="unfused_rvalue_args.html" title="unfused_rvalue_args"><code class="computeroutput"><span class="identifier">unfused_rvalue_args</span></code></a>.
</p>
</div>
and more restricted variants of this class template, <a href="unfused_lvalue_args.html" title="unfused_lvalue_args"><tt class="computeroutput"><span class="identifier">unfused_lvalue_args</span></tt></a> and <a href="unfused_rvalue_args.html" title="unfused_rvalue_args"><tt class="computeroutput"><span class="identifier">unfused_rvalue_args</span></tt></a>.
</p></div>
<p>
The type of the target function is allowed to be const qualified or a reference.
Const qualification is preserved and propagated appropriately (in other
words, only const versions of <code class="literal">operator()</code> can be used
words, only const versions of <tt class="literal">operator()</tt> can be used
if the target function object is const - or, in case the target function
object is held by value, the adapter is const).
</p>
<p>
/functional/adapter/unfused_generic.hpp&gt;
</p>
<a name="fusion.functional.adapters.unfused_generic.synopsis"></a><h6>
<a name="id2823579"></a>
<a class="link" href="unfused_generic.html#fusion.functional.adapters.unfused_generic.synopsis">Synopsis</a>
</h6>
<a name="fusion.functional.adapters.unfused_generic.synopsis"></a><h5>
<a name="id666783"></a>
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.synopsis">Synopsis</a>
</h5>
<pre class="programlisting">
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">Function</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">unfused_generic</span><span class="special">;</span>
</pre>
<a name="fusion.functional.adapters.unfused_generic.template_parameters"></a><h6>
<a name="id2823651"></a>
<a class="link" href="unfused_generic.html#fusion.functional.adapters.unfused_generic.template_parameters">Template
<a name="fusion.functional.adapters.unfused_generic.template_parameters"></a><h5>
<a name="id666864"></a>
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.template_parameters">Template
parameters</a>
</h6>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -97,12 +96,13 @@
<tbody><tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">Function</span></code>
<tt class="computeroutput"><span class="identifier">Function</span></tt>
</p>
</td>
<td>
<p>
An unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic
An unary <a href="../concepts/poly.html" title=" Polymorphic Function
Object">Polymorphic
Function Object</a>
</p>
</td>
@@ -112,49 +112,52 @@
</td>
</tr></tbody>
</table></div>
<a name="fusion.functional.adapters.unfused_generic.model_of"></a><h6>
<a name="id2823754"></a>
<a class="link" href="unfused_generic.html#fusion.functional.adapters.unfused_generic.model_of">Model
<a name="fusion.functional.adapters.unfused_generic.model_of"></a><h5>
<a name="id666979"></a>
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.model_of">Model
of</a>
</h6>
</h5>
<div class="itemizedlist"><ul type="disc">
<li><a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic Function
<li><a href="../concepts/poly.html" title=" Polymorphic Function
Object">Polymorphic Function
Object</a></li>
<li><a class="link" href="../concepts/def_callable.html" title="Deferred Callable Object">Deferred Callable
<li><a href="../concepts/def_callable.html" title=" Deferred
Callable Object">Deferred Callable
Object</a></li>
</ul></div>
<div class="variablelist">
<p class="title"><b>Notation</b></p>
<dl>
<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt>
<dt><span class="term"><tt class="computeroutput"><span class="identifier">F</span></tt></span></dt>
<dd><p>
A possibly const qualified, unary <a class="link" href="../concepts/poly.html" title="Polymorphic Function Object">Polymorphic
A possibly const qualified, unary <a href="../concepts/poly.html" title=" Polymorphic Function
Object">Polymorphic
Function Object</a> type or reference type thereof
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
<dt><span class="term"><tt class="computeroutput"><span class="identifier">f</span></tt></span></dt>
<dd><p>
An object convertible to <code class="computeroutput"><span class="identifier">F</span></code>
An object convertible to <tt class="computeroutput"><span class="identifier">F</span></tt>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">UG</span></code></span></dt>
<dt><span class="term"><tt class="computeroutput"><span class="identifier">UG</span></tt></span></dt>
<dd><p>
The type <code class="computeroutput"><span class="identifier">unfused_generic</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">&gt;</span></code>
The type <tt class="computeroutput"><span class="identifier">unfused_generic</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">&gt;</span></tt>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">ug</span></code></span></dt>
<dt><span class="term"><tt class="computeroutput"><span class="identifier">ug</span></tt></span></dt>
<dd><p>
An instance of <code class="computeroutput"><span class="identifier">UG</span></code>,
initialized with <code class="computeroutput"><span class="identifier">f</span></code>
An instance of <tt class="computeroutput"><span class="identifier">UG</span></tt>,
initialized with <tt class="computeroutput"><span class="identifier">f</span></tt>
</p></dd>
<dt><span class="term"><code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code></span></dt>
<dt><span class="term"><tt class="computeroutput"><span class="identifier">a0</span></tt>...<tt class="computeroutput"><span class="identifier">aN</span></tt></span></dt>
<dd><p>
Arguments to <code class="computeroutput"><span class="identifier">ug</span></code>
Arguments to <tt class="computeroutput"><span class="identifier">ug</span></tt>
</p></dd>
</dl>
</div>
<a name="fusion.functional.adapters.unfused_generic.expression_semantics"></a><h6>
<a name="id2823995"></a>
<a class="link" href="unfused_generic.html#fusion.functional.adapters.unfused_generic.expression_semantics">Expression
<a name="fusion.functional.adapters.unfused_generic.expression_semantics"></a><h5>
<a name="id667248"></a>
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.expression_semantics">Expression
Semantics</a>
</h6>
</h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
@@ -176,48 +179,48 @@
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">UG</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code>
<tt class="computeroutput"><span class="identifier">UG</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></tt>
</p>
</td>
<td>
<p>
Creates a fused function as described above, initializes the target
function with <code class="computeroutput"><span class="identifier">f</span></code>.
function with <tt class="computeroutput"><span class="identifier">f</span></tt>.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">UG</span><span class="special">()</span></code>
<tt class="computeroutput"><span class="identifier">UG</span><span class="special">()</span></tt>
</p>
</td>
<td>
<p>
Creates a fused function as described above, attempts to use <code class="computeroutput"><span class="identifier">F</span></code>'s default constructor.
Creates a fused function as described above, attempts to use <tt class="computeroutput"><span class="identifier">F</span></tt>'s default constructor.
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">ug</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code>
<tt class="computeroutput"><span class="identifier">ug</span><span class="special">(</span><span class="identifier">a0</span></tt>...<tt class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></tt>
</p>
</td>
<td>
<p>
Calls <code class="computeroutput"><span class="identifier">f</span></code> with a
<a class="link" href="../../sequence.html" title="Sequence">Sequence</a> that contains references
to the arguments <code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code>.
Calls <tt class="computeroutput"><span class="identifier">f</span></tt> with a
<a href="../../sequence.html" title="Sequence">Sequence</a> that contains references
to the arguments <tt class="computeroutput"><span class="identifier">a0</span></tt>...<tt class="computeroutput"><span class="identifier">aN</span></tt>.
</p>
</td>
</tr>
</tbody>
</table></div>
<a name="fusion.functional.adapters.unfused_generic.example"></a><h6>
<a name="id2824233"></a>
<a class="link" href="unfused_generic.html#fusion.functional.adapters.unfused_generic.example">Example</a>
</h6>
<a name="fusion.functional.adapters.unfused_generic.example"></a><h5>
<a name="id667514"></a>
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.example">Example</a>
</h5>
<pre class="programlisting">
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">fused_bound_1st</span>
@@ -265,17 +268,17 @@
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">bind_1st</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">plus</span><span class="special">&lt;</span><span class="keyword">float</span><span class="special">&gt;(),</span> <span class="number">1</span><span class="special">)(</span><span class="number">0.5f</span><span class="special">)</span> <span class="special">==</span> <span class="number">1.5f</span><span class="special">);</span>
<span class="special">}</span>
</pre>
<a name="fusion.functional.adapters.unfused_generic.see_also"></a><h6>
<a name="id2825494"></a>
<a class="link" href="unfused_generic.html#fusion.functional.adapters.unfused_generic.see_also">See
<a name="fusion.functional.adapters.unfused_generic.see_also"></a><h5>
<a name="id668910"></a>
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.see_also">See
also</a>
</h6>
</h5>
<div class="itemizedlist"><ul type="disc">
<li><a class="link" href="unfused_lvalue_args.html" title="unfused_lvalue_args"><code class="computeroutput"><span class="identifier">unfused_lvalue_args</span></code></a></li>
<li><a class="link" href="unfused_rvalue_args.html" title="unfused_rvalue_args"><code class="computeroutput"><span class="identifier">unfused_rvalue_args</span></code></a></li>
<li><a class="link" href="unfused_typed.html" title="unfused_typed"><code class="computeroutput"><span class="identifier">unfused_typed</span></code></a></li>
<li><a class="link" href="../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a></li>
<li><a class="link" href="../../support/deduce_sequence.html" title="deduce_sequence"><code class="computeroutput"><span class="identifier">deduce_sequence</span></code></a></li>
<li><a href="unfused_lvalue_args.html" title="unfused_lvalue_args"><tt class="computeroutput"><span class="identifier">unfused_lvalue_args</span></tt></a></li>
<li><a href="unfused_rvalue_args.html" title="unfused_rvalue_args"><tt class="computeroutput"><span class="identifier">unfused_rvalue_args</span></tt></a></li>
<li><a href="unfused_typed.html" title="unfused_typed"><tt class="computeroutput"><span class="identifier">unfused_typed</span></tt></a></li>
<li><a href="../../support/deduce.html" title="deduce"><tt class="computeroutput"><span class="identifier">deduce</span></tt></a></li>
<li><a href="../../support/deduce_sequence.html" title="deduce_sequence"><tt class="computeroutput"><span class="identifier">deduce_sequence</span></tt></a></li>
</ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>