2006-08-22 15:57:13 +00:00
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
2007-01-01 02:23:51 +00:00
|
|
|
|
<title> Polymorphic Function
|
|
|
|
|
Object</title>
|
2006-08-22 15:57:13 +00:00
|
|
|
|
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
|
2007-02-07 22:59:25 +00:00
|
|
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
2006-08-22 15:57:13 +00:00
|
|
|
|
<link rel="start" href="../../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
|
|
|
|
<link rel="up" href="../concepts.html" title="Concepts">
|
|
|
|
|
<link rel="prev" href="../concepts.html" title="Concepts">
|
|
|
|
|
<link rel="next" href="../iteration.html" title="Iteration">
|
|
|
|
|
</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="../concepts.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="../iteration.html"><img src="../../../images/next.png" alt="Next"></a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" lang="en">
|
|
|
|
|
<div class="titlepage"><div><div><h4 class="title">
|
2007-01-01 02:23:51 +00:00
|
|
|
|
<a name="fusion.algorithms.concepts.poly"></a><a href="poly.html" title=" Polymorphic Function
|
|
|
|
|
Object"> Polymorphic Function
|
|
|
|
|
Object</a></h4></div></div></div>
|
|
|
|
|
<a name="fusion.algorithms.concepts.poly.description"></a><h5>
|
2007-02-07 22:59:25 +00:00
|
|
|
|
<a name="id553170"></a>
|
2007-01-01 02:23:51 +00:00
|
|
|
|
<a href="poly.html#fusion.algorithms.concepts.poly.description">Description</a>
|
2006-08-22 15:57:13 +00:00
|
|
|
|
</h5>
|
|
|
|
|
<p>
|
2007-02-07 22:59:25 +00:00
|
|
|
|
A type of function object with a nested metafunction <tt class="computeroutput"><span class="identifier">result</span></tt>.
|
|
|
|
|
<tt class="computeroutput"><span class="identifier">result</span></tt> returns the result
|
2006-08-22 15:57:13 +00:00
|
|
|
|
type of calling the function object, given the argument types.
|
|
|
|
|
</p>
|
|
|
|
|
<div class="variablelist">
|
|
|
|
|
<p class="title"><b>Notation</b></p>
|
|
|
|
|
<dl>
|
2007-02-07 22:59:25 +00:00
|
|
|
|
<dt><span class="term"><tt class="computeroutput"><span class="identifier">F</span></tt></span></dt>
|
2006-08-22 15:57:13 +00:00
|
|
|
|
<dd>
|
|
|
|
|
A Polymorphic Function Object type
|
|
|
|
|
</dd>
|
2007-02-07 22:59:25 +00:00
|
|
|
|
<dt><span class="term"><tt class="computeroutput"><span class="identifier">f</span></tt></span></dt>
|
2006-08-22 15:57:13 +00:00
|
|
|
|
<dd>
|
|
|
|
|
A Polymorphic Function Object
|
|
|
|
|
</dd>
|
2007-02-07 22:59:25 +00:00
|
|
|
|
<dt><span class="term"><tt class="computeroutput"><span class="identifier">T1</span>
|
|
|
|
|
<span class="special">...</span><span class="identifier">TN</span></tt></span></dt>
|
2006-08-22 15:57:13 +00:00
|
|
|
|
<dd>
|
|
|
|
|
Arbitrary types
|
|
|
|
|
</dd>
|
2007-02-07 22:59:25 +00:00
|
|
|
|
<dt><span class="term"><tt class="computeroutput"><span class="identifier">t1</span>
|
|
|
|
|
<span class="special">...</span><span class="identifier">tN</span></tt></span></dt>
|
2006-08-22 15:57:13 +00:00
|
|
|
|
<dd>
|
2007-02-07 22:59:25 +00:00
|
|
|
|
Objects with types <tt class="computeroutput"><span class="identifier">T1</span> <span class="special">...</span><span class="identifier">TN</span></tt>
|
2006-08-22 15:57:13 +00:00
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</div>
|
2007-01-01 02:23:51 +00:00
|
|
|
|
<a name="fusion.algorithms.concepts.poly.expression_requirements"></a><h5>
|
2007-02-07 22:59:25 +00:00
|
|
|
|
<a name="id553345"></a>
|
2007-01-01 02:23:51 +00:00
|
|
|
|
<a href="poly.html#fusion.algorithms.concepts.poly.expression_requirements">Expression
|
2006-08-22 15:57:13 +00:00
|
|
|
|
requirements</a>
|
|
|
|
|
</h5>
|
2006-10-30 01:20:23 +00:00
|
|
|
|
<div class="informaltable"><table class="table">
|
2006-08-22 15:57:13 +00:00
|
|
|
|
<colgroup>
|
|
|
|
|
<col>
|
|
|
|
|
<col>
|
|
|
|
|
<col>
|
|
|
|
|
</colgroup>
|
|
|
|
|
<thead><tr>
|
|
|
|
|
<th>Expression</th>
|
|
|
|
|
<th>Return Type</th>
|
|
|
|
|
<th>Runtime
|
|
|
|
|
Complexity</th>
|
|
|
|
|
</tr></thead>
|
|
|
|
|
<tbody><tr>
|
2007-02-07 22:59:25 +00:00
|
|
|
|
<td><tt class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">t1</span><span class="special">,</span> <span class="special">...</span><span class="identifier">tN</span><span class="special">)</span></tt></td>
|
|
|
|
|
<td><tt class="computeroutput"><span class="identifier">F</span><span class="special">::</span><span class="identifier">result</span><span class="special"><</span><span class="identifier">T1</span><span class="special">,</span> <span class="special">...</span><span class="identifier">TN</span><span class="special">>::</span><span class="identifier">type</span></tt></td>
|
2006-08-22 15:57:13 +00:00
|
|
|
|
<td>Unspecified</td>
|
|
|
|
|
</tr></tbody>
|
2006-10-30 01:20:23 +00:00
|
|
|
|
</table></div>
|
2006-08-22 15:57:13 +00:00
|
|
|
|
</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="../concepts.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="../iteration.html"><img src="../../../images/next.png" alt="Next"></a>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|