forked from boostorg/fusion
adds documentation for functional module
[SVN r36959]
This commit is contained in:
203
doc/html/fusion/functional/adapters/fused.html
Normal file
203
doc/html/fusion/functional/adapters/fused.html
Normal file
@ -0,0 +1,203 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>fused</title>
|
||||
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
||||
<link rel="up" href="../adapters.html" title=" Adapters">
|
||||
<link rel="prev" href="../adapters.html" title=" Adapters">
|
||||
<link rel="next" href="fused_procedure.html" title="fused_procedure">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></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="../../../../../../../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>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../adapters.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="fused_procedure.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="fusion.functional.adapters.fused"></a><a href="fused.html" title="fused">fused</a></h4></div></div></div>
|
||||
<a name="fusion.functional.adapters.fused.description"></a><h5>
|
||||
<a name="id1209486"></a>
|
||||
<a href="fused.html#fusion.functional.adapters.fused.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
An unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic Function
|
||||
Object</a> adapter template for <a href="../concepts/def_callable.html" title=" Deferred
|
||||
Callable Object">Deferred
|
||||
Callable Object</a> target functions. It takes a <a href="../../sequences/concepts/forward_sequence.html" title="Forward
|
||||
Sequence">Forward
|
||||
Sequence</a> that contains the arguments for the target function.
|
||||
</p>
|
||||
<p>
|
||||
The nested <code class="computeroutput"><span class="identifier">result</span></code> metafunction
|
||||
does not define a <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
member for target functions of non-class type whose arity is not satisfied
|
||||
by the size of the sequence.
|
||||
</p>
|
||||
<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
|
||||
for an target function object that is const or, if the target function
|
||||
object is held by value, the adapter is const - these semantics have nothing
|
||||
to do with the const qualification of a member function, which is referring
|
||||
to the type of object pointed to by <code class="literal">this</code>, which is specified
|
||||
with the first element in the sequence passed to the adapter).
|
||||
</p>
|
||||
<p>
|
||||
If the target function is a pointer to a class members, the corresponding
|
||||
object can be specified as a reference, pointer, or smart pointer. In case
|
||||
of the latter, a freestanding <code class="literal">get_pointer</code> function must
|
||||
be defined (Boost provides this function for <code class="literal">std::auto_ptr</code>
|
||||
and <a href="http://www.boost.org/libs/smart_ptr/smart_ptr.hpp" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span></code></a>).
|
||||
</p>
|
||||
<a name="fusion.functional.adapters.fused.header"></a><h5>
|
||||
<a name="id1209629"></a>
|
||||
<a href="fused.html#fusion.functional.adapters.fused.header">Header</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">fused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.fused.synopsis"></a><h5>
|
||||
<a name="id1209720"></a>
|
||||
<a href="fused.html#fusion.functional.adapters.fused.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">fused</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.fused.template_parameters"></a><h5>
|
||||
<a name="id1209789"></a>
|
||||
<a href="fused.html#fusion.functional.adapters.fused.template_parameters">Template
|
||||
parameters</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Parameter</th>
|
||||
<th>Description</th>
|
||||
<th>Default</th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td><code class="computeroutput"><span class="identifier">Function</span></code></td>
|
||||
<td>A
|
||||
<a href="../concepts/def_callable.html" title=" Deferred
|
||||
Callable Object">Deferred
|
||||
Callable Object</a>
|
||||
</td>
|
||||
<td><EFBFBD></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.fused.model_of"></a><h5>
|
||||
<a name="id1209865"></a>
|
||||
<a href="fused.html#fusion.functional.adapters.fused.model_of">Model of</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic Function
|
||||
Object</a></li>
|
||||
<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">R</span></code></span></dt>
|
||||
<dd>
|
||||
A possibly const qualified <a href="../concepts/def_callable.html" title=" Deferred
|
||||
Callable Object">Deferred
|
||||
Callable Object</a> type or reference type thereof
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">r</span></code></span></dt>
|
||||
<dd>
|
||||
An object convertible to <code class="computeroutput"><span class="identifier">R</span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt>
|
||||
<dd>
|
||||
A <a href="../../sequences.html" title="Sequences">Sequence</a> of arguments that
|
||||
are accepted by <code class="computeroutput"><span class="identifier">r</span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
|
||||
<dd>
|
||||
An instance of <code class="computeroutput"><span class="identifier">fused</span><span class="special"><</span><span class="identifier">R</span><span class="special">></span></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<a name="fusion.functional.adapters.fused.expression_semantics"></a><h5>
|
||||
<a name="id1210037"></a>
|
||||
<a href="fused.html#fusion.functional.adapters.fused.expression_semantics">Expression
|
||||
Semantics</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Expression</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">fused</span><span class="special"><</span><span class="identifier">R</span><span class="special">>(</span><span class="identifier">r</span><span class="special">)</span></code></td>
|
||||
<td>Creates
|
||||
a fused function as described above, initializes the target function
|
||||
with <code class="computeroutput"><span class="identifier">r</span></code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">fused</span><span class="special"><</span><span class="identifier">R</span><span class="special">>()</span></code></td>
|
||||
<td>Creates
|
||||
a fused function as described above, attempts to use <code class="computeroutput"><span class="identifier">R</span></code>'s default constructor.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code></td>
|
||||
<td>Calls
|
||||
<code class="computeroutput"><span class="identifier">r</span></code> with the elements
|
||||
in <code class="computeroutput"><span class="identifier">s</span></code> as its arguments.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.fused.example"></a><h5>
|
||||
<a name="id1210219"></a>
|
||||
<a href="fused.html#fusion.functional.adapters.fused.example">Example</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">fused</span><span class="special"><</span> <a href="http://www.sgi.com/tech/stl/plus.html" target="_top"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">plus</span></code></a><span class="special"><</span><span class="keyword">long</span><span class="special">></span> <span class="special">></span> <span class="identifier">f</span><span class="special">;</span>
|
||||
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">f</span><span class="special">(</span><a href="../../sequences/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">2l</span><span class="special">))</span> <span class="special">==</span> <span class="number">3l</span><span class="special">);</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.fused.see_also"></a><h5>
|
||||
<a name="id1210375"></a>
|
||||
<a href="fused.html#fusion.functional.adapters.fused.see_also">See also</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="fused_procedure.html" title="fused_procedure"><code class="computeroutput"><span class="identifier">fused_procedure</span></code></a></li>
|
||||
<li><a href="fused_function_object.html" title="fused_function_object"><code class="computeroutput"><span class="identifier">fused_function_object</span></code></a></li>
|
||||
<li><a href="../invocation/functions/invoke.html" title="invoke"><code class="computeroutput"><span class="identifier">invoke</span></code></a></li>
|
||||
<li><a href="../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright <20> 2001-2005 Joel de Guzman, Dan Marsden</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../adapters.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="fused_procedure.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
221
doc/html/fusion/functional/adapters/fused_function_object.html
Normal file
221
doc/html/fusion/functional/adapters/fused_function_object.html
Normal file
@ -0,0 +1,221 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>fused_function_object</title>
|
||||
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
||||
<link rel="up" href="../adapters.html" title=" Adapters">
|
||||
<link rel="prev" href="fused_procedure.html" title="fused_procedure">
|
||||
<link rel="next" href="unfused_generic.html" title="unfused_generic">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></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="../../../../../../../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>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="fused_procedure.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="unfused_generic.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="fusion.functional.adapters.fused_function_object"></a><a href="fused_function_object.html" title="fused_function_object">fused_function_object</a></h4></div></div></div>
|
||||
<a name="fusion.functional.adapters.fused_function_object.description"></a><h5>
|
||||
<a name="id1211879"></a>
|
||||
<a href="fused_function_object.html#fusion.functional.adapters.fused_function_object.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
An unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic Function
|
||||
Object</a> adapter template for a <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a> target function. It takes a <a href="../../sequences/concepts/forward_sequence.html" title="Forward
|
||||
Sequence">Forward
|
||||
Sequence</a> that contains the arguments for the target function.
|
||||
</p>
|
||||
<p>
|
||||
The nested <code class="computeroutput"><span class="identifier">result</span></code> metafunction
|
||||
is inhertied from the target function.
|
||||
</p>
|
||||
<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
|
||||
for an target function object that is const or, if the target function
|
||||
object is held by value, the adapter is const).
|
||||
</p>
|
||||
<a name="fusion.functional.adapters.fused_function_object.header"></a><h5>
|
||||
<a name="id1211961"></a>
|
||||
<a href="fused_function_object.html#fusion.functional.adapters.fused_function_object.header">Header</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">fused_function_object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.fused_function_object.synopsis"></a><h5>
|
||||
<a name="id1212054"></a>
|
||||
<a href="fused_function_object.html#fusion.functional.adapters.fused_function_object.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Function</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">fused_function_object</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.fused_function_object.template_parameters"></a><h5>
|
||||
<a name="id1212126"></a>
|
||||
<a href="fused_function_object.html#fusion.functional.adapters.fused_function_object.template_parameters">Template
|
||||
parameters</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Parameter</th>
|
||||
<th>Description</th>
|
||||
<th>Default</th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td><code class="computeroutput"><span class="identifier">Function</span></code></td>
|
||||
<td>
|
||||
<a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic Function Object</a>
|
||||
type</td>
|
||||
<td><EFBFBD></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.fused_function_object.model_of"></a><h5>
|
||||
<a name="id1212201"></a>
|
||||
<a href="fused_function_object.html#fusion.functional.adapters.fused_function_object.model_of">Model
|
||||
of</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic Function
|
||||
Object</a></li>
|
||||
<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">R</span></code></span></dt>
|
||||
<dd>
|
||||
A possibly const qualified <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a> type or reference type thereof
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">r</span></code></span></dt>
|
||||
<dd>
|
||||
An object convertible to <code class="computeroutput"><span class="identifier">R</span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt>
|
||||
<dd>
|
||||
A <a href="../../sequences.html" title="Sequences">Sequence</a> of arguments that
|
||||
are accepted by <code class="computeroutput"><span class="identifier">r</span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
|
||||
<dd>
|
||||
An instance of <code class="computeroutput"><span class="identifier">fused</span><span class="special"><</span><span class="identifier">R</span><span class="special">></span></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<a name="fusion.functional.adapters.fused_function_object.expression_semantics"></a><h5>
|
||||
<a name="id1212376"></a>
|
||||
<a href="fused_function_object.html#fusion.functional.adapters.fused_function_object.expression_semantics">Expression
|
||||
Semantics</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Expression</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">fused_function_object</span><span class="special"><</span><span class="identifier">R</span><span class="special">>(</span><span class="identifier">r</span><span class="special">)</span></code></td>
|
||||
<td>Creates a fused function
|
||||
as described above, initializes the target function with <code class="computeroutput"><span class="identifier">r</span></code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">fused_function_object</span><span class="special"><</span><span class="identifier">R</span><span class="special">>()</span></code></td>
|
||||
<td>Creates a fused
|
||||
function as described above, attempts to use <code class="computeroutput"><span class="identifier">R</span></code>'s
|
||||
default constructor.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code></td>
|
||||
<td>Calls
|
||||
<code class="computeroutput"><span class="identifier">r</span></code> with the elements
|
||||
in <code class="computeroutput"><span class="identifier">s</span></code> as its arguments.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.fused_function_object.example"></a><h5>
|
||||
<a name="id1212559"></a>
|
||||
<a href="fused_function_object.html#fusion.functional.adapters.fused_function_object.example">Example</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">SeqOfSeqs</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Func</span><span class="special">></span>
|
||||
<span class="keyword">typename</span> <a href="../../algorithms/transformation/metafunctions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">transform</span></code></a><span class="special"><</span> <span class="identifier">zip_view</span><span class="special"><</span><span class="identifier">SeqOfSeqs</span><span class="special">></span> <span class="keyword">const</span><span class="special">,</span>
|
||||
<span class="identifier">fused_function_object</span><span class="special"><</span><span class="identifier">Func</span> <span class="keyword">const</span> <span class="special">&></span> <span class="special">>::</span><span class="identifier">type</span>
|
||||
<span class="identifier">n_ary_transform</span><span class="special">(</span><span class="identifier">SeqOfSeqs</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">Func</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">f</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">return</span> <a href="../../algorithms/transformation/functions/transform.html" title="transform"><code class="computeroutput"><span class="identifier">transform</span></code></a><span class="special">(</span><span class="identifier">zip_view</span><span class="special"><</span><span class="identifier">SeqOfSeqs</span><span class="special">>(</span><span class="identifier">s</span><span class="special">),</span>
|
||||
<span class="identifier">fused_function_object</span><span class="special"><</span><span class="identifier">Func</span> <span class="keyword">const</span> <span class="special">&>(</span><span class="identifier">f</span><span class="special">));</span>
|
||||
<span class="special">}</span>
|
||||
|
||||
<span class="keyword">struct</span> <span class="identifier">sub</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">_</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">result</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="identifier">T</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">rhs</span><span class="special">)</span> <span class="keyword">const</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">return</span> <span class="identifier">lhs</span> <span class="special">-</span> <span class="identifier">rhs</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span>
|
||||
<span class="special">{</span>
|
||||
<a href="../../sequences/containers/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">a</span><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">2.0f</span><span class="special">);</span>
|
||||
<a href="../../sequences/containers/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">b</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">1.5f</span><span class="special">);</span>
|
||||
<a href="../../sequences/containers/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">c</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">0.5f</span><span class="special">);</span>
|
||||
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">c</span> <span class="special">==</span> <span class="identifier">n_ary_transform</span><span class="special">(</span><a href="../../sequences/generation/functions/vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">vector_tie</span></code></a><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">sub</span><span class="special">()));</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.fused_function_object.see_also"></a><h5>
|
||||
<a name="id1213389"></a>
|
||||
<a href="fused_function_object.html#fusion.functional.adapters.fused_function_object.see_also">See
|
||||
also</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="fused.html" title="fused"><code class="computeroutput"><span class="identifier">fused</span></code></a></li>
|
||||
<li><a href="fused_procedure.html" title="fused_procedure"><code class="computeroutput"><span class="identifier">fused_procedure</span></code></a></li>
|
||||
<li><a href="../invocation/functions/invoke_function_object.html" title="invoke_function_object"><code class="computeroutput"><span class="identifier">invoke_function_object</span></code></a></li>
|
||||
<li><a href="../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright <20> 2001-2005 Joel de Guzman, Dan Marsden</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="fused_procedure.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="unfused_generic.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
219
doc/html/fusion/functional/adapters/fused_procedure.html
Normal file
219
doc/html/fusion/functional/adapters/fused_procedure.html
Normal file
@ -0,0 +1,219 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>fused_procedure</title>
|
||||
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
||||
<link rel="up" href="../adapters.html" title=" Adapters">
|
||||
<link rel="prev" href="fused.html" title="fused">
|
||||
<link rel="next" href="fused_function_object.html" title="fused_function_object">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></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="../../../../../../../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>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="fused.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="fused_function_object.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="fusion.functional.adapters.fused_procedure"></a><a href="fused_procedure.html" title="fused_procedure">fused_procedure</a></h4></div></div></div>
|
||||
<a name="fusion.functional.adapters.fused_procedure.description"></a><h5>
|
||||
<a name="id1210487"></a>
|
||||
<a href="fused_procedure.html#fusion.functional.adapters.fused_procedure.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
An unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic Function
|
||||
Object</a> adapter template for <a href="../concepts/callable.html" title=" Callable Object">Callable
|
||||
Object</a> target functions. It takes a <a href="../../sequences/concepts/forward_sequence.html" title="Forward
|
||||
Sequence">Forward
|
||||
Sequence</a> that contains the arguments for the target function.
|
||||
</p>
|
||||
<p>
|
||||
The result is discared and the adapter's return type is <code class="computeroutput"><span class="keyword">void</span></code>.
|
||||
The nested <code class="computeroutput"><span class="identifier">result</span></code> metafunction
|
||||
does not define a <code class="computeroutput"><span class="identifier">type</span></code>
|
||||
member for target functions of non-class type whose arity is not satisfied
|
||||
by the size of the sequence.
|
||||
</p>
|
||||
<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
|
||||
for an target function object that is const or, if the target function
|
||||
object is held by value, the adapter is const - these semantics have nothing
|
||||
to do with the const qualification of a member function, which is referring
|
||||
to the type of object pointed to by <code class="literal">this</code>, which is specified
|
||||
with the first element in the sequence passed to the adapter).
|
||||
</p>
|
||||
<p>
|
||||
If the target function is a pointer to a members function, the corresponding
|
||||
object can be specified as a reference, pointer, or smart pointer. In case
|
||||
of the latter, a freestanding <code class="literal">get_pointer</code> function must
|
||||
be defined (Boost provides this function for <code class="literal">std::auto_ptr</code>
|
||||
and <a href="http://www.boost.org/libs/smart_ptr/smart_ptr.hpp" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">shared_ptr</span></code></a>).
|
||||
</p>
|
||||
<p>
|
||||
The target function must not be a pointer to a member object (dereferencing
|
||||
such a pointer without returning anything does not make sense, so it isn't
|
||||
implemented).
|
||||
</p>
|
||||
<a name="fusion.functional.adapters.fused_procedure.header"></a><h5>
|
||||
<a name="id1210648"></a>
|
||||
<a href="fused_procedure.html#fusion.functional.adapters.fused_procedure.header">Header</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">fused_procedure</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.fused_procedure.synopsis"></a><h5>
|
||||
<a name="id1210740"></a>
|
||||
<a href="fused_procedure.html#fusion.functional.adapters.fused_procedure.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Function</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">fused_procedure</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.fused_procedure.template_parameters"></a><h5>
|
||||
<a name="id1210809"></a>
|
||||
<a href="fused_procedure.html#fusion.functional.adapters.fused_procedure.template_parameters">Template
|
||||
parameters</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Parameter</th>
|
||||
<th>Description</th>
|
||||
<th>Default</th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td><code class="computeroutput"><span class="identifier">Function</span></code></td>
|
||||
<td>
|
||||
<a href="../concepts/callable.html" title=" Callable Object">Callable Object</a>
|
||||
type</td>
|
||||
<td><EFBFBD></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.fused_procedure.model_of"></a><h5>
|
||||
<a name="id1210884"></a>
|
||||
<a href="fused_procedure.html#fusion.functional.adapters.fused_procedure.model_of">Model
|
||||
of</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic Function
|
||||
Object</a></li>
|
||||
<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">R</span></code></span></dt>
|
||||
<dd>
|
||||
A possibly const qualified <a href="../concepts/callable.html" title=" Callable Object">Callable
|
||||
Object</a> type or reference type thereof
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">r</span></code></span></dt>
|
||||
<dd>
|
||||
An object convertible to <code class="computeroutput"><span class="identifier">R</span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt>
|
||||
<dd>
|
||||
A <a href="../../sequences.html" title="Sequences">Sequence</a> of arguments that
|
||||
are accepted by <code class="computeroutput"><span class="identifier">r</span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
|
||||
<dd>
|
||||
An instance of <code class="computeroutput"><span class="identifier">fused</span><span class="special"><</span><span class="identifier">R</span><span class="special">></span></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<a name="fusion.functional.adapters.fused_procedure.expression_semantics"></a><h5>
|
||||
<a name="id1211058"></a>
|
||||
<a href="fused_procedure.html#fusion.functional.adapters.fused_procedure.expression_semantics">Expression
|
||||
Semantics</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Expression</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">fused_procedure</span><span class="special"><</span><span class="identifier">R</span><span class="special">>(</span><span class="identifier">r</span><span class="special">)</span></code></td>
|
||||
<td>Creates a fused function
|
||||
as described above, initializes the target function with <code class="computeroutput"><span class="identifier">r</span></code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">fused_procedure</span><span class="special"><</span><span class="identifier">R</span><span class="special">>()</span></code></td>
|
||||
<td>Creates a fused
|
||||
function as described above, attempts to use <code class="computeroutput"><span class="identifier">R</span></code>'s
|
||||
default constructor.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code></td>
|
||||
<td>Calls
|
||||
<code class="computeroutput"><span class="identifier">r</span></code> with the elements
|
||||
in <code class="computeroutput"><span class="identifier">s</span></code> as its arguments.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.fused_procedure.example"></a><h5>
|
||||
<a name="id1211241"></a>
|
||||
<a href="fused_procedure.html#fusion.functional.adapters.fused_procedure.example">Example</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span> <span class="identifier">SequenceOfSequences</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Func</span><span class="special">></span>
|
||||
<span class="keyword">void</span> <span class="identifier">n_ary_for_each</span><span class="special">(</span><span class="identifier">SequenceOfSequences</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">,</span> <span class="identifier">Func</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">f</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<a href="../../algorithms/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a><span class="special">(</span><a href="../../sequences/views/zip_view.html" title="zip_view"><code class="computeroutput"><span class="identifier">zip_view</span></code></a><span class="special"><</span><span class="identifier">SequenceOfSequences</span><span class="special">>(</span><span class="identifier">s</span><span class="special">),</span>
|
||||
<span class="identifier">fused_procedure</span><span class="special"><</span><span class="identifier">Func</span> <span class="keyword">const</span> <span class="special">&>(</span><span class="identifier">f</span><span class="special">));</span>
|
||||
<span class="special">}</span>
|
||||
|
||||
<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span>
|
||||
<span class="special">{</span>
|
||||
<a href="../../sequences/containers/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">a</span><span class="special">(</span><span class="number">2</span><span class="special">,</span><span class="number">2.0f</span><span class="special">);</span>
|
||||
<a href="../../sequences/containers/vector.html" title="vector"><code class="computeroutput"><span class="identifier">vector</span></code></a><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="keyword">float</span><span class="special">></span> <span class="identifier">b</span><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">1.5f</span><span class="special">);</span>
|
||||
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">;</span>
|
||||
<span class="identifier">n_ary_for_each</span><span class="special">(</span><a href="../../sequences/generation/functions/vector_tie.html" title="vector_tie"><code class="computeroutput"><span class="identifier">vector_tie</span></code></a><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">_1</span> <span class="special">-=</span> <span class="identifier">_2</span><span class="special">);</span>
|
||||
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">a</span> <span class="special">==</span> <a href="../../sequences/generation/functions/make_vector.html" title="make_vector"><code class="computeroutput"><span class="identifier">make_vector</span></code></a><span class="special">(</span><span class="number">1</span><span class="special">,</span><span class="number">0.5f</span><span class="special">));</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.fused_procedure.see_also"></a><h5>
|
||||
<a name="id1211780"></a>
|
||||
<a href="fused_procedure.html#fusion.functional.adapters.fused_procedure.see_also">See
|
||||
also</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="fused.html" title="fused"><code class="computeroutput"><span class="identifier">fused</span></code></a></li>
|
||||
<li><a href="fused_function_object.html" title="fused_function_object"><code class="computeroutput"><span class="identifier">fused_function_object</span></code></a></li>
|
||||
<li><a href="../invocation/functions/invoke_procedure.html" title="invoke_procedure"><code class="computeroutput"><span class="identifier">invoke_procedure</span></code></a></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright <20> 2001-2005 Joel de Guzman, Dan Marsden</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="fused.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="fused_function_object.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
270
doc/html/fusion/functional/adapters/unfused_generic.html
Normal file
270
doc/html/fusion/functional/adapters/unfused_generic.html
Normal file
@ -0,0 +1,270 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>unfused_generic</title>
|
||||
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
||||
<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%">
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></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="../../../../../../../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>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="fused_function_object.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="unfused_lvalue_args.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<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="id1213504"></a>
|
||||
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
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 href="../../sequences/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="tip"><table border="0" summary="Tip">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../images/tip.png"></td>
|
||||
<th align="left">Tip</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
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 href="unfused_lvalue_args.html" title="unfused_lvalue_args"><code class="computeroutput"><span class="identifier">unfused_lvalue_args</span></code></a> and <a href="unfused_rvalue_args.html" title="unfused_rvalue_args"><code class="computeroutput"><span class="identifier">unfused_rvalue_args</span></code></a>.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<p>
|
||||
The overload set of the adapter's function call operator can be restricted
|
||||
by removing the <code class="computeroutput"><span class="identifier">type</span></code> member
|
||||
from the nested result metafunction of the <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a> (in this case the substitution-failure-is-not-an-error
|
||||
principle applies for non-nullary case and nullary calls are explicitly
|
||||
disabled by the library).
|
||||
</p>
|
||||
<div class="caution"><table border="0" summary="Caution">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../images/caution.png"></td>
|
||||
<th align="left">Caution</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
As the nullary call operator cannot be a template it will be instantiated
|
||||
along with the class template, so it must be disabled (as described above)
|
||||
in cases where it isn't instantiable.
|
||||
</p></td></tr>
|
||||
</table></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
|
||||
if the target function object is const - or, in case the target function
|
||||
object is held by value, the adapter is const).
|
||||
</p>
|
||||
<a name="fusion.functional.adapters.unfused_generic.header"></a><h5>
|
||||
<a name="id1213664"></a>
|
||||
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.header">Header</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">unfused_generic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused_generic.synopsis"></a><h5>
|
||||
<a name="id1213758"></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"><</span><span class="keyword">class</span> <span class="identifier">Function</span><span class="special">></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><h5>
|
||||
<a name="id1213828"></a>
|
||||
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.template_parameters">Template
|
||||
parameters</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Parameter</th>
|
||||
<th>Description</th>
|
||||
<th>Default</th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td><code class="computeroutput"><span class="identifier">Function</span></code></td>
|
||||
<td>An
|
||||
unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a>
|
||||
</td>
|
||||
<td><EFBFBD></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.unfused_generic.model_of"></a><h5>
|
||||
<a name="id1213902"></a>
|
||||
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.model_of">Model
|
||||
of</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic Function
|
||||
Object</a></li>
|
||||
<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>
|
||||
<dd>
|
||||
A possibly const qualified, unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a> type or reference type thereof
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
|
||||
<dd>
|
||||
An object convertible to <code class="computeroutput"><span class="identifier">F</span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">UG</span></code></span></dt>
|
||||
<dd>
|
||||
The type <code class="computeroutput"><span class="identifier">unfused_generic</span><span class="special"><</span><span class="identifier">F</span><span class="special">></span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">ug</span></code></span></dt>
|
||||
<dd>
|
||||
An instance of <code class="computeroutput"><span class="identifier">UG</span></code>, initialized
|
||||
with <code class="computeroutput"><span class="identifier">f</span></code>
|
||||
</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>
|
||||
<dd>
|
||||
Arguments to <code class="computeroutput"><span class="identifier">ug</span></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<a name="fusion.functional.adapters.unfused_generic.expression_semantics"></a><h5>
|
||||
<a name="id1214110"></a>
|
||||
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.expression_semantics">Expression
|
||||
Semantics</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Expression</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">UG</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code></td>
|
||||
<td>Creates
|
||||
a fused function as described above, initializes the target function
|
||||
with <code class="computeroutput"><span class="identifier">f</span></code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">UG</span><span class="special">()</span></code></td>
|
||||
<td>Creates
|
||||
a fused function as described above, attempts to use <code class="computeroutput"><span class="identifier">F</span></code>'s default constructor.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
<td>Calls <code class="computeroutput"><span class="identifier">f</span></code> with a <a href="../../sequences.html" title="Sequences">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>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.unfused_generic.example"></a><h5>
|
||||
<a name="id1214298"></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"><</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">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">fused_bound_1st</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typename</span> <span class="identifier">traits</span><span class="special">::</span><a href="../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a><span class="special"><</span><span class="identifier">Function</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">fnc_deferred</span><span class="special">;</span>
|
||||
<span class="keyword">typename</span> <span class="identifier">traits</span><span class="special">::</span><a href="../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">xxx_bound</span><span class="special">;</span>
|
||||
<span class="keyword">public</span><span class="special">:</span>
|
||||
|
||||
<span class="identifier">fused_bound_1st</span><span class="special">(</span><span class="identifier">Function</span> <span class="identifier">deferred</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">bound</span><span class="special">)</span>
|
||||
<span class="special">:</span> <span class="identifier">fnc_deferred</span><span class="special">(</span><span class="identifier">deferred</span><span class="special">),</span> <span class="identifier">xxx_bound</span><span class="special">(</span><span class="identifier">bound</span><span class="special">)</span>
|
||||
<span class="special">{</span> <span class="special">}</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">result</span>
|
||||
<span class="special">:</span> <a href="../invocation/metafunctions/invoke.html" title="invoke"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">invoke</span></code></a><span class="special"><</span> <span class="identifier">Function</span><span class="special">,</span>
|
||||
<span class="keyword">typename</span> <a href="../../algorithms/transformation/metafunctions/push_front.html" title="push_front"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">push_front</span></code></a><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">T</span><span class="special">>::</span><span class="identifier">type</span> <span class="special">></span>
|
||||
<span class="special">{</span> <span class="special">};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span>
|
||||
<span class="keyword">typename</span> <span class="identifier">result</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Seq</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">)</span> <span class="keyword">const</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">return</span> <a href="../invocation/functions/invoke.html" title="invoke"><code class="computeroutput"><span class="identifier">invoke</span></code></a><span class="special">(</span><span class="identifier">fnc_deferred</span><span class="special">,</span> <span class="identifier">push_front</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span><span class="identifier">xxx_bound</span><span class="special">));</span>
|
||||
<span class="special">}</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</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">></span>
|
||||
<span class="identifier">unfused_generic</span><span class="special"><</span> <span class="identifier">fused_bound_1st</span><span class="special"><</span><span class="identifier">Function</span><span class="special">,</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span>
|
||||
<span class="identifier">bind_1st</span><span class="special">(</span><span class="identifier">Function</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">x</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">return</span> <span class="identifier">unfused_generic</span><span class="special"><</span> <span class="identifier">fused_bound_1st</span><span class="special"><</span><span class="identifier">Function</span><span class="special">,</span><span class="identifier">T</span><span class="special">></span> <span class="special">>(</span>
|
||||
<span class="identifier">fused_bound_1st</span><span class="special"><</span><span class="identifier">Function</span><span class="special">,</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">x</span><span class="special">)</span> <span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
|
||||
<span class="keyword">int</span> <span class="identifier">test_func</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">a</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">b</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">c</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">return</span> <span class="identifier">a</span><span class="special">+</span><span class="identifier">b</span><span class="special">+</span><span class="identifier">c</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
|
||||
<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">bind_1st</span><span class="special">(&</span> <span class="identifier">test_func</span><span class="special">,</span><span class="number">3</span><span class="special">)(-</span><span class="number">2</span><span class="special">,-</span><span class="number">1</span><span class="special">)</span> <span class="special">==</span> <span class="number">0</span><span class="special">);</span>
|
||||
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">bind_1st</span><span class="special">(</span><a href="http://www.sgi.com/tech/stl/plus.html" target="_top"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">plus</span></code></a><span class="special"><</span><span class="keyword">float</span><span class="special">>(),</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><h5>
|
||||
<a name="id1215450"></a>
|
||||
<a href="unfused_generic.html#fusion.functional.adapters.unfused_generic.see_also">See
|
||||
also</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="unfused_lvalue_args.html" title="unfused_lvalue_args"><code class="computeroutput"><span class="identifier">unfused_lvalue_args</span></code></a></li>
|
||||
<li><a href="unfused_rvalue_args.html" title="unfused_rvalue_args"><code class="computeroutput"><span class="identifier">unfused_rvalue_args</span></code></a></li>
|
||||
<li><a href="unfused_typed.html" title="unfused_typed"><code class="computeroutput"><span class="identifier">unfused_typed</span></code></a></li>
|
||||
<li><a href="../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a></li>
|
||||
<li><a href="../../support/deduce_sequence.html" title="deduce_sequence"><code class="computeroutput"><span class="identifier">deduce_sequence</span></code></a></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright <20> 2001-2005 Joel de Guzman, Dan Marsden</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="fused_function_object.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="unfused_lvalue_args.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
235
doc/html/fusion/functional/adapters/unfused_lvalue_args.html
Normal file
235
doc/html/fusion/functional/adapters/unfused_lvalue_args.html
Normal file
@ -0,0 +1,235 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>unfused_lvalue_args</title>
|
||||
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
||||
<link rel="up" href="../adapters.html" title=" Adapters">
|
||||
<link rel="prev" href="unfused_generic.html" title="unfused_generic">
|
||||
<link rel="next" href="unfused_rvalue_args.html" title="unfused_rvalue_args">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></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="../../../../../../../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>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="unfused_generic.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="unfused_rvalue_args.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="fusion.functional.adapters.unfused_lvalue_args"></a><a href="unfused_lvalue_args.html" title="unfused_lvalue_args">unfused_lvalue_args</a></h4></div></div></div>
|
||||
<a name="fusion.functional.adapters.unfused_lvalue_args.description"></a><h5>
|
||||
<a name="id1215582"></a>
|
||||
<a href="unfused_lvalue_args.html#fusion.functional.adapters.unfused_lvalue_args.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
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 href="../../sequences/concepts/random_access_sequence.html" title="Random
|
||||
Access Sequence">Random
|
||||
Access Sequence</a> of references that is passed to the target function
|
||||
object. Only LValue arguments are accepted.
|
||||
</p>
|
||||
<p>
|
||||
The overload set of the adapter's function call operator can be restricted
|
||||
by removing the <code class="computeroutput"><span class="identifier">type</span></code> member
|
||||
from the nested result metafunction of the <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a> (in this case the substitution-failure-is-not-an-error
|
||||
principle applies for non-nullary calls and nullary calls are explicitly
|
||||
disabled by the library).
|
||||
</p>
|
||||
<div class="caution"><table border="0" summary="Caution">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../images/caution.png"></td>
|
||||
<th align="left">Caution</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
As the nullary call operator cannot be a template it will be instantiated
|
||||
along with the class template, so it must be disabled (as described above)
|
||||
in cases where it isn't instantiable.
|
||||
</p></td></tr>
|
||||
</table></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
|
||||
if the target function object is const - or, in case the target function
|
||||
object is held by value, the adapter is const).
|
||||
</p>
|
||||
<a name="fusion.functional.adapters.unfused_lvalue_args.header"></a><h5>
|
||||
<a name="id1215689"></a>
|
||||
<a href="unfused_lvalue_args.html#fusion.functional.adapters.unfused_lvalue_args.header">Header</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">unfused_lvalue_args</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused_lvalue_args.synopsis"></a><h5>
|
||||
<a name="id1215783"></a>
|
||||
<a href="unfused_lvalue_args.html#fusion.functional.adapters.unfused_lvalue_args.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Function</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">unfused_lvalue_args</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused_lvalue_args.template_parameters"></a><h5>
|
||||
<a name="id1215856"></a>
|
||||
<a href="unfused_lvalue_args.html#fusion.functional.adapters.unfused_lvalue_args.template_parameters">Template
|
||||
parameters</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Parameter</th>
|
||||
<th>Description</th>
|
||||
<th>Default</th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td><code class="computeroutput"><span class="identifier">Function</span></code></td>
|
||||
<td>A
|
||||
unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a>
|
||||
</td>
|
||||
<td><EFBFBD></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.unfused_lvalue_args.model_of"></a><h5>
|
||||
<a name="id1215930"></a>
|
||||
<a href="unfused_lvalue_args.html#fusion.functional.adapters.unfused_lvalue_args.model_of">Model
|
||||
of</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic Function
|
||||
Object</a></li>
|
||||
<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>
|
||||
<dd>
|
||||
A possibly const qualified, unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a> type or reference type thereof
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
|
||||
<dd>
|
||||
An object convertible to <code class="computeroutput"><span class="identifier">F</span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">UL</span></code></span></dt>
|
||||
<dd>
|
||||
The type <code class="computeroutput"><span class="identifier">unfused_lvalue_args</span><span class="special"><</span><span class="identifier">F</span><span class="special">></span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">ul</span></code></span></dt>
|
||||
<dd>
|
||||
An instance of <code class="computeroutput"><span class="identifier">UL</span></code>, initialized
|
||||
with <code class="computeroutput"><span class="identifier">f</span></code>
|
||||
</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>
|
||||
<dd>
|
||||
Arguments to <code class="computeroutput"><span class="identifier">ul</span></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<a name="fusion.functional.adapters.unfused_lvalue_args.expression_semantics"></a><h5>
|
||||
<a name="id1216140"></a>
|
||||
<a href="unfused_lvalue_args.html#fusion.functional.adapters.unfused_lvalue_args.expression_semantics">Expression
|
||||
Semantics</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Expression</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">UL</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code></td>
|
||||
<td>Creates
|
||||
a fused function as described above, initializes the target function
|
||||
with <code class="computeroutput"><span class="identifier">f</span></code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">UL</span><span class="special">()</span></code></td>
|
||||
<td>Creates
|
||||
a fused function as described above, attempts to use <code class="computeroutput"><span class="identifier">F</span></code>'s default constructor.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="computeroutput"><span class="identifier">ul</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code>
|
||||
</td>
|
||||
<td>Calls <code class="computeroutput"><span class="identifier">f</span></code> with a <a href="../../sequences.html" title="Sequences">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>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.unfused_lvalue_args.example"></a><h5>
|
||||
<a name="id1216328"></a>
|
||||
<a href="unfused_lvalue_args.html#fusion.functional.adapters.unfused_lvalue_args.example">Example</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">struct</span> <span class="identifier">fused_incrementer</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">result</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Seq</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">)</span> <span class="keyword">const</span>
|
||||
<span class="special">{</span>
|
||||
<a href="../../algorithms/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a><span class="special">(</span><span class="identifier">s</span><span class="special">,++</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">lambda</span><span class="special">::</span><span class="identifier">_1</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">unfused_lvalue_args</span><span class="special"><</span><span class="identifier">fused_incrementer</span><span class="special">></span> <span class="identifier">increment</span><span class="special">;</span>
|
||||
<span class="keyword">int</span> <span class="identifier">a</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span> <span class="keyword">char</span> <span class="identifier">b</span> <span class="special">=</span> <span class="char">'X'</span><span class="special">;</span>
|
||||
<span class="identifier">increment</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">);</span>
|
||||
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">a</span> <span class="special">==</span> <span class="number">3</span> <span class="special">&&</span> <span class="identifier">b</span> <span class="special">==</span> <span class="char">'Y'</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused_lvalue_args.see_also"></a><h5>
|
||||
<a name="id1216767"></a>
|
||||
<a href="unfused_lvalue_args.html#fusion.functional.adapters.unfused_lvalue_args.see_also">See
|
||||
also</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="unfused_rvalue_args.html" title="unfused_rvalue_args"><code class="computeroutput"><span class="identifier">unfused_rvalue_args</span></code></a></li>
|
||||
<li><a href="unfused_generic.html" title="unfused_generic"><code class="computeroutput"><span class="identifier">unfused_generic</span></code></a></li>
|
||||
<li><a href="unfused_typed.html" title="unfused_typed"><code class="computeroutput"><span class="identifier">unfused_typed</span></code></a></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright <20> 2001-2005 Joel de Guzman, Dan Marsden</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="unfused_generic.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="unfused_rvalue_args.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
235
doc/html/fusion/functional/adapters/unfused_rvalue_args.html
Normal file
235
doc/html/fusion/functional/adapters/unfused_rvalue_args.html
Normal file
@ -0,0 +1,235 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>unfused_rvalue_args</title>
|
||||
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
||||
<link rel="up" href="../adapters.html" title=" Adapters">
|
||||
<link rel="prev" href="unfused_lvalue_args.html" title="unfused_lvalue_args">
|
||||
<link rel="next" href="unfused_typed.html" title="unfused_typed">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></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="../../../../../../../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>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="unfused_lvalue_args.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="unfused_typed.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="fusion.functional.adapters.unfused_rvalue_args"></a><a href="unfused_rvalue_args.html" title="unfused_rvalue_args">unfused_rvalue_args</a></h4></div></div></div>
|
||||
<a name="fusion.functional.adapters.unfused_rvalue_args.description"></a><h5>
|
||||
<a name="id1216864"></a>
|
||||
<a href="unfused_rvalue_args.html#fusion.functional.adapters.unfused_rvalue_args.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
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 href="../../sequences/concepts/random_access_sequence.html" title="Random
|
||||
Access Sequence">Random
|
||||
Access Sequence</a> of references that is passed to the target function
|
||||
object. All referenced objects in the sequence are const qualified.
|
||||
</p>
|
||||
<p>
|
||||
The overload set of the adapter's function call operator can be restricted
|
||||
by removing the <code class="computeroutput"><span class="identifier">type</span></code> member
|
||||
from the nested result metafunction of the <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a> (in this case the substitution-failure-is-not-an-error
|
||||
principle applies for non-nullary calls and nullary calls are explicitly
|
||||
disabled by the library).
|
||||
</p>
|
||||
<div class="caution"><table border="0" summary="Caution">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../images/caution.png"></td>
|
||||
<th align="left">Caution</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
As the nullary call operator cannot be a template it will be instantiated
|
||||
along with the class template, so it must be disabled (as described above)
|
||||
in cases where it isn't instantiable.
|
||||
</p></td></tr>
|
||||
</table></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
|
||||
if the target function object is const - or, in case the target function
|
||||
object is held by value, the adapter is const).
|
||||
</p>
|
||||
<a name="fusion.functional.adapters.unfused_rvalue_args.header"></a><h5>
|
||||
<a name="id1216972"></a>
|
||||
<a href="unfused_rvalue_args.html#fusion.functional.adapters.unfused_rvalue_args.header">Header</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">unfused_rvalue_args</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused_rvalue_args.synopsis"></a><h5>
|
||||
<a name="id1217065"></a>
|
||||
<a href="unfused_rvalue_args.html#fusion.functional.adapters.unfused_rvalue_args.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Function</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">unfused_rvalue_args</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused_rvalue_args.template_parameters"></a><h5>
|
||||
<a name="id1217138"></a>
|
||||
<a href="unfused_rvalue_args.html#fusion.functional.adapters.unfused_rvalue_args.template_parameters">Template
|
||||
parameters</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Parameter</th>
|
||||
<th>Description</th>
|
||||
<th>Default</th>
|
||||
</tr></thead>
|
||||
<tbody><tr>
|
||||
<td><code class="computeroutput"><span class="identifier">Function</span></code></td>
|
||||
<td>A
|
||||
unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a>
|
||||
</td>
|
||||
<td><EFBFBD></td>
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.unfused_rvalue_args.model_of"></a><h5>
|
||||
<a name="id1217213"></a>
|
||||
<a href="unfused_rvalue_args.html#fusion.functional.adapters.unfused_rvalue_args.model_of">Model
|
||||
of</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic Function
|
||||
Object</a></li>
|
||||
<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>
|
||||
<dd>
|
||||
A possibly const qualified, unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a> type or reference type thereof
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
|
||||
<dd>
|
||||
An object convertible to <code class="computeroutput"><span class="identifier">F</span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">UR</span></code></span></dt>
|
||||
<dd>
|
||||
The type <code class="computeroutput"><span class="identifier">unfused_rvalue_args</span><span class="special"><</span><span class="identifier">F</span><span class="special">></span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">ur</span></code></span></dt>
|
||||
<dd>
|
||||
An instance of <code class="computeroutput"><span class="identifier">UR</span></code>, initialized
|
||||
with <code class="computeroutput"><span class="identifier">f</span></code>
|
||||
</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>
|
||||
<dd>
|
||||
Arguments to <code class="computeroutput"><span class="identifier">ur</span></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<a name="fusion.functional.adapters.unfused_rvalue_args.expression_semantics"></a><h5>
|
||||
<a name="id1217423"></a>
|
||||
<a href="unfused_rvalue_args.html#fusion.functional.adapters.unfused_rvalue_args.expression_semantics">Expression
|
||||
Semantics</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Expression</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">UR</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code></td>
|
||||
<td>Creates
|
||||
a fused function as described above, initializes the target function
|
||||
with <code class="computeroutput"><span class="identifier">f</span></code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">UR</span><span class="special">()</span></code></td>
|
||||
<td>Creates
|
||||
a fused function as described above, attempts to use <code class="computeroutput"><span class="identifier">F</span></code>'s default constructor.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="computeroutput"><span class="identifier">ur</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code>
|
||||
</td>
|
||||
<td>Calls <code class="computeroutput"><span class="identifier">f</span></code> with a <a href="../../sequences.html" title="Sequences">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>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.unfused_rvalue_args.example"></a><h5>
|
||||
<a name="id1217611"></a>
|
||||
<a href="unfused_rvalue_args.html#fusion.functional.adapters.unfused_rvalue_args.example">Example</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">struct</span> <span class="identifier">sequence_printer</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">result</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Seq</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">)</span> <span class="keyword">const</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">s</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">void</span> <span class="identifier">try_it</span><span class="special">()</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">unfused_rvalue_args</span><span class="special"><</span><span class="identifier">sequence_printer</span><span class="special">></span> <span class="identifier">print</span><span class="special">;</span>
|
||||
<span class="identifier">print</span><span class="special">(</span><span class="number">24</span><span class="special">,</span><span class="string">"bottles of beer in"</span><span class="special">,</span><span class="char">'a'</span><span class="special">,</span><span class="string">"box."</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused_rvalue_args.see_also"></a><h5>
|
||||
<a name="id1217963"></a>
|
||||
<a href="unfused_rvalue_args.html#fusion.functional.adapters.unfused_rvalue_args.see_also">See
|
||||
also</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="unfused_lvalue_args.html" title="unfused_lvalue_args"><code class="computeroutput"><span class="identifier">unfused_lvalue_args</span></code></a></li>
|
||||
<li><a href="unfused_generic.html" title="unfused_generic"><code class="computeroutput"><span class="identifier">unfused_generic</span></code></a></li>
|
||||
<li><a href="unfused_typed.html" title="unfused_typed"><code class="computeroutput"><span class="identifier">unfused_typed</span></code></a></li>
|
||||
<li><a href="../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a></li>
|
||||
<li><a href="../../support/deduce_sequence.html" title="deduce_sequence"><code class="computeroutput"><span class="identifier">deduce_sequence</span></code></a></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright <20> 2001-2005 Joel de Guzman, Dan Marsden</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="unfused_lvalue_args.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="unfused_typed.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
309
doc/html/fusion/functional/adapters/unfused_typed.html
Normal file
309
doc/html/fusion/functional/adapters/unfused_typed.html
Normal file
@ -0,0 +1,309 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>unfused_typed</title>
|
||||
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
|
||||
<link rel="start" href="../../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
||||
<link rel="up" href="../adapters.html" title=" Adapters">
|
||||
<link rel="prev" href="unfused_rvalue_args.html" title="unfused_rvalue_args">
|
||||
<link rel="next" href="../generation.html" title="Generation">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%">
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></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="../../../../../../../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>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="unfused_rvalue_args.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../generation.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
<a name="fusion.functional.adapters.unfused_typed"></a><a href="unfused_typed.html" title="unfused_typed">unfused_typed</a></h4></div></div></div>
|
||||
<a name="fusion.functional.adapters.unfused_typed.description"></a><h5>
|
||||
<a name="id1218094"></a>
|
||||
<a href="unfused_typed.html#fusion.functional.adapters.unfused_typed.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
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 href="../../sequences/concepts/random_access_sequence.html" title="Random
|
||||
Access Sequence">Random
|
||||
Access Sequence</a> that is passed to the target function object.
|
||||
</p>
|
||||
<p>
|
||||
The call operators of the resulting function object are strictly typed
|
||||
(in other words, non-templatized) with the types from a <a href="../../sequences.html" title="Sequences">Sequence</a>.
|
||||
By default, call operators with zero to N parameters are generated to,
|
||||
where N is the size of the <a href="../../sequences.html" title="Sequences">Sequence</a>
|
||||
that specifies the types.
|
||||
</p>
|
||||
<p>
|
||||
The overload set of the adapter's function call operator can be restricted
|
||||
by removing the <code class="computeroutput"><span class="identifier">type</span></code> member
|
||||
from the nested result metafunction of the <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a> (in this case the substitution-failure-is-not-an-error
|
||||
principle applies for non-nullary calls and nullary calls are explicitly
|
||||
disabled by the library).
|
||||
</p>
|
||||
<div class="caution"><table border="0" summary="Caution">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../../../images/caution.png"></td>
|
||||
<th align="left">Caution</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
As the function call operators are not templates, they are instantiated
|
||||
along with the class template, so they must be disabled (as described
|
||||
above) in cases where they are not instantiable.
|
||||
</p></td></tr>
|
||||
</table></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
|
||||
if the target function object is const - or, in case the target function
|
||||
object is held by value, the adapter is const).
|
||||
</p>
|
||||
<div class="tip"><table border="0" summary="Tip">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../images/tip.png"></td>
|
||||
<th align="left">Tip</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
If the type sequence passed to this template contains non-reference elements,
|
||||
the element is copied only once - the call operator's signature is optimized
|
||||
automatically to avoid by-value parameters.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.unfused_typed.header"></a><h5>
|
||||
<a name="id1218234"></a>
|
||||
<a href="unfused_typed.html#fusion.functional.adapters.unfused_typed.header">Header</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">functional</span><span class="special">/</span><span class="identifier">adapter</span><span class="special">/</span><span class="identifier">unfused_typed</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused_typed.synopsis"></a><h5>
|
||||
<a name="id1218325"></a>
|
||||
<a href="unfused_typed.html#fusion.functional.adapters.unfused_typed.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Function</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Sequence</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">unfused_typed</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused_typed.template_parameters"></a><h5>
|
||||
<a name="id1218412"></a>
|
||||
<a href="unfused_typed.html#fusion.functional.adapters.unfused_typed.template_parameters">Template
|
||||
parameters</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Parameter</th>
|
||||
<th>Description</th>
|
||||
<th>Default</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">Function</span></code></td>
|
||||
<td>A
|
||||
unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a>
|
||||
</td>
|
||||
<td><EFBFBD></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">Sequence</span></code></td>
|
||||
<td>A
|
||||
<a href="../../sequences.html" title="Sequences">Sequence</a>
|
||||
</td>
|
||||
<td><EFBFBD></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.unfused_typed.model_of"></a><h5>
|
||||
<a name="id1218510"></a>
|
||||
<a href="unfused_typed.html#fusion.functional.adapters.unfused_typed.model_of">Model
|
||||
of</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic Function
|
||||
Object</a></li>
|
||||
<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>
|
||||
<dd>
|
||||
A possibly const qualified, unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a> type or reference type thereof
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
|
||||
<dd>
|
||||
An object convertible to <code class="computeroutput"><span class="identifier">F</span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">S</span></code></span></dt>
|
||||
<dd>
|
||||
A <a href="../../sequences.html" title="Sequences">Sequence</a> of parameter types
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">UT</span></code></span></dt>
|
||||
<dd>
|
||||
The type <code class="computeroutput"><span class="identifier">unfused_typed</span><span class="special"><</span><span class="identifier">F</span><span class="special">,</span><span class="identifier">S</span><span class="special">></span></code>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">ut</span></code></span></dt>
|
||||
<dd>
|
||||
An instance of <code class="computeroutput"><span class="identifier">UT</span></code>, initialized
|
||||
with <code class="computeroutput"><span class="identifier">f</span></code>
|
||||
</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>
|
||||
<dd>
|
||||
Arguments to <code class="computeroutput"><span class="identifier">ut</span></code>, convertible
|
||||
to the types in <code class="computeroutput"><span class="identifier">S</span></code>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<a name="fusion.functional.adapters.unfused_typed.expression_semantics"></a><h5>
|
||||
<a name="id1218758"></a>
|
||||
<a href="unfused_typed.html#fusion.functional.adapters.unfused_typed.expression_semantics">Expression
|
||||
Semantics</a>
|
||||
</h5>
|
||||
<div class="informaltable"><table class="table">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>Expression</th>
|
||||
<th>Semantics</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">UT</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code></td>
|
||||
<td>Creates
|
||||
a fused function as described above, initializes the target function
|
||||
with <code class="computeroutput"><span class="identifier">f</span></code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code class="computeroutput"><span class="identifier">UT</span><span class="special">()</span></code></td>
|
||||
<td>Creates
|
||||
a fused function as described above, attempts to use <code class="computeroutput"><span class="identifier">F</span></code>'s default constructor.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="computeroutput"><span class="identifier">ut</span><span class="special">(</span><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></code>
|
||||
</td>
|
||||
<td>Calls <code class="computeroutput"><span class="identifier">f</span></code> with an instance of <code class="computeroutput"><span class="identifier">S</span></code> (or a subsequence of <code class="computeroutput"><span class="identifier">S</span></code> starting at the first element,
|
||||
if fewer arguments are given and the overload hasn't been disabled)
|
||||
initialized with <code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.unfused_typed.example"></a><h5>
|
||||
<a name="id1218958"></a>
|
||||
<a href="unfused_typed.html#fusion.functional.adapters.unfused_typed.example">Example</a>
|
||||
</h5>
|
||||
<pre class="programlisting">
|
||||
<span class="keyword">struct</span> <span class="identifier">add_assign</span> <span class="comment">// applies operator+=
|
||||
</span><span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">result_type</span><span class="special">;</span> <span class="comment">// for simplicity
|
||||
</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T</span> <span class="special">&</span> <span class="identifier">lhs</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">rhs</span><span class="special">)</span> <span class="keyword">const</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">lhs</span> <span class="special">+=</span> <span class="identifier">rhs</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Tie</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">fused_parallel_adder</span>
|
||||
<span class="special">{</span>
|
||||
<span class="identifier">Tie</span> <span class="identifier">tie_dest</span><span class="special">;</span>
|
||||
<span class="keyword">public</span><span class="special">:</span>
|
||||
<span class="keyword">explicit</span> <span class="identifier">fused_parallel_adder</span><span class="special">(</span><span class="identifier">Tie</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">dest</span><span class="special">)</span>
|
||||
<span class="special">:</span> <span class="identifier">tie_dest</span><span class="special">(</span><span class="identifier">dest</span><span class="special">)</span>
|
||||
<span class="special">{</span> <span class="special">}</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">result</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <span class="keyword">void</span> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span>
|
||||
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Seq</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">s</span><span class="special">)</span> <span class="keyword">const</span>
|
||||
<span class="special">{</span>
|
||||
<a href="../../algorithms/iteration/functions/for_each.html" title="for_each"><code class="computeroutput"><span class="identifier">for_each</span></code></a><span class="special">(</span><a href="../../algorithms/transformation/functions/zip.html" title="zip"><code class="computeroutput"><span class="identifier">zip</span></code></a><span class="special">(</span><span class="identifier">tie_dest</span><span class="special">,</span><span class="identifier">s</span><span class="special">),</span> <a href="fused.html" title="fused"><code class="computeroutput"><span class="identifier">fused</span></code></a><span class="special"><</span><span class="identifier">add_assign</span><span class="special">>()</span> <span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="comment">// accepts a tie and creates a typed function object from it
|
||||
</span><span class="keyword">struct</span> <span class="identifier">fused_parallel_adder_maker</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">result</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">unfused_typed</span><span class="special"><</span><span class="identifier">fused_parallel_adder</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>,</span>
|
||||
<span class="keyword">typename</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">transform</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">remove_reference</span><span class="special"><</span><span class="identifier">_</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span> <span class="special">></span> <span class="identifier">type</span><span class="special">;</span>
|
||||
<span class="special">};</span>
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">Seq</span><span class="special">></span>
|
||||
<span class="keyword">typename</span> <span class="identifier">result</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Seq</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">tie</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">return</span> <span class="keyword">typename</span> <span class="identifier">result</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span><span class="special">(</span><span class="identifier">fused_parallel_adder</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>(</span><span class="identifier">tie</span><span class="special">));</span>
|
||||
<span class="special">}</span>
|
||||
<span class="special">};</span>
|
||||
<a href="unfused_lvalue_args.html" title="unfused_lvalue_args"><code class="computeroutput"><span class="identifier">unfused_lvalue_args</span></code></a><span class="special"><</span><span class="identifier">fused_parallel_adder_maker</span><span class="special">></span> <span class="identifier">parallel_add</span><span class="special">;</span>
|
||||
|
||||
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">int</span> <span class="identifier">a</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span> <span class="keyword">char</span> <span class="identifier">b</span> <span class="special">=</span> <span class="char">'X'</span><span class="special">;</span>
|
||||
<span class="comment">// the second call is strictly typed with the types deduced from the
|
||||
</span> <span class="comment">// first call
|
||||
</span> <span class="identifier">parallel_add</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">)(</span><span class="number">3</span><span class="special">,</span><span class="number">2</span><span class="special">);</span>
|
||||
<span class="identifier">parallel_add</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">)(</span><span class="number">3</span><span class="special">);</span>
|
||||
<span class="identifier">parallel_add</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">)();</span>
|
||||
<span class="identifier">assert</span><span class="special">(</span><span class="identifier">a</span> <span class="special">==</span> <span class="number">8</span> <span class="special">&&</span> <span class="identifier">b</span> <span class="special">==</span> <span class="char">'Z'</span><span class="special">);</span>
|
||||
|
||||
<span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused_typed.see_also"></a><h5>
|
||||
<a name="id1220201"></a>
|
||||
<a href="unfused_typed.html#fusion.functional.adapters.unfused_typed.see_also">See also</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="unfused_generic.html" title="unfused_generic"><code class="computeroutput"><span class="identifier">unfused_generic</span></code></a></li>
|
||||
<li><a href="unfused_lvalue_args.html" title="unfused_lvalue_args"><code class="computeroutput"><span class="identifier">unfused_lvalue_args</span></code></a></li>
|
||||
<li><a href="unfused_rvalue_args.html" title="unfused_rvalue_args"><code class="computeroutput"><span class="identifier">unfused_rvalue_args</span></code></a></li>
|
||||
<li><a href="../../support/deduce.html" title="deduce"><code class="computeroutput"><span class="identifier">deduce</span></code></a></li>
|
||||
<li><a href="../../support/deduce_sequence.html" title="deduce_sequence"><code class="computeroutput"><span class="identifier">deduce_sequence</span></code></a></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><small>Copyright <20> 2001-2005 Joel de Guzman, Dan Marsden</small></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="unfused_rvalue_args.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../generation.html"><img src="../../../images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user