summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/asio/detail/handler_invoke_helpers.hpp')
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/handler_invoke_helpers.hpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/3rdParty/Boost/src/boost/asio/detail/handler_invoke_helpers.hpp b/3rdParty/Boost/src/boost/asio/detail/handler_invoke_helpers.hpp
index 3b44997..f6172a0 100644
--- a/3rdParty/Boost/src/boost/asio/detail/handler_invoke_helpers.hpp
+++ b/3rdParty/Boost/src/boost/asio/detail/handler_invoke_helpers.hpp
@@ -2,7 +2,7 @@
// detail/handler_invoke_helpers.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2012 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)
@@ -28,6 +28,19 @@
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)
+ Function tmp(function);
+ tmp();
+#else
+ using boost::asio::asio_handler_invoke;
+ asio_handler_invoke(function, boost::addressof(context));
+#endif
+}
+
+template <typename Function, typename Context>
inline void invoke(const Function& function, Context& context)
{
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \
@@ -35,7 +48,7 @@ inline void invoke(const Function& function, Context& context)
Function tmp(function);
tmp();
#else
- using namespace boost::asio;
+ using boost::asio::asio_handler_invoke;
asio_handler_invoke(function, boost::addressof(context));
#endif
}