3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Deferred Callable Object</title>
5 <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="../../../index.html" title="Chapter 1. Fusion 2.2">
8 <link rel="up" href="../concepts.html" title="Concepts">
9 <link rel="prev" href="reg_callable.html" title="Regular Callable Object">
10 <link rel="next" href="poly.html" title="Polymorphic Function Object">
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
22 <div class="spirit-nav">
23 <a accesskey="p" href="reg_callable.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="poly.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="fusion.functional.concepts.def_callable"></a><a class="link" href="def_callable.html" title="Deferred Callable Object">Deferred Callable
29 </h4></div></div></div>
31 <a name="fusion.functional.concepts.def_callable.h0"></a>
32 <span class="phrase"><a name="fusion.functional.concepts.def_callable.description"></a></span><a class="link" href="def_callable.html#fusion.functional.concepts.def_callable.description">Description</a>
35 <a class="link" href="callable.html" title="Callable Object">Callable Object</a>
36 types that work with <a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top">Boost.ResultOf</a>
37 to determine the result of a call.
40 <a name="fusion.functional.concepts.def_callable.h1"></a>
41 <span class="phrase"><a name="fusion.functional.concepts.def_callable.refinement_of"></a></span><a class="link" href="def_callable.html#fusion.functional.concepts.def_callable.refinement_of">Refinement
44 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
45 <a class="link" href="callable.html" title="Callable Object">Callable Object</a>
48 <div class="titlepage"></div>
50 note Once C++ supports the <code class="literal">decltype</code> keyword, all models
51 of <a class="link" href="callable.html" title="Callable Object">Callable Object</a>
52 will also be models of <a class="link" href="def_callable.html" title="Deferred Callable Object">Deferred
53 Callable Object</a>, because function objects won't need client-side
54 support for <code class="computeroutput"><span class="identifier">result_of</span></code>.
57 <div class="variablelist">
58 <p class="title"><b>Notation</b></p>
59 <dl class="variablelist">
60 <dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt>
62 A possibly const qualified Deferred Callable Object type
64 <dt><span class="term"><code class="computeroutput"><span class="identifier">A1</span> <span class="special">...</span><span class="identifier">AN</span></code></span></dt>
68 <dt><span class="term"><code class="computeroutput"><span class="identifier">a1</span> <span class="special">...</span><span class="identifier">aN</span></code></span></dt>
70 Objects or references to objects with types <code class="computeroutput"><span class="identifier">A1</span>
71 <span class="special">...</span><span class="identifier">AN</span></code>
73 <dt><span class="term"><code class="computeroutput"><span class="identifier">T1</span> <span class="special">...</span><span class="identifier">TN</span></code></span></dt>
75 <code class="computeroutput"><span class="identifier">T</span></code>i is <code class="computeroutput"><span class="identifier">A</span></code>i <code class="computeroutput"><span class="special">&</span></code>
76 if <code class="computeroutput"><span class="identifier">a</span></code>i is an LValue,
77 same as <code class="computeroutput"><span class="identifier">A</span></code>i, otherwise
82 <a name="fusion.functional.concepts.def_callable.h2"></a>
83 <span class="phrase"><a name="fusion.functional.concepts.def_callable.expression_requirements"></a></span><a class="link" href="def_callable.html#fusion.functional.concepts.def_callable.expression_requirements">Expression
86 <div class="informaltable"><table class="table">
106 <a href="http://www.boost.org/libs/utility/utility.htm#result_of" target="_top"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span></code></a><code class="computeroutput"><span class="special"><</span> <span class="identifier">F</span><span class="special">(</span><span class="identifier">T1</span>
107 <span class="special">...</span><span class="identifier">TN</span><span class="special">)</span> <span class="special">>::</span><span class="identifier">type</span></code>
112 Result of a call with <code class="computeroutput"><span class="identifier">A1</span>
113 <span class="special">...</span><span class="identifier">AN</span></code>-typed
120 <a name="fusion.functional.concepts.def_callable.h3"></a>
121 <span class="phrase"><a name="fusion.functional.concepts.def_callable.models"></a></span><a class="link" href="def_callable.html#fusion.functional.concepts.def_callable.models">Models</a>
123 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
124 <li class="listitem">
125 <a class="link" href="poly.html" title="Polymorphic Function Object">Polymorphic Function
128 <li class="listitem">
129 member (function or data) pointer types
133 <a name="fusion.functional.concepts.def_callable.h4"></a>
134 <span class="phrase"><a name="fusion.functional.concepts.def_callable.examples"></a></span><a class="link" href="def_callable.html#fusion.functional.concepts.def_callable.examples">Examples</a>
136 <pre class="programlisting"><span class="special">&</span> <span class="identifier">a_free_function</span>
137 <span class="special">&</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_static_member_function</span>
138 <span class="special">&</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_nonstatic_data_member</span>
139 <span class="special">&</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_nonstatic_member_function</span>
140 <span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>()</span>
141 <span class="comment">// using namespace boost;</span>
142 <span class="identifier">bind</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>(),</span> <span class="identifier">_1</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span>
143 <span class="comment">// Note: Boost.Lambda expressions don't work with __boost_result_of__</span>
144 <span class="identifier">fusion</span><span class="special">::</span><a class="link" href="../generation/functions/mk_fused_fobj.html" title="make_fused_function_object"><code class="computeroutput"><span class="identifier">make_fused_function_object</span></code></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special"><</span><span class="keyword">int</span><span class="special">>())</span>
147 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
148 <td align="left"></td>
149 <td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman,
150 Dan Marsden, Tobias Schwinger<p>
151 Distributed under the Boost Software License, Version 1.0. (See accompanying
152 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>)
157 <div class="spirit-nav">
158 <a accesskey="p" href="reg_callable.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="poly.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>