forked from boostorg/fusion
347 lines
16 KiB
HTML
347 lines
16 KiB
HTML
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||
<title>
|
||
make_unfused</title>
|
||
<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
|
||
<<<<<<< .working
|
||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||
=======
|
||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
|
||
<<<<<<< .working
|
||
>>>>>>> .merge-right.r57125
|
||
<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.0">
|
||
=======
|
||
<link rel="home" href="../../../../index.html" title="Chapter 1. Fusion 2.0">
|
||
>>>>>>> .merge-right.r58299
|
||
<link rel="up" href="../functions.html" title="Functions">
|
||
<link rel="previous" href="mk_fused_fobj.html" title="
|
||
make_fused_function_object">
|
||
<link rel="next" href="../metafunctions.html" title="Metafunctions">
|
||
</head>
|
||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||
<table cellpadding="2" width="100%"><tr>
|
||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
|
||
<td align="center"><a href="../../../../../../../../index.html">Home</a></td>
|
||
<td align="center"><a href="../../../../../../../libraries.htm">Libraries</a></td>
|
||
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
||
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
||
<td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
|
||
</tr></table>
|
||
<hr>
|
||
<div class="spirit-nav">
|
||
<a accesskey="p" href="mk_fused_fobj.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.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="../metafunctions.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||
</div>
|
||
<div class="section" lang="en">
|
||
<div class="titlepage">
|
||
<div><div><h5 class="title">
|
||
<a name="fusion.functional.generation.functions.mk_unfused"></a><a href="mk_unfused.html" title="
|
||
make_unfused">
|
||
make_unfused</a>
|
||
</h5></div></div>
|
||
<div></div>
|
||
</div>
|
||
<a name="fusion.functional.generation.functions.mk_unfused.description"></a><h6>
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<a name="id630954"></a>
|
||
<a href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.description">Description</a>
|
||
=======
|
||
<a name="id880978"></a>
|
||
=======
|
||
<a name="id847894"></a>
|
||
=======
|
||
<a name="id840270"></a>
|
||
=======
|
||
<a name="id863088"></a>
|
||
=======
|
||
<a name="id851341"></a>
|
||
=======
|
||
<a name="id848064"></a>
|
||
>>>>>>> .merge-right.r58559
|
||
>>>>>>> .merge-right.r58549
|
||
>>>>>>> .merge-right.r58299
|
||
>>>>>>> .merge-right.r57337
|
||
>>>>>>> .merge-right.r57242
|
||
<a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.description">Description</a>
|
||
>>>>>>> .merge-right.r57125
|
||
</h6>
|
||
<p>
|
||
Creates a <a href="../../adapters/unfused.html" title="unfused"><tt class="computeroutput"><span class="identifier">unfused</span></tt></a> adapter for a given,
|
||
unary <a href="../../concepts/poly.html" title=" Polymorphic Function
|
||
Object">Polymorphic Function
|
||
Object</a>. The usual <a href="../../../notes.html#fusion.notes.element_conversion"><span class="emphasis"><em>element
|
||
conversion</em></span></a> is applied to the target function.
|
||
</p>
|
||
<a name="fusion.functional.generation.functions.mk_unfused.synopsis"></a><h6>
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<a name="id631022"></a>
|
||
<a href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.synopsis">Synopsis</a>
|
||
=======
|
||
<a name="id881020"></a>
|
||
=======
|
||
<a name="id847936"></a>
|
||
=======
|
||
<a name="id840312"></a>
|
||
=======
|
||
<a name="id863130"></a>
|
||
=======
|
||
<a name="id851383"></a>
|
||
=======
|
||
<a name="id848106"></a>
|
||
>>>>>>> .merge-right.r58559
|
||
>>>>>>> .merge-right.r58549
|
||
>>>>>>> .merge-right.r58299
|
||
>>>>>>> .merge-right.r57337
|
||
>>>>>>> .merge-right.r57242
|
||
<a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.synopsis">Synopsis</a>
|
||
>>>>>>> .merge-right.r57125
|
||
</h6>
|
||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span>
|
||
<span class="keyword">inline</span> <span class="keyword">typename</span> <a href="../metafunctions/mk_unfused.html" title="
|
||
make_unfused"><tt class="computeroutput"><span class="identifier">make_unfused</span></tt></a><span class="special"><</span><span class="identifier">F</span><span class="special">>::</span><span class="identifier">type</span>
|
||
<span class="identifier">make_unfused</span><span class="special">(</span><span class="identifier">F</span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">f</span><span class="special">);</span>
|
||
</pre>
|
||
<a name="fusion.functional.generation.functions.mk_unfused.parameters"></a><h6>
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<a name="id631173"></a>
|
||
<a href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.parameters">Parameters</a>
|
||
=======
|
||
<a name="id881126"></a>
|
||
=======
|
||
<a name="id848043"></a>
|
||
=======
|
||
<a name="id840419"></a>
|
||
=======
|
||
<a name="id863237"></a>
|
||
=======
|
||
<a name="id851490"></a>
|
||
=======
|
||
<a name="id848213"></a>
|
||
>>>>>>> .merge-right.r58559
|
||
>>>>>>> .merge-right.r58549
|
||
>>>>>>> .merge-right.r58299
|
||
>>>>>>> .merge-right.r57337
|
||
>>>>>>> .merge-right.r57242
|
||
<a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.parameters">Parameters</a>
|
||
>>>>>>> .merge-right.r57125
|
||
</h6>
|
||
<div class="informaltable"><table class="table">
|
||
<colgroup>
|
||
<col>
|
||
<col>
|
||
<col>
|
||
</colgroup>
|
||
<thead><tr>
|
||
<th><p>
|
||
Parameter
|
||
</p></th>
|
||
<th><p>
|
||
Requirement
|
||
</p></th>
|
||
<th><p>
|
||
Description
|
||
</p></th>
|
||
</tr></thead>
|
||
<tbody><tr>
|
||
<td><p>
|
||
<tt class="computeroutput"><span class="identifier">f</span></tt>
|
||
</p></td>
|
||
<td><p>
|
||
Model of <a href="../../concepts/poly.html" title=" Polymorphic Function
|
||
Object">Polymorphic
|
||
Function Object</a>
|
||
</p></td>
|
||
<td><p>
|
||
The function to transform.
|
||
</p></td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
<a name="fusion.functional.generation.functions.mk_unfused.expression_semantics"></a><h6>
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<a name="id631289"></a>
|
||
<a href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.expression_semantics">Expression
|
||
=======
|
||
<a name="id881216"></a>
|
||
=======
|
||
<a name="id848133"></a>
|
||
=======
|
||
<a name="id840509"></a>
|
||
=======
|
||
<a name="id863327"></a>
|
||
=======
|
||
<a name="id851580"></a>
|
||
=======
|
||
<a name="id848303"></a>
|
||
>>>>>>> .merge-right.r58559
|
||
>>>>>>> .merge-right.r58549
|
||
>>>>>>> .merge-right.r58299
|
||
>>>>>>> .merge-right.r57337
|
||
>>>>>>> .merge-right.r57242
|
||
<a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.expression_semantics">Expression
|
||
>>>>>>> .merge-right.r57125
|
||
Semantics</a>
|
||
</h6>
|
||
<pre class="programlisting"><span class="identifier">make_unfused</span><span class="special">(</span><span class="identifier">f</span><span class="special">);</span>
|
||
</pre>
|
||
<p>
|
||
<span class="bold"><b>Return type</b></span>: A specialization of <a href="../../adapters/unfused.html" title="unfused"><tt class="computeroutput"><span class="identifier">unfused</span></tt></a>.
|
||
</p>
|
||
<p>
|
||
<span class="bold"><b>Semantics</b></span>: Returns a <a href="../../adapters/unfused.html" title="unfused"><tt class="computeroutput"><span class="identifier">unfused</span></tt></a> adapter for <tt class="computeroutput"><span class="identifier">f</span></tt>.
|
||
</p>
|
||
<a name="fusion.functional.generation.functions.mk_unfused.header"></a><h6>
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<a name="id631410"></a>
|
||
<a href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.header">Header</a>
|
||
=======
|
||
<a name="id881294"></a>
|
||
=======
|
||
<a name="id848211"></a>
|
||
=======
|
||
<a name="id840587"></a>
|
||
=======
|
||
<a name="id863405"></a>
|
||
=======
|
||
<a name="id851658"></a>
|
||
=======
|
||
<a name="id848381"></a>
|
||
>>>>>>> .merge-right.r58559
|
||
>>>>>>> .merge-right.r58549
|
||
>>>>>>> .merge-right.r58299
|
||
>>>>>>> .merge-right.r57337
|
||
>>>>>>> .merge-right.r57242
|
||
<a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.header">Header</a>
|
||
>>>>>>> .merge-right.r57125
|
||
</h6>
|
||
<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">generation</span><span class="special">/</span><span class="identifier">make_unfused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||
<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">include</span><span class="special">/</span><span class="identifier">make_unfused</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||
</pre>
|
||
<a name="fusion.functional.generation.functions.mk_unfused.example"></a><h6>
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<a name="id631577"></a>
|
||
<a href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.example">Example</a>
|
||
=======
|
||
<a name="id881414"></a>
|
||
=======
|
||
<a name="id848331"></a>
|
||
=======
|
||
<a name="id840707"></a>
|
||
=======
|
||
<a name="id863525"></a>
|
||
=======
|
||
<a name="id851778"></a>
|
||
=======
|
||
<a name="id848501"></a>
|
||
>>>>>>> .merge-right.r58559
|
||
>>>>>>> .merge-right.r58549
|
||
>>>>>>> .merge-right.r58299
|
||
>>>>>>> .merge-right.r57337
|
||
>>>>>>> .merge-right.r57242
|
||
<a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.example">Example</a>
|
||
>>>>>>> .merge-right.r57125
|
||
</h6>
|
||
<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="../../../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>
|
||
|
||
<span class="keyword">void</span> <span class="identifier">try_it</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="identifier">make_unfused</span><span class="special">(</span><span class="identifier">fused_incrementer</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.generation.functions.mk_unfused.see_also"></a><h6>
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<<<<<<< .working
|
||
<a name="id632050"></a>
|
||
<a href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.see_also">See
|
||
=======
|
||
<a name="id884501"></a>
|
||
=======
|
||
<a name="id848686"></a>
|
||
=======
|
||
<a name="id841062"></a>
|
||
=======
|
||
<a name="id863880"></a>
|
||
=======
|
||
<a name="id852133"></a>
|
||
=======
|
||
<a name="id848856"></a>
|
||
>>>>>>> .merge-right.r58559
|
||
>>>>>>> .merge-right.r58549
|
||
>>>>>>> .merge-right.r58299
|
||
>>>>>>> .merge-right.r57337
|
||
>>>>>>> .merge-right.r57242
|
||
<a class="link" href="mk_unfused.html#fusion.functional.generation.functions.mk_unfused.see_also">See
|
||
>>>>>>> .merge-right.r57125
|
||
also</a>
|
||
</h6>
|
||
<div class="itemizedlist"><ul type="disc">
|
||
<li><a href="../../adapters/unfused.html" title="unfused"><tt class="computeroutput"><span class="identifier">unfused</span></tt></a></li>
|
||
<li><a href="../../../support/deduce.html" title="deduce"><tt class="computeroutput"><span class="identifier">deduce</span></tt></a></li>
|
||
<li><a href="../metafunctions/mk_unfused.html" title="
|
||
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>
|
||
<td align="left"></td>
|
||
<td align="right"><div class="copyright-footer">Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias
|
||
Schwinger<p>
|
||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||
</p>
|
||
</div></td>
|
||
</tr></table>
|
||
<hr>
|
||
<div class="spirit-nav">
|
||
<a accesskey="p" href="mk_fused_fobj.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../functions.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="../metafunctions.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||
</div>
|
||
</body>
|
||
</html>
|