summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/asio/impl/io_service.hpp')
-rw-r--r--3rdParty/Boost/src/boost/asio/impl/io_service.hpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/3rdParty/Boost/src/boost/asio/impl/io_service.hpp b/3rdParty/Boost/src/boost/asio/impl/io_service.hpp
index 152f983..dbdd294 100644
--- a/3rdParty/Boost/src/boost/asio/impl/io_service.hpp
+++ b/3rdParty/Boost/src/boost/asio/impl/io_service.hpp
@@ -15,6 +15,7 @@
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+#include <boost/asio/detail/handler_type_requirements.hpp>
#include <boost/asio/detail/service_registry.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -68,16 +69,25 @@ inline bool has_service(io_service& ios)
namespace boost {
namespace asio {
-template <typename Handler>
-inline void io_service::dispatch(Handler handler)
+template <typename CompletionHandler>
+inline void io_service::dispatch(
+ BOOST_ASIO_MOVE_ARG(CompletionHandler) handler)
{
- impl_.dispatch(handler);
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a CompletionHandler.
+ BOOST_ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check;
+
+ impl_.dispatch(BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler));
}
-template <typename Handler>
-inline void io_service::post(Handler handler)
+template <typename CompletionHandler>
+inline void io_service::post(BOOST_ASIO_MOVE_ARG(CompletionHandler) handler)
{
- impl_.post(handler);
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a CompletionHandler.
+ BOOST_ASIO_COMPLETION_HANDLER_CHECK(CompletionHandler, handler) type_check;
+
+ impl_.post(BOOST_ASIO_MOVE_CAST(CompletionHandler)(handler));
}
template <typename Handler>
@@ -108,21 +118,11 @@ inline io_service::work::~work()
io_service_.impl_.work_finished();
}
-inline boost::asio::io_service& io_service::work::io_service()
-{
- return io_service_;
-}
-
inline boost::asio::io_service& io_service::work::get_io_service()
{
return io_service_;
}
-inline boost::asio::io_service& io_service::service::io_service()
-{
- return owner_;
-}
-
inline boost::asio::io_service& io_service::service::get_io_service()
{
return owner_;