• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>Concept PolymorphicFunctionObject</title>
6<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
8<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
9<link rel="up" href="proto/reference.html" title="Reference">
10<link rel="prev" href="ObjectTransform.html" title="Concept ObjectTransform">
11<link rel="next" href="PrimitiveTransform.html" title="Concept PrimitiveTransform">
12</head>
13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14<table cellpadding="2" width="100%"><tr>
15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
16<td align="center"><a href="../../index.html">Home</a></td>
17<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
20<td align="center"><a href="../../more/index.htm">More</a></td>
21</tr></table>
22<hr>
23<div class="spirit-nav">
24<a accesskey="p" href="ObjectTransform.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="proto/reference.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="PrimitiveTransform.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
25</div>
26<div class="refentry">
27<a name="PolymorphicFunctionObject"></a><div class="titlepage"></div>
28<div class="refnamediv">
29<h2><span class="refentrytitle">Concept PolymorphicFunctionObject</span></h2>
30<p>PolymorphicFunctionObject</p>
31</div>
32<div class="refsect1">
33<a name="id-1.3.33.5.63.3"></a><h2>Description</h2>
34<p>
35      A type that can be called and that follows the TR1 ResultOf
36      protocol for return type calculation.
37    </p>
38</div>
39<div class="refsect1">
40<a name="id-1.3.33.5.63.4"></a><h2>Associated types</h2>
41<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
42<p><span class="bold"><strong>result_type</strong></span></p>
43<pre class="literallayout">result_of&lt;Fn(A0,...An)&gt;::type</pre>
44<p>
45      </p>
46<p>The result of calling the Polymorphic Function Object.</p>
47<p>
48    </p>
49</li></ul></div>
50</div>
51<div class="refsect1">
52<a name="id-1.3.33.5.63.5"></a><h2>Notation</h2>
53<div class="variablelist"><dl class="variablelist">
54<dt><span class="term">Fn</span></dt>
55<dd>A type playing the role of polymorphic-function-object-type in the <a class="link" href="PolymorphicFunctionObject.html" title="Concept PolymorphicFunctionObject">PolymorphicFunctionObject</a> concept.</dd>
56<dt><span class="term"><code class="varname">fn</code></span></dt>
57<dd>Object of type Fn</dd>
58<dt><span class="term"><code class="varname">a0,...an</code></span></dt>
59<dd>Object of type A0,...An</dd>
60</dl></div>
61</div>
62<div class="refsect1">
63<a name="id-1.3.33.5.63.6"></a><h2>Valid expressions</h2>
64<div class="informaltable"><table class="table">
65<colgroup>
66<col>
67<col>
68<col>
69<col>
70</colgroup>
71<thead><tr>
72<th>Name</th>
73<th>Expression</th>
74<th>Type</th>
75<th>Semantics</th>
76</tr></thead>
77<tbody><tr>
78<td><p>Function Call</p></td>
79<td><p>fn(a0,...an)</p></td>
80<td><p><span class="type">result_type</span></p></td>
81<td><p>Calls the function object.</p></td>
82</tr></tbody>
83</table></div>
84</div>
85<div class="refsect1">
86<a name="id-1.3.33.5.63.7"></a><h2>Models</h2>
87<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><span class="simplelist"><span class="type">std::plus&lt;int&gt;</span></span></li></ul></div>
88</div>
89</div>
90<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
91<td align="left"></td>
92<td align="right"><div class="copyright-footer">Copyright © 2008 Eric Niebler<p>
93        Distributed under the Boost Software License, Version 1.0. (See accompanying
94        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>)
95      </p>
96</div></td>
97</tr></table>
98<hr>
99<div class="spirit-nav">
100<a accesskey="p" href="ObjectTransform.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="proto/reference.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="PrimitiveTransform.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
101</div>
102</body>
103</html>
104