2
// detail/handler_cont_helpers.hpp
3
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
// Copyright (c) 2003-2013 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 BOOST_ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP
12
#define BOOST_ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP
14
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
16
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18
#include <boost/asio/detail/config.hpp>
19
#include <boost/asio/detail/addressof.hpp>
20
#include <boost/asio/handler_continuation_hook.hpp>
22
#include <boost/asio/detail/push_options.hpp>
24
// Calls to asio_handler_is_continuation must be made from a namespace that
25
// does not contain overloads of this function. This namespace is defined here
27
namespace boost_asio_handler_cont_helpers {
29
template <typename Context>
30
inline bool is_continuation(Context& context)
32
#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
35
using boost::asio::asio_handler_is_continuation;
36
return asio_handler_is_continuation(
37
boost::asio::detail::addressof(context));
41
} // namespace boost_asio_handler_cont_helpers
43
#include <boost/asio/detail/pop_options.hpp>
45
#endif // BOOST_ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP