summaryrefslogtreecommitdiff
path: root/boost/asio/detail/handler_invoke_helpers.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/asio/detail/handler_invoke_helpers.hpp')
-rw-r--r--boost/asio/detail/handler_invoke_helpers.hpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/boost/asio/detail/handler_invoke_helpers.hpp b/boost/asio/detail/handler_invoke_helpers.hpp
index f6172a070b..ed276e5248 100644
--- a/boost/asio/detail/handler_invoke_helpers.hpp
+++ b/boost/asio/detail/handler_invoke_helpers.hpp
@@ -2,7 +2,7 @@
// detail/handler_invoke_helpers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,8 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/utility/addressof.hpp>
+#include <boost/asio/detail/addressof.hpp>
#include <boost/asio/handler_invoke_hook.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -30,26 +29,24 @@ namespace boost_asio_handler_invoke_helpers {
template <typename Function, typename Context>
inline void invoke(Function& function, Context& context)
{
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \
- || BOOST_WORKAROUND(__GNUC__, < 3)
+#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
Function tmp(function);
tmp();
#else
using boost::asio::asio_handler_invoke;
- asio_handler_invoke(function, boost::addressof(context));
+ asio_handler_invoke(function, boost::asio::detail::addressof(context));
#endif
}
template <typename Function, typename Context>
inline void invoke(const Function& function, Context& context)
{
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \
- || BOOST_WORKAROUND(__GNUC__, < 3)
+#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
Function tmp(function);
tmp();
#else
using boost::asio::asio_handler_invoke;
- asio_handler_invoke(function, boost::addressof(context));
+ asio_handler_invoke(function, boost::asio::detail::addressof(context));
#endif
}