From f37c1af871b1b3e3e49c547c317babf02443f6ce Mon Sep 17 00:00:00 2001 From: chris_kohlhoff Date: Thu, 30 Aug 2007 12:16:24 +0000 Subject: [PATCH] Fix io_service::wrap(). --- asio/include/asio/detail/wrapped_handler.hpp | 8 +++++++- asio/include/asio/impl/io_service.ipp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/asio/include/asio/detail/wrapped_handler.hpp b/asio/include/asio/detail/wrapped_handler.hpp index 5d98ac26..3804d6bf 100644 --- a/asio/include/asio/detail/wrapped_handler.hpp +++ b/asio/include/asio/detail/wrapped_handler.hpp @@ -17,6 +17,10 @@ #include "asio/detail/push_options.hpp" +#include "asio/detail/push_options.hpp" +#include +#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::type dispatcher, + Handler handler) : dispatcher_(dispatcher), handler_(handler) { diff --git a/asio/include/asio/impl/io_service.ipp b/asio/include/asio/impl/io_service.ipp index 77b49c23..f51d3697 100644 --- a/asio/include/asio/impl/io_service.ipp +++ b/asio/include/asio/impl/io_service.ipp @@ -132,7 +132,7 @@ inline detail::wrapped_handler #endif io_service::wrap(Handler handler) { - return detail::wrapped_handler(*this, handler); + return detail::wrapped_handler(*this, handler); } inline io_service::work::work(asio::io_service& io_service)