• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>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="../concepts.html" title="Concepts">
10<link rel="next" href="reg_callable.html" title="Regular 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="../concepts.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="reg_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.callable"></a><a class="link" href="callable.html" title="Callable Object">Callable Object</a>
28</h4></div></div></div>
29<h6>
30<a name="fusion.functional.concepts.callable.h0"></a>
31          <span class="phrase"><a name="fusion.functional.concepts.callable.description"></a></span><a class="link" href="callable.html#fusion.functional.concepts.callable.description">Description</a>
32        </h6>
33<p>
34          A pointer to a function, a pointer to member function, a pointer to member
35          data, or a class type whose objects can appear immediately to the left
36          of a function call operator.
37        </p>
38<h6>
39<a name="fusion.functional.concepts.callable.h1"></a>
40          <span class="phrase"><a name="fusion.functional.concepts.callable.models"></a></span><a class="link" href="callable.html#fusion.functional.concepts.callable.models">Models</a>
41        </h6>
42<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
43<li class="listitem">
44              function pointer types
45            </li>
46<li class="listitem">
47              member (function or data) pointer types
48            </li>
49<li class="listitem">
50              all kinds of function objects
51            </li>
52</ul></div>
53<h6>
54<a name="fusion.functional.concepts.callable.h2"></a>
55          <span class="phrase"><a name="fusion.functional.concepts.callable.examples"></a></span><a class="link" href="callable.html#fusion.functional.concepts.callable.examples">Examples</a>
56        </h6>
57<pre class="programlisting"><span class="special">&amp;</span> <span class="identifier">a_free_function</span>
58<span class="special">&amp;</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_static_member_function</span>
59<span class="special">&amp;</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_nonstatic_data_member</span>
60<span class="special">&amp;</span> <span class="identifier">a_class</span><span class="special">::</span><span class="identifier">a_nonstatic_member_function</span>
61<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>
62<span class="comment">// using namespace boost;</span>
63<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>
64<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>
65<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>
66</pre>
67</div>
68<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
69<td align="left"></td>
70<td align="right"><div class="copyright-footer">Copyright © 2001-2006, 2011, 2012 Joel de Guzman,
71      Dan Marsden, Tobias Schwinger<p>
72        Distributed under the Boost Software License, Version 1.0. (See accompanying
73        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>)
74      </p>
75</div></td>
76</tr></table>
77<hr>
78<div class="spirit-nav">
79<a accesskey="p" href="../concepts.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="reg_callable.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
80</div>
81</body>
82</html>
83