3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
5 <link rel=
"stylesheet" href=
"../../../../../../doc/src/boostbook.css" type=
"text/css">
6 <meta name=
"generator" content=
"DocBook XSL Stylesheets V1.75.2">
7 <link rel=
"home" href=
"../../index.html" title=
"Chapter 1. Phoenix 3.2.0">
8 <link rel=
"up" href=
"../modules.html" title=
"Modules">
9 <link rel=
"prev" href=
"scope/lambda.html" title=
"lambda">
10 <link rel=
"next" href=
"bind/binding_function_objects.html" title=
"Binding Function Objects">
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=
"scope/lambda.html"><img src=
"../../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../modules.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=
"bind/binding_function_objects.html"><img src=
"../../../../../../doc/src/images/next.png" alt=
"Next"></a>
26 <div class=
"titlepage"><div><div><h3 class=
"title">
27 <a name=
"phoenix.modules.bind"></a><a class=
"link" href=
"bind.html" title=
"Bind">Bind
</a>
28 </h3></div></div></div>
30 <dt><span class=
"section"><a href=
"bind/binding_function_objects.html">Binding
31 Function Objects
</a></span></dt>
32 <dt><span class=
"section"><a href=
"bind/binding_functions.html">Binding Functions
</a></span></dt>
33 <dt><span class=
"section"><a href=
"bind/binding_member_functions.html">Binding
34 Member Functions
</a></span></dt>
35 <dt><span class=
"section"><a href=
"bind/binding_member_variables.html">Binding
36 Member Variables
</a></span></dt>
37 <dt><span class=
"section"><a href=
"bind/compatibility_with_boost_bind.html">Compatibility
38 with Boost.Bind
</a></span></dt>
41 <span class=
"emphasis"><em>Binding
</em></span> is the act of tying together a function to some
42 arguments for deferred (lazy) evaluation. Named
<a class=
"link" href=
"function.html" title=
"Function">lazy
43 functions
</a> require a bit of typing. Unlike (unnamed) lambda expressions,
44 we need to write a functor somewhere offline, detached from the call site.
45 If you wish to transform a plain function, member function or member variable
46 to a lambda expression,
<code class=
"computeroutput"><span class=
"identifier">bind
</span></code>
49 <div class=
"note"><table border=
"0" summary=
"Note">
51 <td rowspan=
"2" align=
"center" valign=
"top" width=
"25"><img alt=
"[Note]" src=
"../../../../../../doc/src/images/note.png"></td>
52 <th align=
"left">Note
</th>
54 <tr><td align=
"left" valign=
"top"><p>
55 Take note that binding functions, member functions or member variables
56 is monomorphic. Rather than binding functions, the preferred way is to
57 write true generic and polymorphic
<a class=
"link" href=
"function.html" title=
"Function">lazy
62 There is a set of overloaded
<code class=
"computeroutput"><span class=
"identifier">bind
</span></code>
63 template functions. Each
<code class=
"computeroutput"><span class=
"identifier">bind
</span><span class=
"special">(
</span><span class=
"identifier">x
</span><span class=
"special">)
</span></code>
64 function generates a suitable binder object.
67 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
68 <td align=
"left"></td>
69 <td align=
"right"><div class=
"copyright-footer">Copyright
© 2002-
2005,
2010,
2014,
2015 Joel de Guzman, Dan Marsden, Thomas
70 Heller, John Fletcher
<p>
71 Distributed under the Boost Software License, Version
1.0. (See accompanying
72 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>)
77 <div class=
"spirit-nav">
78 <a accesskey=
"p" href=
"scope/lambda.html"><img src=
"../../../../../../doc/src/images/prev.png" alt=
"Prev"></a><a accesskey=
"u" href=
"../modules.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=
"bind/binding_function_objects.html"><img src=
"../../../../../../doc/src/images/next.png" alt=
"Next"></a>