Add links to the boost::bind page.
This commit is contained in:
parent
ed18eb27a3
commit
b9dbf779b0
@ -156,15 +156,14 @@ from the whole-second mark due to any delays in processing the handler.
|
||||
\until set
|
||||
|
||||
<b>Step 4.</b> Then we start a new asynchronous wait on the timer. As you can
|
||||
see, the <tt>boost::bind</tt> function is used to associate the extra
|
||||
parameters with your callback handler. The asio::timer::async_wait() function
|
||||
expects a handler function (or function object) with the signature
|
||||
<tt>void()</tt>. Binding the additional parameters converts your
|
||||
<tt>print</tt> function into a function object that matches the signature
|
||||
correctly.
|
||||
see, the \ref boost_bind function is used to associate the extra parameters
|
||||
with your callback handler. The asio::timer::async_wait() function expects a
|
||||
handler function (or function object) with the signature <tt>void()</tt>.
|
||||
Binding the additional parameters converts your <tt>print</tt> function into a
|
||||
function object that matches the signature correctly.
|
||||
|
||||
See the <a href="http://www.boost.org/libs/bind/bind.html">Boost: bind.hpp
|
||||
documentation</a> for more information on how to use <tt>boost::bind</tt>.
|
||||
documentation</a> for more information on how to use \ref boost_bind.
|
||||
|
||||
\until asio::demuxer
|
||||
|
||||
@ -221,10 +220,10 @@ counter used to shut down the program is now also a member of the class.
|
||||
|
||||
\until {
|
||||
|
||||
<b>Step 3.</b> The <tt>boost::bind</tt> function works just as well with class
|
||||
<b>Step 3.</b> The \ref boost_bind function works just as well with class
|
||||
member functions as with free functions. Since all non-static class member
|
||||
functions have an implicit <tt>this</tt> parameter, we need to bind
|
||||
<tt>this</tt> to the function. As in tutorial Timer.3, <tt>boost::bind</tt>
|
||||
<tt>this</tt> to the function. As in tutorial Timer.3, \ref boost_bind
|
||||
converts our callback handler (now a member function) into a function object
|
||||
that matches the signature <tt>void()</tt>.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user