2
// handler_invoke_helpers.hpp
3
// ~~~~~~~~~~~~~~~~~~~~~~~~~~
5
// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
7
// Distributed under the Boost Software License, Version 1.0. (See accompanying
8
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11
#ifndef ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP
12
#define ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18
#include "asio/detail/push_options.hpp"
20
#include "asio/detail/push_options.hpp"
21
#include <boost/detail/workaround.hpp>
22
#include "asio/detail/pop_options.hpp"
24
#include "asio/handler_invoke_hook.hpp"
26
// Calls to asio_handler_invoke must be made from a namespace that does not
27
// contain overloads of this function. The asio_handler_invoke_helpers
28
// namespace is defined here for that purpose.
29
namespace asio_handler_invoke_helpers {
31
template <typename Function, typename Context>
32
inline void invoke(const Function& function, Context* context)
34
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
35
Function tmp(function);
39
asio_handler_invoke(function, context);
43
} // namespace asio_handler_invoke_helpers
45
#include "asio/detail/pop_options.hpp"
47
#endif // ASIO_DETAIL_HANDLER_INVOKE_HELPERS_HPP