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)