forked from boostorg/fusion
@ -3,10 +3,10 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>unfused</title>
|
||||
<link rel="stylesheet" href="../../../../../../../doc/html/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">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
<link rel="home" 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="previous" href="fused_function_object.html" title="fused_function_object">
|
||||
<link rel="next" href="unfused_typed.html" title="unfused_typed">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -23,10 +23,14 @@
|
||||
<a accesskey="p" href="fused_function_object.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../adapters.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="unfused_typed.html"><img src="../../../../../../../doc/html/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"></a><a href="unfused.html" title="unfused">unfused</a></h4></div></div></div>
|
||||
<div class="titlepage">
|
||||
<div><div><h4 class="title">
|
||||
<a name="fusion.functional.adapters.unfused"></a><a href="unfused.html" title="unfused">unfused</a>
|
||||
</h4></div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
<a name="fusion.functional.adapters.unfused.description"></a><h5>
|
||||
<a name="id1312214"></a>
|
||||
<a name="id620760"></a>
|
||||
<a href="unfused.html#fusion.functional.adapters.unfused.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -42,7 +46,7 @@
|
||||
</p>
|
||||
<p>
|
||||
The nullary overload of the call operator can be removed by setting the
|
||||
second template parameter to <code class="computeroutput"><span class="keyword">false</span></code>,
|
||||
second template parameter to <tt class="computeroutput"><span class="keyword">false</span></tt>,
|
||||
which is very useful if the result type computation would result in a compile
|
||||
error, otherwise (nullary call operator's prototypes can't be templates
|
||||
and thus are instantiated as early as the class template).
|
||||
@ -54,25 +58,25 @@
|
||||
<p>
|
||||
The type of the target function is allowed to be const qualified or a reference.
|
||||
Const qualification is preserved and propagated appropriately. In other
|
||||
words, only const versions of <code class="literal">operator()</code> can be used
|
||||
words, only const versions of <tt class="literal">operator()</tt> can be used
|
||||
if the target function object is const - or, in case the target function
|
||||
object is held by value, the adapter is const.
|
||||
</p>
|
||||
<a name="fusion.functional.adapters.unfused.header"></a><h5>
|
||||
<a name="id1312314"></a>
|
||||
<a name="id620869"></a>
|
||||
<a href="unfused.html#fusion.functional.adapters.unfused.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</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused.synopsis"></a><h5>
|
||||
<a name="id1312406"></a>
|
||||
<a name="id620972"></a>
|
||||
<a href="unfused.html#fusion.functional.adapters.unfused.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">bool</span> <span class="identifier">AllowNullary</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">></span>
|
||||
<span class="keyword">class</span> <span class="identifier">unfused</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused.template_parameters"></a><h5>
|
||||
<a name="id1312501"></a>
|
||||
<a name="id621078"></a>
|
||||
<a href="unfused.html#fusion.functional.adapters.unfused.template_parameters">Template
|
||||
parameters</a>
|
||||
</h5>
|
||||
@ -83,62 +87,44 @@
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
<th><p>
|
||||
Parameter
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Description
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Default
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">Function</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">Function</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
A unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
<td><p>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">AllowNullary</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">AllowNullary</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Boolean constant
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
</p></td>
|
||||
<td><p>
|
||||
true
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.unfused.model_of"></a><h5>
|
||||
<a name="id1312635"></a>
|
||||
<a name="id621227"></a>
|
||||
<a href="unfused.html#fusion.functional.adapters.unfused.model_of">Model of</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
@ -152,33 +138,33 @@
|
||||
<div class="variablelist">
|
||||
<p class="title"><b>Notation</b></p>
|
||||
<dl>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt>
|
||||
<dt><span class="term"><tt class="computeroutput"><span class="identifier">F</span></tt></span></dt>
|
||||
<dd><p>
|
||||
A possibly const qualified, unary <a href="../concepts/poly.html" title=" Polymorphic Function
|
||||
Object">Polymorphic
|
||||
Function Object</a> type or reference type thereof
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
|
||||
<dt><span class="term"><tt class="computeroutput"><span class="identifier">f</span></tt></span></dt>
|
||||
<dd><p>
|
||||
An object convertible to <code class="computeroutput"><span class="identifier">F</span></code>
|
||||
An object convertible to <tt class="computeroutput"><span class="identifier">F</span></tt>
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">UL</span></code></span></dt>
|
||||
<dt><span class="term"><tt class="computeroutput"><span class="identifier">UL</span></tt></span></dt>
|
||||
<dd><p>
|
||||
The type <code class="computeroutput"><span class="identifier">unfused</span><span class="special"><</span><span class="identifier">F</span><span class="special">></span></code>
|
||||
The type <tt class="computeroutput"><span class="identifier">unfused</span><span class="special"><</span><span class="identifier">F</span><span class="special">></span></tt>
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">ul</span></code></span></dt>
|
||||
<dt><span class="term"><tt class="computeroutput"><span class="identifier">ul</span></tt></span></dt>
|
||||
<dd><p>
|
||||
An instance of <code class="computeroutput"><span class="identifier">UL</span></code>,
|
||||
initialized with <code class="computeroutput"><span class="identifier">f</span></code>
|
||||
An instance of <tt class="computeroutput"><span class="identifier">UL</span></tt>,
|
||||
initialized with <tt class="computeroutput"><span class="identifier">f</span></tt>
|
||||
</p></dd>
|
||||
<dt><span class="term"><code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code></span></dt>
|
||||
<dt><span class="term"><tt class="computeroutput"><span class="identifier">a0</span></tt>...<tt class="computeroutput"><span class="identifier">aN</span></tt></span></dt>
|
||||
<dd><p>
|
||||
Arguments to <code class="computeroutput"><span class="identifier">ul</span></code>
|
||||
Arguments to <tt class="computeroutput"><span class="identifier">ul</span></tt>
|
||||
</p></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<a name="fusion.functional.adapters.unfused.expression_semantics"></a><h5>
|
||||
<a name="id1312873"></a>
|
||||
<a name="id621496"></a>
|
||||
<a href="unfused.html#fusion.functional.adapters.unfused.expression_semantics">Expression
|
||||
Semantics</a>
|
||||
</h5>
|
||||
@ -188,61 +174,45 @@
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
<th><p>
|
||||
Expression
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Semantics
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">UL</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">UL</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Creates a fused function as described above, initializes the target
|
||||
function with <code class="computeroutput"><span class="identifier">f</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
function with <tt class="computeroutput"><span class="identifier">f</span></tt>.
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">UL</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Creates a fused function as described above, attempts to use <code class="computeroutput"><span class="identifier">F</span></code>'s default constructor.
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">UL</span><span class="special">()</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Creates a fused function as described above, attempts to use <tt class="computeroutput"><span class="identifier">F</span></tt>'s default constructor.
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">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>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Calls <code class="computeroutput"><span class="identifier">f</span></code> with a
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">ul</span><span class="special">(</span><span class="identifier">a0</span></tt>...<tt class="computeroutput"><span class="identifier">aN</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Calls <tt class="computeroutput"><span class="identifier">f</span></tt> with a
|
||||
<a href="../../sequence.html" title="Sequence">Sequence</a> that contains references
|
||||
to the arguments <code class="computeroutput"><span class="identifier">a0</span></code>...<code class="computeroutput"><span class="identifier">aN</span></code>.
|
||||
</p>
|
||||
</td>
|
||||
to the arguments <tt class="computeroutput"><span class="identifier">a0</span></tt>...<tt class="computeroutput"><span class="identifier">aN</span></tt>.
|
||||
</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="fusion.functional.adapters.unfused.example"></a><h5>
|
||||
<a name="id1313108"></a>
|
||||
<a name="id621760"></a>
|
||||
<a href="unfused.html#fusion.functional.adapters.unfused.example">Example</a>
|
||||
</h5>
|
||||
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">fused_incrementer</span>
|
||||
@ -256,7 +226,7 @@
|
||||
<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="../../algorithm/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>
|
||||
<a href="../../algorithm/iteration/functions/for_each.html" title="for_each"><tt class="computeroutput"><span class="identifier">for_each</span></tt></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>
|
||||
|
||||
@ -269,13 +239,13 @@
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<a name="fusion.functional.adapters.unfused.see_also"></a><h5>
|
||||
<a name="id1313547"></a>
|
||||
<a name="id622256"></a>
|
||||
<a href="unfused.html#fusion.functional.adapters.unfused.see_also">See also</a>
|
||||
</h5>
|
||||
<div class="itemizedlist"><ul type="disc">
|
||||
<li><a href="unfused_typed.html" title="unfused_typed"><code class="computeroutput"><span class="identifier">unfused_typed</span></code></a></li>
|
||||
<li><a href="unfused_typed.html" title="unfused_typed"><tt class="computeroutput"><span class="identifier">unfused_typed</span></tt></a></li>
|
||||
<li><a href="../generation/functions/mk_unfused.html" title="
|
||||
make_unfused"><code class="computeroutput"><span class="identifier">make_unfused</span></code></a></li>
|
||||
make_unfused"><tt class="computeroutput"><span class="identifier">make_unfused</span></tt></a></li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
Reference in New Issue
Block a user