forked from boostorg/bind
Added - an example of using boost::cref
[SVN r29376]
This commit is contained in:
@@ -152,6 +152,8 @@ bind(f, i, _1);
|
|||||||
<pre>int i = 5;
|
<pre>int i = 5;
|
||||||
|
|
||||||
bind(f, ref(i), _1);
|
bind(f, ref(i), _1);
|
||||||
|
|
||||||
|
bind(f, cref(42), _1);
|
||||||
</pre>
|
</pre>
|
||||||
<h3><a name="with_function_objects">Using bind with function objects</a></h3>
|
<h3><a name="with_function_objects">Using bind with function objects</a></h3>
|
||||||
<p><b>bind</b> is not limited to functions; it accepts arbitrary function objects.
|
<p><b>bind</b> is not limited to functions; it accepts arbitrary function objects.
|
||||||
|
Reference in New Issue
Block a user