• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Regular Callable Object</title>
5<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.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="callable.html" title="Callable Object">
10<link rel="next" href="def_callable.html" title="Deferred Callable Object">
11</head>
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>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="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="def_callable.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h4 class="title">
27<a name="fusion.functional.concepts.reg_callable"></a><a class="link" href="reg_callable.html" title="Regular Callable Object">Regular Callable
28        Object</a>
29</h4></div></div></div>
30<h6>
31<a name="fusion.functional.concepts.reg_callable.h0"></a>
32          <span class="phrase"><a name="fusion.functional.concepts.reg_callable.description"></a></span><a class="link" href="reg_callable.html#fusion.functional.concepts.reg_callable.description">Description</a>
33        </h6>
34<p>
35          A non-member-pointer <a class="link" href="callable.html" title="Callable Object">Callable
36          Object</a> type: A pointer to a function or a class type whose objects
37          can appear immediately to the left of a function call operator.
38        </p>
39<h6>
40<a name="fusion.functional.concepts.reg_callable.h1"></a>
41          <span class="phrase"><a name="fusion.functional.concepts.reg_callable.refinement_of"></a></span><a class="link" href="reg_callable.html#fusion.functional.concepts.reg_callable.refinement_of">Refinement
42          of</a>
43        </h6>
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>
46            </li></ul></div>
47<div class="variablelist">
48<p class="title"><b>Notation</b></p>
49<dl class="variablelist">
50<dt><span class="term"><code class="computeroutput"><span class="identifier">F</span></code></span></dt>
51<dd><p>
52                A possibly const qualified Deferred Callable Object type
53              </p></dd>
54<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></span></dt>
55<dd><p>
56                An object or reference to an object of type F
57              </p></dd>
58<dt><span class="term"><code class="computeroutput"><span class="identifier">A1</span> <span class="special">...</span><span class="identifier">AN</span></code></span></dt>
59<dd><p>
60                Argument types
61              </p></dd>
62<dt><span class="term"><code class="computeroutput"><span class="identifier">a1</span> <span class="special">...</span><span class="identifier">aN</span></code></span></dt>
63<dd><p>
64                Objects or references to objects with types <code class="computeroutput"><span class="identifier">A1</span>
65                <span class="special">...</span><span class="identifier">AN</span></code>
66              </p></dd>
67</dl>
68</div>
69<h6>
70<a name="fusion.functional.concepts.reg_callable.h2"></a>
71          <span class="phrase"><a name="fusion.functional.concepts.reg_callable.expression_requirements"></a></span><a class="link" href="reg_callable.html#fusion.functional.concepts.reg_callable.expression_requirements">Expression
72          requirements</a>
73        </h6>
74<div class="informaltable"><table class="table">
75<colgroup>
76<col>
77<col>
78<col>
79</colgroup>
80<thead><tr>
81<th>
82                  <p>
83                    Expression
84                  </p>
85                </th>
86<th>
87                  <p>
88                    Return Type
89                  </p>
90                </th>
91<th>
92                  <p>
93                    Runtime Complexity
94                  </p>
95                </th>
96</tr></thead>
97<tbody><tr>
98<td>
99                  <p>
100                    <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">a1</span><span class="special">,</span>
101                    <span class="special">...</span><span class="identifier">aN</span><span class="special">)</span></code>
102                  </p>
103                </td>
104<td>
105                  <p>
106                    Unspecified
107                  </p>
108                </td>
109<td>
110                  <p>
111                    Unspecified
112                  </p>
113                </td>
114</tr></tbody>
115</table></div>
116<h6>
117<a name="fusion.functional.concepts.reg_callable.h3"></a>
118          <span class="phrase"><a name="fusion.functional.concepts.reg_callable.models"></a></span><a class="link" href="reg_callable.html#fusion.functional.concepts.reg_callable.models">Models</a>
119        </h6>
120<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
121<li class="listitem">
122              function pointer types
123            </li>
124<li class="listitem">
125              all kinds of function objects
126            </li>
127</ul></div>
128<h6>
129<a name="fusion.functional.concepts.reg_callable.h4"></a>
130          <span class="phrase"><a name="fusion.functional.concepts.reg_callable.examples"></a></span><a class="link" href="reg_callable.html#fusion.functional.concepts.reg_callable.examples">Examples</a>
131        </h6>
132<pre class="programlisting"><span class="special">&amp;</span> <span class="identifier">a_free_function</span>
133<span class="special">&amp;</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_static_member_function</span>
134<span class="identifier">std</span><span class="special">::</span><span class="identifier">less</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;()</span>
135<span class="comment">// using namespace boost;</span>
136<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">&lt;</span><span class="keyword">int</span><span class="special">&gt;(),</span> <span class="identifier">_1</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span>
137<span class="identifier">lambda</span><span class="special">::</span><span class="identifier">_1</span> <span class="special">+=</span> <span class="identifier">lambda</span><span class="special">::</span><span class="identifier">_2</span><span class="special">;</span>
138<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">&lt;</span><span class="keyword">int</span><span class="special">&gt;())</span>
139</pre>
140</div>
141<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
142<td align="left"></td>
143<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman,
144      Dan Marsden, Tobias Schwinger<p>
145        Distributed under the Boost Software License, Version 1.0. (See accompanying
146        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>)
147      </p>
148</div></td>
149</tr></table>
150<hr>
151<div class="spirit-nav">
152<a accesskey="p" href="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="def_callable.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
153</div>
154</body>
155</html>
156