forked from boostorg/fusion
Regenerate fusion documentation.
[SVN r41607]
This commit is contained in:
1 parent
df69f05f94
commit
59df6ee7f1
259 files changed
+7187
-7506
No files matched your search
@@ -3,10 +3,10 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Functional</title>
|
||||
<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
|
||||
<link rel="start" href="../index.html" title="Chapter 1. Fusion 2.0">
|
||||
<link rel="up" href="../index.html" title="Chapter 1. Fusion 2.0">
|
||||
<link rel="prev" href="extension/macros/adapt_assoc.html" title=" BOOST_FUSION_ADAPT_ASSOC_STRUCT">
|
||||
<link rel="prev" href="extension/macros/adapt_assoc.html" title="BOOST_FUSION_ADAPT_ASSOC_STRUCT">
|
||||
<link rel="next" href="functional/concepts.html" title="Concepts">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@@ -14,8 +14,8 @@
|
||||
<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="http://beta.boost.org/users/people.html">People</a></td>
|
||||
<td align="center"><a href="http://beta.boost.org/users/faq.html">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@@ -24,7 +24,8 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
<a name="fusion.functional"></a><a href="functional.html" title="Functional">Functional</a></h2></div></div></div>
|
||||
<a name="fusion.functional"></a><a href="functional.html" title="Functional">Functional</a>
|
||||
</h2></div></div></div>
|
||||
<div class="toc"><dl>
|
||||
<dt><span class="section"><a href="functional/concepts.html">Concepts</a></span></dt>
|
||||
<dd><dl>
|
||||
@@ -64,11 +65,11 @@
|
||||
<p>
|
||||
/functional.hpp>
|
||||
</p>
|
||||
<a name="fusion.functional.fused_and_unfused_forms"></a><h3>
|
||||
<a name="id651450"></a>
|
||||
<a name="fusion.functional.fused_and_unfused_forms"></a><h4>
|
||||
<a name="id2788896"></a>
|
||||
<a href="functional.html#fusion.functional.fused_and_unfused_forms">Fused and unfused
|
||||
forms</a>
|
||||
</h3>
|
||||
</h4>
|
||||
<p>
|
||||
What is a function call?
|
||||
</p>
|
||||
@@ -79,7 +80,7 @@
|
||||
It is a name and a tuple written next to each other, left-to-right.
|
||||
</p>
|
||||
<p>
|
||||
Although the C++ syntax does not allow to replace <tt class="literal">(a,b,c)</tt>
|
||||
Although the C++ syntax does not allow to replace <code class="literal">(a,b,c)</code>
|
||||
with some Fusion <a href="sequence.html" title="Sequence">Sequence</a>, introducing
|
||||
yet another function provides a solution:
|
||||
</p>
|
||||
@@ -87,25 +88,25 @@
|
||||
<span class="identifier">invoke</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span><span class="identifier">my_sequence</span><span class="special">)</span>
|
||||
</pre>
|
||||
<p>
|
||||
Alternatively it is possible to apply a simple transformation to <tt class="literal">f</tt>
|
||||
Alternatively it is possible to apply a simple transformation to <code class="literal">f</code>
|
||||
in order to achieve the same effect:
|
||||
</p>
|
||||
<pre class="programlisting">
|
||||
<span class="identifier">f</span> <span class="identifier">tuple</span> <span class="special"><=></span> f' <span class="special">(</span><span class="identifier">tuple</span><span class="special">)</span>
|
||||
</pre>
|
||||
<p>
|
||||
Now, <tt class="literal">f'</tt> is an unary function that takes the arguments to
|
||||
<tt class="computeroutput"><span class="identifier">f</span></tt> as a tuple; <tt class="literal">f'</tt>
|
||||
is the <span class="emphasis"><em>fused</em></span> form of <tt class="computeroutput"><span class="identifier">f</span></tt>.
|
||||
Now, <code class="literal">f'</code> is an unary function that takes the arguments to
|
||||
<code class="computeroutput"><span class="identifier">f</span></code> as a tuple; <code class="literal">f'</code>
|
||||
is the <span class="emphasis"><em>fused</em></span> form of <code class="computeroutput"><span class="identifier">f</span></code>.
|
||||
Reading the above equivalence right-to-left to get the inverse transformation,
|
||||
<tt class="computeroutput"><span class="identifier">f</span></tt> is the <span class="emphasis"><em>unfused</em></span>
|
||||
form of <tt class="literal">f'</tt>.
|
||||
<code class="computeroutput"><span class="identifier">f</span></code> is the <span class="emphasis"><em>unfused</em></span>
|
||||
form of <code class="literal">f'</code>.
|
||||
</p>
|
||||
<a name="fusion.functional.calling_functions_and_function_objects"></a><h3>
|
||||
<a name="id651715"></a>
|
||||
<a name="fusion.functional.calling_functions_and_function_objects"></a><h4>
|
||||
<a name="id2789136"></a>
|
||||
<a href="functional.html#fusion.functional.calling_functions_and_function_objects">Calling
|
||||
functions and function objects</a>
|
||||
</h3>
|
||||
</h4>
|
||||
<p>
|
||||
Having generic C++ code call back arbitrary functions provided by the client
|
||||
used to be a heavily repetitive task, as different functions can differ in
|
||||
@@ -118,8 +119,7 @@
|
||||
</p>
|
||||
<p>
|
||||
Transforming an unfused function into its fused counterpart allows n-ary calls
|
||||
from an algorithm that invokes an unary <a href="functional/concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
from an algorithm that invokes an unary <a href="functional/concepts/poly.html" title="Polymorphic Function Object">Polymorphic
|
||||
Function Object</a> with <a href="sequence.html" title="Sequence">Sequence</a>
|
||||
arguments.
|
||||
</p>
|
||||
@@ -129,11 +129,11 @@
|
||||
variant has a corresponding generator function template that returns an adapter
|
||||
instance for the given argument.
|
||||
</p>
|
||||
<a name="fusion.functional.making_fusion_code_callable_through_a_function_object_interface"></a><h3>
|
||||
<a name="id651791"></a>
|
||||
<a name="fusion.functional.making_fusion_code_callable_through_a_function_object_interface"></a><h4>
|
||||
<a name="id2789202"></a>
|
||||
<a href="functional.html#fusion.functional.making_fusion_code_callable_through_a_function_object_interface">Making
|
||||
Fusion code callable through a function object interface</a>
|
||||
</h3>
|
||||
</h4>
|
||||
<p>
|
||||
Transforming a fused function into its unfused counterpart allows to create
|
||||
function objects to accept arbitrary calls. In other words, an unary function
|
||||
|
||||
Reference in new issue
Block a user