Fix io_service::wrap().

This commit is contained in:
chris_kohlhoff 2007-08-30 12:16:24 +00:00
parent 11971795d2
commit f37c1af871
2 changed files with 8 additions and 2 deletions

View File

@ -17,6 +17,10 @@
#include "asio/detail/push_options.hpp"
#include "asio/detail/push_options.hpp"
#include <boost/type_traits.hpp>
#include "asio/detail/pop_options.hpp"
#include "asio/detail/bind_handler.hpp"
#include "asio/detail/handler_alloc_helpers.hpp"
#include "asio/detail/handler_invoke_helpers.hpp"
@ -30,7 +34,9 @@ class wrapped_handler
public:
typedef void result_type;
wrapped_handler(Dispatcher& dispatcher, Handler handler)
wrapped_handler(
typename boost::add_reference<Dispatcher>::type dispatcher,
Handler handler)
: dispatcher_(dispatcher),
handler_(handler)
{

View File

@ -132,7 +132,7 @@ inline detail::wrapped_handler<io_service&, Handler>
#endif
io_service::wrap(Handler handler)
{
return detail::wrapped_handler<io_service, Handler>(*this, handler);
return detail::wrapped_handler<io_service&, Handler>(*this, handler);
}
inline io_service::work::work(asio::io_service& io_service)