src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp in passenger-6.0.20 vs src/cxx_supportlib/vendor-modified/boost/asio/defer.hpp in passenger-6.0.23
- old
+ new
@@ -1,10 +1,10 @@
//
// defer.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2024 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)
//
@@ -78,15 +78,14 @@
*
* @par Completion Signature
* @code void() @endcode
*/
template <BOOST_ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken>
-BOOST_ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(NullaryToken, void()) defer(
- BOOST_ASIO_MOVE_ARG(NullaryToken) token)
- BOOST_ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX((
+auto defer(NullaryToken&& token)
+ -> decltype(
async_initiate<NullaryToken, void()>(
- declval<detail::initiate_defer>(), token)))
+ declval<detail::initiate_defer>(), token))
{
return async_initiate<NullaryToken, void()>(
detail::initiate_defer(), token);
}
@@ -161,23 +160,22 @@
* @par Completion Signature
* @code void() @endcode
*/
template <typename Executor,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
- BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
-BOOST_ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(NullaryToken, void()) defer(
- const Executor& ex,
- BOOST_ASIO_MOVE_ARG(NullaryToken) token
- BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
- typename constraint<
+ = default_completion_token_t<Executor>>
+auto defer(const Executor& ex,
+ NullaryToken&& token
+ = default_completion_token_t<Executor>(),
+ constraint_t<
(execution::is_executor<Executor>::value
&& can_require<Executor, execution::blocking_t::never_t>::value)
|| is_executor<Executor>::value
- >::type = 0)
- BOOST_ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX((
+ > = 0)
+ -> decltype(
async_initiate<NullaryToken, void()>(
- declval<detail::initiate_defer_with_executor<Executor> >(), token)))
+ declval<detail::initiate_defer_with_executor<Executor>>(), token))
{
return async_initiate<NullaryToken, void()>(
detail::initiate_defer_with_executor<Executor>(ex), token);
}
@@ -194,22 +192,20 @@
* @par Completion Signature
* @code void() @endcode
*/
template <typename ExecutionContext,
BOOST_ASIO_COMPLETION_TOKEN_FOR(void()) NullaryToken
- BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
- typename ExecutionContext::executor_type)>
-BOOST_ASIO_INITFN_AUTO_RESULT_TYPE_PREFIX(NullaryToken, void()) defer(
- ExecutionContext& ctx,
- BOOST_ASIO_MOVE_ARG(NullaryToken) token
- BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(
- typename ExecutionContext::executor_type),
- typename constraint<is_convertible<
- ExecutionContext&, execution_context&>::value>::type = 0)
- BOOST_ASIO_INITFN_AUTO_RESULT_TYPE_SUFFIX((
+ = default_completion_token_t<typename ExecutionContext::executor_type>>
+auto defer(ExecutionContext& ctx,
+ NullaryToken&& token
+ = default_completion_token_t<typename ExecutionContext::executor_type>(),
+ constraint_t<
+ is_convertible<ExecutionContext&, execution_context&>::value
+ > = 0)
+ -> decltype(
async_initiate<NullaryToken, void()>(
- declval<detail::initiate_defer_with_executor<
- typename ExecutionContext::executor_type> >(), token)))
+ declval<detail::initiate_defer_with_executor<
+ typename ExecutionContext::executor_type>>(), token))
{
return async_initiate<NullaryToken, void()>(
detail::initiate_defer_with_executor<
typename ExecutionContext::executor_type>(
ctx.get_executor()), token);