Use separate SFINAE parameters to minimise template instantiations.
This commit is contained in:
parent
3189f29ad7
commit
13281c560b
@ -270,8 +270,12 @@ struct blocking_t
|
||||
static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, blocking_t>::is_valid
|
||||
&& !traits::query_member<T, blocking_t>::is_valid
|
||||
&& traits::static_query<T, possibly_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, blocking_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, possibly_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, possibly_t>::value();
|
||||
@ -283,9 +287,15 @@ struct blocking_t
|
||||
static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, blocking_t>::is_valid
|
||||
&& !traits::query_member<T, blocking_t>::is_valid
|
||||
&& !traits::static_query<T, possibly_t>::is_valid
|
||||
&& traits::static_query<T, always_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, blocking_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, possibly_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, always_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, always_t>::value();
|
||||
@ -297,10 +307,18 @@ struct blocking_t
|
||||
static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, blocking_t>::is_valid
|
||||
&& !traits::query_member<T, blocking_t>::is_valid
|
||||
&& !traits::static_query<T, possibly_t>::is_valid
|
||||
&& !traits::static_query<T, always_t>::is_valid
|
||||
&& traits::static_query<T, never_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, blocking_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, possibly_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, always_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, never_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, never_t>::value();
|
||||
@ -353,7 +371,9 @@ struct blocking_t
|
||||
const Executor& ex, convertible_from_blocking_t,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, possibly_t>::value
|
||||
&& can_query<const Executor&, always_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_query<const Executor&, always_t>::value
|
||||
>::type* = 0)
|
||||
#if !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
|
||||
@ -373,8 +393,12 @@ struct blocking_t
|
||||
const Executor& ex, convertible_from_blocking_t,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, possibly_t>::value
|
||||
&& !can_query<const Executor&, always_t>::value
|
||||
&& can_query<const Executor&, never_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, always_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_query<const Executor&, never_t>::value
|
||||
>::type* = 0)
|
||||
#if !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
|
||||
@ -468,10 +492,18 @@ struct possibly_t
|
||||
static ASIO_CONSTEXPR possibly_t static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, possibly_t>::is_valid
|
||||
&& !traits::query_member<T, possibly_t>::is_valid
|
||||
&& !traits::query_free<T, possibly_t>::is_valid
|
||||
&& !can_query<T, always_t<I> >::value
|
||||
&& !can_query<T, never_t<I> >::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, possibly_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_free<T, possibly_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<T, always_t<I> >::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<T, never_t<I> >::value
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return possibly_t();
|
||||
@ -755,7 +787,9 @@ struct always_t
|
||||
const Executor& e, const always_t&,
|
||||
typename enable_if<
|
||||
is_executor<Executor>::value
|
||||
&& traits::static_require<
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_require<
|
||||
const Executor&,
|
||||
blocking_adaptation::allowed_t<0>
|
||||
>::is_valid
|
||||
|
@ -225,8 +225,12 @@ struct blocking_adaptation_t
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<
|
||||
T, blocking_adaptation_t>::is_valid
|
||||
&& !traits::query_member<T, blocking_adaptation_t>::is_valid
|
||||
&& traits::static_query<T, disallowed_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, blocking_adaptation_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, disallowed_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, disallowed_t>::value();
|
||||
@ -239,9 +243,15 @@ struct blocking_adaptation_t
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<
|
||||
T, blocking_adaptation_t>::is_valid
|
||||
&& !traits::query_member<T, blocking_adaptation_t>::is_valid
|
||||
&& !traits::static_query<T, disallowed_t>::is_valid
|
||||
&& traits::static_query<T, allowed_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, blocking_adaptation_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, disallowed_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, allowed_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, allowed_t>::value();
|
||||
@ -299,7 +309,9 @@ struct blocking_adaptation_t
|
||||
const Executor& ex, convertible_from_blocking_adaptation_t,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, disallowed_t>::value
|
||||
&& can_query<const Executor&, allowed_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_query<const Executor&, allowed_t>::value
|
||||
>::type* = 0)
|
||||
#if !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
|
||||
@ -392,9 +404,15 @@ struct disallowed_t
|
||||
static ASIO_CONSTEXPR disallowed_t static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, disallowed_t>::is_valid
|
||||
&& !traits::query_member<T, disallowed_t>::is_valid
|
||||
&& !traits::query_free<T, disallowed_t>::is_valid
|
||||
&& !can_query<T, allowed_t<I> >::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, disallowed_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_free<T, disallowed_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<T, allowed_t<I> >::value
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return disallowed_t();
|
||||
|
@ -124,7 +124,8 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename S, typename Args, typename = void>
|
||||
template <typename S, typename Args, typename = void, typename = void,
|
||||
typename = void, typename = void, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -135,15 +136,15 @@ struct call_traits
|
||||
template <typename S, typename F, typename N>
|
||||
struct call_traits<S, void(F, N),
|
||||
typename enable_if<
|
||||
(
|
||||
is_convertible<N, std::size_t>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
bulk_execute_member<S, F, N>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_sender<
|
||||
typename bulk_execute_member<S, F, N>::result_type
|
||||
>::value
|
||||
)
|
||||
>::type> :
|
||||
bulk_execute_member<S, F, N>
|
||||
{
|
||||
@ -153,17 +154,18 @@ struct call_traits<S, void(F, N),
|
||||
template <typename S, typename F, typename N>
|
||||
struct call_traits<S, void(F, N),
|
||||
typename enable_if<
|
||||
(
|
||||
is_convertible<N, std::size_t>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!bulk_execute_member<S, F, N>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
bulk_execute_free<S, F, N>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_sender<
|
||||
typename bulk_execute_free<S, F, N>::result_type
|
||||
>::value
|
||||
)
|
||||
>::type> :
|
||||
bulk_execute_free<S, F, N>
|
||||
{
|
||||
@ -173,15 +175,18 @@ struct call_traits<S, void(F, N),
|
||||
template <typename S, typename F, typename N>
|
||||
struct call_traits<S, void(F, N),
|
||||
typename enable_if<
|
||||
(
|
||||
is_convertible<N, std::size_t>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!bulk_execute_member<S, F, N>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!bulk_execute_free<S, F, N>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_sender<S>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_same<
|
||||
typename result_of<
|
||||
F(typename executor_index<typename remove_cvref<S>::type>::type)
|
||||
@ -190,9 +195,9 @@ struct call_traits<S, void(F, N),
|
||||
F(typename executor_index<typename remove_cvref<S>::type>::type)
|
||||
>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
static_require<S, bulk_guarantee_t::unsequenced_t>::is_valid
|
||||
)
|
||||
>::type>
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter);
|
||||
|
@ -259,8 +259,12 @@ struct bulk_guarantee_t
|
||||
static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, bulk_guarantee_t>::is_valid
|
||||
&& !traits::query_member<T, bulk_guarantee_t>::is_valid
|
||||
&& traits::static_query<T, unsequenced_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, bulk_guarantee_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, unsequenced_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, unsequenced_t>::value();
|
||||
@ -272,9 +276,15 @@ struct bulk_guarantee_t
|
||||
static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, bulk_guarantee_t>::is_valid
|
||||
&& !traits::query_member<T, bulk_guarantee_t>::is_valid
|
||||
&& !traits::static_query<T, unsequenced_t>::is_valid
|
||||
&& traits::static_query<T, sequenced_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, bulk_guarantee_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, unsequenced_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, sequenced_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, sequenced_t>::value();
|
||||
@ -286,10 +296,18 @@ struct bulk_guarantee_t
|
||||
static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, bulk_guarantee_t>::is_valid
|
||||
&& !traits::query_member<T, bulk_guarantee_t>::is_valid
|
||||
&& !traits::static_query<T, unsequenced_t>::is_valid
|
||||
&& !traits::static_query<T, sequenced_t>::is_valid
|
||||
&& traits::static_query<T, parallel_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, bulk_guarantee_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, unsequenced_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, sequenced_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, parallel_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, parallel_t>::value();
|
||||
@ -344,7 +362,9 @@ struct bulk_guarantee_t
|
||||
const Executor& ex, convertible_from_bulk_guarantee_t,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, unsequenced_t>::value
|
||||
&& can_query<const Executor&, sequenced_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_query<const Executor&, sequenced_t>::value
|
||||
>::type* = 0)
|
||||
#if !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
|
||||
@ -365,8 +385,12 @@ struct bulk_guarantee_t
|
||||
const Executor& ex, convertible_from_bulk_guarantee_t,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, unsequenced_t>::value
|
||||
&& !can_query<const Executor&, sequenced_t>::value
|
||||
&& can_query<const Executor&, parallel_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, sequenced_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_query<const Executor&, parallel_t>::value
|
||||
>::type* = 0)
|
||||
#if !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
|
||||
@ -463,10 +487,18 @@ struct unsequenced_t
|
||||
static ASIO_CONSTEXPR unsequenced_t static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, unsequenced_t>::is_valid
|
||||
&& !traits::query_member<T, unsequenced_t>::is_valid
|
||||
&& !traits::query_free<T, unsequenced_t>::is_valid
|
||||
&& !can_query<T, sequenced_t<I> >::value
|
||||
&& !can_query<T, parallel_t<I> >::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, unsequenced_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_free<T, unsequenced_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<T, sequenced_t<I> >::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<T, parallel_t<I> >::value
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return unsequenced_t();
|
||||
|
@ -157,7 +157,8 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename S, typename R, typename = void>
|
||||
template <typename S, typename R, typename = void,
|
||||
typename = void, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -168,13 +169,13 @@ struct call_traits
|
||||
template <typename S, typename R>
|
||||
struct call_traits<S, void(R),
|
||||
typename enable_if<
|
||||
(
|
||||
connect_member<S, R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_operation_state<typename connect_member<S, R>::result_type>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_sender<typename remove_cvref<S>::type>::value
|
||||
)
|
||||
>::type> :
|
||||
connect_member<S, R>
|
||||
{
|
||||
@ -184,15 +185,16 @@ struct call_traits<S, void(R),
|
||||
template <typename S, typename R>
|
||||
struct call_traits<S, void(R),
|
||||
typename enable_if<
|
||||
(
|
||||
!connect_member<S, R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
connect_free<S, R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_operation_state<typename connect_free<S, R>::result_type>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_sender<typename remove_cvref<S>::type>::value
|
||||
)
|
||||
>::type> :
|
||||
connect_free<S, R>
|
||||
{
|
||||
@ -202,13 +204,15 @@ struct call_traits<S, void(R),
|
||||
template <typename S, typename R>
|
||||
struct call_traits<S, void(R),
|
||||
typename enable_if<
|
||||
(
|
||||
!connect_member<S, R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!connect_free<S, R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_receiver<R>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
conditional<
|
||||
!is_as_receiver<
|
||||
typename remove_cvref<R>::type
|
||||
@ -219,7 +223,6 @@ struct call_traits<S, void(R),
|
||||
>,
|
||||
false_type
|
||||
>::type::value
|
||||
)
|
||||
>::type>
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter);
|
||||
|
@ -120,7 +120,9 @@ struct context_as_t
|
||||
const Executor& ex, const context_as_t<U>&,
|
||||
typename enable_if<
|
||||
is_same<T, U>::value
|
||||
&& can_query<const Executor&, const context_t&>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_query<const Executor&, const context_t&>::value
|
||||
>::type* = 0)
|
||||
#if !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
|
||||
|
@ -86,7 +86,6 @@ void submit_helper(ASIO_MOVE_ARG(S) s, ASIO_MOVE_ARG(R) r);
|
||||
} // namespace asio
|
||||
namespace asio_execution_execute_fn {
|
||||
|
||||
using asio::conditional;
|
||||
using asio::decay;
|
||||
using asio::declval;
|
||||
using asio::enable_if;
|
||||
@ -98,6 +97,7 @@ using asio::result_of;
|
||||
using asio::traits::execute_free;
|
||||
using asio::traits::execute_member;
|
||||
using asio::true_type;
|
||||
using asio::void_type;
|
||||
|
||||
void execute();
|
||||
|
||||
@ -109,7 +109,8 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename T, typename F, typename = void>
|
||||
template <typename T, typename F, typename = void, typename = void,
|
||||
typename = void, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -118,9 +119,7 @@ struct call_traits
|
||||
template <typename T, typename F>
|
||||
struct call_traits<T, void(F),
|
||||
typename enable_if<
|
||||
(
|
||||
execute_member<T, F>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
execute_member<T, F>
|
||||
{
|
||||
@ -130,11 +129,10 @@ struct call_traits<T, void(F),
|
||||
template <typename T, typename F>
|
||||
struct call_traits<T, void(F),
|
||||
typename enable_if<
|
||||
(
|
||||
!execute_member<T, F>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
execute_free<T, F>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
execute_free<T, F>
|
||||
{
|
||||
@ -144,26 +142,19 @@ struct call_traits<T, void(F),
|
||||
template <typename T, typename F>
|
||||
struct call_traits<T, void(F),
|
||||
typename enable_if<
|
||||
(
|
||||
!execute_member<T, F>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!execute_free<T, F>::is_valid
|
||||
&&
|
||||
conditional<true, true_type,
|
||||
>::type,
|
||||
typename void_type<
|
||||
typename result_of<typename decay<F>::type&()>::type
|
||||
>::type::value
|
||||
&&
|
||||
conditional<
|
||||
!is_as_invocable<
|
||||
typename decay<F>::type
|
||||
>::value,
|
||||
is_sender_to<
|
||||
T,
|
||||
as_receiver<typename decay<F>::type, T>
|
||||
>,
|
||||
false_type
|
||||
>::type::value
|
||||
)
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!is_as_invocable<typename decay<F>::type>::value
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_sender_to<T, as_receiver<typename decay<F>::type, T> >::value
|
||||
>::type>
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter);
|
||||
|
@ -35,34 +35,48 @@ namespace asio {
|
||||
namespace execution {
|
||||
namespace detail {
|
||||
|
||||
template <typename T, typename F>
|
||||
struct is_executor_of_impl_base :
|
||||
integral_constant<bool,
|
||||
conditional<true, true_type,
|
||||
typename result_of<typename decay<F>::type&()>::type
|
||||
>::type::value
|
||||
&& is_constructible<typename decay<F>::type, F>::value
|
||||
&& is_move_constructible<typename decay<F>::type>::value
|
||||
#if defined(ASIO_HAS_NOEXCEPT)
|
||||
&& is_nothrow_copy_constructible<T>::value
|
||||
&& is_nothrow_destructible<T>::value
|
||||
#else // defined(ASIO_HAS_NOEXCEPT)
|
||||
&& is_copy_constructible<T>::value
|
||||
&& is_destructible<T>::value
|
||||
#endif // defined(ASIO_HAS_NOEXCEPT)
|
||||
&& traits::equality_comparable<T>::is_valid
|
||||
&& traits::equality_comparable<T>::is_noexcept
|
||||
>
|
||||
template <typename T, typename F,
|
||||
typename = void, typename = void, typename = void, typename = void,
|
||||
typename = void, typename = void, typename = void, typename = void>
|
||||
struct is_executor_of_impl : false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <typename T, typename F>
|
||||
struct is_executor_of_impl :
|
||||
conditional<
|
||||
can_execute<typename add_const<T>::type, F>::value,
|
||||
is_executor_of_impl_base<T, F>,
|
||||
false_type
|
||||
>::type
|
||||
struct is_executor_of_impl<T, F,
|
||||
typename enable_if<
|
||||
can_execute<typename add_const<T>::type, F>::value
|
||||
>::type,
|
||||
typename void_type<
|
||||
typename result_of<typename decay<F>::type&()>::type
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_constructible<typename decay<F>::type, F>::value
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_move_constructible<typename decay<F>::type>::value
|
||||
>::type,
|
||||
#if defined(ASIO_HAS_NOEXCEPT)
|
||||
typename enable_if<
|
||||
is_nothrow_copy_constructible<T>::value
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_nothrow_destructible<T>::value
|
||||
>::type,
|
||||
#else // defined(ASIO_HAS_NOEXCEPT)
|
||||
typename enable_if<
|
||||
is_copy_constructible<T>::value
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_destructible<T>::value
|
||||
>::type,
|
||||
#endif // defined(ASIO_HAS_NOEXCEPT)
|
||||
typename enable_if<
|
||||
traits::equality_comparable<T>::is_valid
|
||||
>::type,
|
||||
typename enable_if<
|
||||
traits::equality_comparable<T>::is_noexcept
|
||||
>::type> : true_type
|
||||
{
|
||||
};
|
||||
|
||||
|
@ -254,8 +254,12 @@ struct mapping_t
|
||||
static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, mapping_t>::is_valid
|
||||
&& !traits::query_member<T, mapping_t>::is_valid
|
||||
&& traits::static_query<T, thread_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, mapping_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, thread_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, thread_t>::value();
|
||||
@ -267,9 +271,15 @@ struct mapping_t
|
||||
static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, mapping_t>::is_valid
|
||||
&& !traits::query_member<T, mapping_t>::is_valid
|
||||
&& !traits::static_query<T, thread_t>::is_valid
|
||||
&& traits::static_query<T, new_thread_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, mapping_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, thread_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, new_thread_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, new_thread_t>::value();
|
||||
@ -281,10 +291,18 @@ struct mapping_t
|
||||
static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, mapping_t>::is_valid
|
||||
&& !traits::query_member<T, mapping_t>::is_valid
|
||||
&& !traits::static_query<T, thread_t>::is_valid
|
||||
&& !traits::static_query<T, new_thread_t>::is_valid
|
||||
&& traits::static_query<T, other_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, mapping_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, thread_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, new_thread_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, other_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, other_t>::value();
|
||||
@ -337,7 +355,9 @@ struct mapping_t
|
||||
const Executor& ex, convertible_from_mapping_t,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, thread_t>::value
|
||||
&& can_query<const Executor&, new_thread_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_query<const Executor&, new_thread_t>::value
|
||||
>::type* = 0)
|
||||
#if !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
|
||||
@ -357,8 +377,12 @@ struct mapping_t
|
||||
const Executor& ex, convertible_from_mapping_t,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, thread_t>::value
|
||||
&& !can_query<const Executor&, new_thread_t>::value
|
||||
&& can_query<const Executor&, other_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, new_thread_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_query<const Executor&, other_t>::value
|
||||
>::type* = 0)
|
||||
#if !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
|
||||
@ -452,10 +476,18 @@ struct thread_t
|
||||
static ASIO_CONSTEXPR thread_t static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, thread_t>::is_valid
|
||||
&& !traits::query_member<T, thread_t>::is_valid
|
||||
&& !traits::query_free<T, thread_t>::is_valid
|
||||
&& !can_query<T, new_thread_t<I> >::value
|
||||
&& !can_query<T, other_t<I> >::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, thread_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_free<T, thread_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<T, new_thread_t<I> >::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<T, other_t<I> >::value
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return thread_t();
|
||||
|
@ -219,8 +219,12 @@ struct outstanding_work_t
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<
|
||||
T, outstanding_work_t>::is_valid
|
||||
&& !traits::query_member<T, outstanding_work_t>::is_valid
|
||||
&& traits::static_query<T, untracked_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, outstanding_work_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, untracked_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, untracked_t>::value();
|
||||
@ -233,9 +237,15 @@ struct outstanding_work_t
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<
|
||||
T, outstanding_work_t>::is_valid
|
||||
&& !traits::query_member<T, outstanding_work_t>::is_valid
|
||||
&& !traits::static_query<T, untracked_t>::is_valid
|
||||
&& traits::static_query<T, tracked_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, outstanding_work_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, untracked_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, tracked_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, tracked_t>::value();
|
||||
@ -292,7 +302,9 @@ struct outstanding_work_t
|
||||
const Executor& ex, convertible_from_outstanding_work_t,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, untracked_t>::value
|
||||
&& can_query<const Executor&, tracked_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_query<const Executor&, tracked_t>::value
|
||||
>::type* = 0)
|
||||
#if !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
|
||||
@ -385,9 +397,15 @@ struct untracked_t
|
||||
static ASIO_CONSTEXPR untracked_t static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, untracked_t>::is_valid
|
||||
&& !traits::query_member<T, untracked_t>::is_valid
|
||||
&& !traits::query_free<T, untracked_t>::is_valid
|
||||
&& !can_query<T, tracked_t<I> >::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, untracked_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_free<T, untracked_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<T, tracked_t<I> >::value
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return untracked_t();
|
||||
|
@ -220,7 +220,9 @@ struct prefer_only :
|
||||
prefer(const Executor& ex, const prefer_only<Property>& p,
|
||||
typename enable_if<
|
||||
is_same<Property, InnerProperty>::value
|
||||
&& can_prefer<const Executor&, const InnerProperty&>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_prefer<const Executor&, const InnerProperty&>::value
|
||||
>::type* = 0)
|
||||
#if !defined(ASIO_MSVC) \
|
||||
&& !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
@ -238,7 +240,9 @@ struct prefer_only :
|
||||
query(const Executor& ex, const prefer_only<Property>& p,
|
||||
typename enable_if<
|
||||
is_same<Property, InnerProperty>::value
|
||||
&& can_query<const Executor&, const InnerProperty&>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_query<const Executor&, const InnerProperty&>::value
|
||||
>::type* = 0)
|
||||
#if !defined(ASIO_MSVC) \
|
||||
&& !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
|
@ -218,8 +218,12 @@ struct relationship_t
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<
|
||||
T, relationship_t>::is_valid
|
||||
&& !traits::query_member<T, relationship_t>::is_valid
|
||||
&& traits::static_query<T, fork_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, relationship_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, fork_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, fork_t>::value();
|
||||
@ -232,9 +236,15 @@ struct relationship_t
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<
|
||||
T, relationship_t>::is_valid
|
||||
&& !traits::query_member<T, relationship_t>::is_valid
|
||||
&& !traits::static_query<T, fork_t>::is_valid
|
||||
&& traits::static_query<T, continuation_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, relationship_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::static_query<T, fork_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
traits::static_query<T, continuation_t>::is_valid
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return traits::static_query<T, continuation_t>::value();
|
||||
@ -290,7 +300,9 @@ struct relationship_t
|
||||
const Executor& ex, convertible_from_relationship_t,
|
||||
typename enable_if<
|
||||
!can_query<const Executor&, fork_t>::value
|
||||
&& can_query<const Executor&, continuation_t>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
can_query<const Executor&, continuation_t>::value
|
||||
>::type* = 0)
|
||||
#if !defined(__clang__) // Clang crashes if noexcept is used here.
|
||||
#if defined(ASIO_MSVC) // Visual C++ wants the type to be qualified.
|
||||
@ -383,9 +395,15 @@ struct fork_t
|
||||
static ASIO_CONSTEXPR fork_t static_query(
|
||||
typename enable_if<
|
||||
!traits::query_static_constexpr_member<T, fork_t>::is_valid
|
||||
&& !traits::query_member<T, fork_t>::is_valid
|
||||
&& !traits::query_free<T, fork_t>::is_valid
|
||||
&& !can_query<T, continuation_t<I> >::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_member<T, fork_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!traits::query_free<T, fork_t>::is_valid
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!can_query<T, continuation_t<I> >::value
|
||||
>::type* = 0) ASIO_NOEXCEPT
|
||||
{
|
||||
return fork_t();
|
||||
|
@ -86,7 +86,7 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename S, typename = void>
|
||||
template <typename S, typename = void, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -97,9 +97,7 @@ struct call_traits
|
||||
template <typename S>
|
||||
struct call_traits<S,
|
||||
typename enable_if<
|
||||
(
|
||||
schedule_member<S>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
schedule_member<S>
|
||||
{
|
||||
@ -109,11 +107,10 @@ struct call_traits<S,
|
||||
template <typename S>
|
||||
struct call_traits<S,
|
||||
typename enable_if<
|
||||
(
|
||||
!schedule_member<S>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
schedule_free<S>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
schedule_free<S>
|
||||
{
|
||||
@ -123,13 +120,13 @@ struct call_traits<S,
|
||||
template <typename S>
|
||||
struct call_traits<S,
|
||||
typename enable_if<
|
||||
(
|
||||
!schedule_member<S>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!schedule_free<S>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_executor<typename decay<S>::type>::value
|
||||
)
|
||||
>::type>
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = identity);
|
||||
|
@ -83,7 +83,7 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename R, typename = void>
|
||||
template <typename R, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -94,9 +94,7 @@ struct call_traits
|
||||
template <typename R>
|
||||
struct call_traits<R,
|
||||
typename enable_if<
|
||||
(
|
||||
set_done_member<R>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
set_done_member<R>
|
||||
{
|
||||
@ -106,11 +104,10 @@ struct call_traits<R,
|
||||
template <typename R>
|
||||
struct call_traits<R,
|
||||
typename enable_if<
|
||||
(
|
||||
!set_done_member<R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
set_done_free<R>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
set_done_free<R>
|
||||
{
|
||||
|
@ -83,7 +83,7 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename R, typename E, typename = void>
|
||||
template <typename R, typename E, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -94,9 +94,7 @@ struct call_traits
|
||||
template <typename R, typename E>
|
||||
struct call_traits<R, void(E),
|
||||
typename enable_if<
|
||||
(
|
||||
set_error_member<R, E>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
set_error_member<R, E>
|
||||
{
|
||||
@ -106,11 +104,10 @@ struct call_traits<R, void(E),
|
||||
template <typename R, typename E>
|
||||
struct call_traits<R, void(E),
|
||||
typename enable_if<
|
||||
(
|
||||
!set_error_member<R, E>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
set_error_free<R, E>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
set_error_free<R, E>
|
||||
{
|
||||
|
@ -86,7 +86,7 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename R, typename Vs, typename = void>
|
||||
template <typename R, typename Vs, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -97,9 +97,7 @@ struct call_traits
|
||||
template <typename R, typename Vs>
|
||||
struct call_traits<R, Vs,
|
||||
typename enable_if<
|
||||
(
|
||||
set_value_member<R, Vs>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
set_value_member<R, Vs>
|
||||
{
|
||||
@ -109,11 +107,10 @@ struct call_traits<R, Vs,
|
||||
template <typename R, typename Vs>
|
||||
struct call_traits<R, Vs,
|
||||
typename enable_if<
|
||||
(
|
||||
!set_value_member<R, Vs>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
set_value_free<R, Vs>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
set_value_free<R, Vs>
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename R, typename = void>
|
||||
template <typename R, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -91,9 +91,7 @@ struct call_traits
|
||||
template <typename R>
|
||||
struct call_traits<R,
|
||||
typename enable_if<
|
||||
(
|
||||
start_member<R>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
start_member<R>
|
||||
{
|
||||
@ -103,11 +101,10 @@ struct call_traits<R,
|
||||
template <typename R>
|
||||
struct call_traits<R,
|
||||
typename enable_if<
|
||||
(
|
||||
!start_member<R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
start_free<R>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
start_free<R>
|
||||
{
|
||||
|
@ -125,7 +125,8 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename S, typename R, typename = void>
|
||||
template <typename S, typename R, typename = void,
|
||||
typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -136,11 +137,10 @@ struct call_traits
|
||||
template <typename S, typename R>
|
||||
struct call_traits<S, void(R),
|
||||
typename enable_if<
|
||||
(
|
||||
submit_member<S, R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_sender_to<S, R>::value
|
||||
)
|
||||
>::type> :
|
||||
submit_member<S, R>
|
||||
{
|
||||
@ -150,13 +150,13 @@ struct call_traits<S, void(R),
|
||||
template <typename S, typename R>
|
||||
struct call_traits<S, void(R),
|
||||
typename enable_if<
|
||||
(
|
||||
!submit_member<S, R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
submit_free<S, R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_sender_to<S, R>::value
|
||||
)
|
||||
>::type> :
|
||||
submit_free<S, R>
|
||||
{
|
||||
@ -166,13 +166,13 @@ struct call_traits<S, void(R),
|
||||
template <typename S, typename R>
|
||||
struct call_traits<S, void(R),
|
||||
typename enable_if<
|
||||
(
|
||||
!submit_member<S, R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!submit_free<S, R>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
is_sender_to<S, R>::value
|
||||
)
|
||||
>::type>
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter);
|
||||
|
@ -31,7 +31,7 @@ namespace asio {
|
||||
#if !defined(ASIO_EXECUTOR_WORK_GUARD_DECL)
|
||||
#define ASIO_EXECUTOR_WORK_GUARD_DECL
|
||||
|
||||
template <typename Executor, typename = void>
|
||||
template <typename Executor, typename = void, typename = void>
|
||||
class executor_work_guard;
|
||||
|
||||
#endif // !defined(ASIO_EXECUTOR_WORK_GUARD_DECL)
|
||||
@ -41,7 +41,7 @@ class executor_work_guard;
|
||||
#if defined(GENERATING_DOCUMENTATION)
|
||||
template <typename Executor>
|
||||
#else // defined(GENERATING_DOCUMENTATION)
|
||||
template <typename Executor, typename>
|
||||
template <typename Executor, typename, typename>
|
||||
#endif // defined(GENERATING_DOCUMENTATION)
|
||||
class executor_work_guard
|
||||
{
|
||||
@ -129,7 +129,10 @@ private:
|
||||
template <typename Executor>
|
||||
class executor_work_guard<Executor,
|
||||
typename enable_if<
|
||||
!is_executor<Executor>::value && execution::is_executor<Executor>::value
|
||||
!is_executor<Executor>::value
|
||||
>::type,
|
||||
typename enable_if<
|
||||
execution::is_executor<Executor>::value
|
||||
>::type>
|
||||
{
|
||||
public:
|
||||
@ -241,9 +244,14 @@ template <typename T>
|
||||
inline executor_work_guard<typename associated_executor<T>::type>
|
||||
make_work_guard(const T& t,
|
||||
typename enable_if<
|
||||
!is_executor<T>::value && !execution::is_executor<T>::value
|
||||
&& !is_convertible<T&, execution_context&
|
||||
>::value>::type* = 0)
|
||||
!is_executor<T>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!execution::is_executor<T>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!is_convertible<T&, execution_context&>::value
|
||||
>::type* = 0)
|
||||
{
|
||||
return executor_work_guard<typename associated_executor<T>::type>(
|
||||
associated_executor<T>::get(t));
|
||||
@ -267,9 +275,16 @@ inline executor_work_guard<typename associated_executor<T,
|
||||
typename ExecutionContext::executor_type>::type>
|
||||
make_work_guard(const T& t, ExecutionContext& ctx,
|
||||
typename enable_if<
|
||||
!is_executor<T>::value && !execution::is_executor<T>::value
|
||||
&& !is_convertible<T&, execution_context&>::value
|
||||
&& is_convertible<ExecutionContext&, execution_context&>::value
|
||||
!is_executor<T>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!execution::is_executor<T>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!is_convertible<T&, execution_context&>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
is_convertible<ExecutionContext&, execution_context&>::value
|
||||
>::type* = 0)
|
||||
{
|
||||
return executor_work_guard<typename associated_executor<T,
|
||||
|
@ -500,7 +500,9 @@ namespace detail
|
||||
get_composed_io_executor(IoObject& io_object,
|
||||
typename enable_if<
|
||||
!is_executor<IoObject>::value
|
||||
&& !execution::is_executor<IoObject>::value
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!execution::is_executor<IoObject>::value
|
||||
>::type* = 0)
|
||||
{
|
||||
return io_object.get_executor();
|
||||
|
@ -103,7 +103,8 @@ public:
|
||||
execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
@ -129,7 +130,8 @@ public:
|
||||
execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
@ -160,7 +162,8 @@ public:
|
||||
!execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
@ -181,7 +184,8 @@ public:
|
||||
!execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
|
@ -100,7 +100,8 @@ public:
|
||||
execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
@ -125,7 +126,8 @@ public:
|
||||
execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
@ -155,7 +157,8 @@ public:
|
||||
!execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
@ -176,7 +179,8 @@ public:
|
||||
!execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
|
@ -103,7 +103,8 @@ public:
|
||||
execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
@ -129,7 +130,8 @@ public:
|
||||
execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
@ -160,7 +162,8 @@ public:
|
||||
!execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
!detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
@ -181,7 +184,8 @@ public:
|
||||
!execution::is_executor<
|
||||
typename conditional<true, executor_type, CompletionHandler>::type
|
||||
>::value
|
||||
&&
|
||||
>::type* = 0,
|
||||
typename enable_if<
|
||||
detail::is_work_dispatcher_required<
|
||||
typename decay<CompletionHandler>::type,
|
||||
Executor
|
||||
|
@ -143,7 +143,9 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename T, typename Properties, typename = void>
|
||||
template <typename T, typename Properties, typename = void,
|
||||
typename = void, typename = void, typename = void,
|
||||
typename = void, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -154,16 +156,16 @@ struct call_traits
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_preferable
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
static_require<T, Property>::is_valid
|
||||
)
|
||||
>::type>
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = identity);
|
||||
@ -179,18 +181,19 @@ struct call_traits<T, void(Property),
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_preferable
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!static_require<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
require_member<T, Property>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
require_member<T, Property>
|
||||
{
|
||||
@ -200,20 +203,22 @@ struct call_traits<T, void(Property),
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_preferable
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!static_require<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!require_member<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
require_free<T, Property>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
require_free<T, Property>
|
||||
{
|
||||
@ -223,22 +228,25 @@ struct call_traits<T, void(Property),
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_preferable
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!static_require<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!require_member<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!require_free<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
prefer_member<T, Property>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
prefer_member<T, Property>
|
||||
{
|
||||
@ -248,24 +256,28 @@ struct call_traits<T, void(Property),
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_preferable
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!static_require<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!require_member<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!require_free<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!prefer_member<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
prefer_free<T, Property>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
prefer_free<T, Property>
|
||||
{
|
||||
@ -275,24 +287,28 @@ struct call_traits<T, void(Property),
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_preferable
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!static_require<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!require_member<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!require_free<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!prefer_member<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!prefer_free<T, Property>::is_valid
|
||||
)
|
||||
>::type>
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = identity);
|
||||
@ -309,7 +325,8 @@ template <typename T, typename P0, typename P1>
|
||||
struct call_traits<T, void(P0, P1),
|
||||
typename enable_if<
|
||||
call_traits<T, void(P0)>::overload != ill_formed
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
call_traits<
|
||||
typename call_traits<T, void(P0)>::result_type,
|
||||
void(P1)
|
||||
@ -340,7 +357,8 @@ template <typename T, typename P0, typename P1, typename ASIO_ELLIPSIS PN>
|
||||
struct call_traits<T, void(P0, P1, PN ASIO_ELLIPSIS),
|
||||
typename enable_if<
|
||||
call_traits<T, void(P0)>::overload != ill_formed
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
call_traits<
|
||||
typename call_traits<T, void(P0)>::result_type,
|
||||
void(P1, PN ASIO_ELLIPSIS)
|
||||
|
@ -118,7 +118,8 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename T, typename Properties, typename = void>
|
||||
template <typename T, typename Properties, typename = void,
|
||||
typename = void, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -129,14 +130,13 @@ struct call_traits
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
static_query<T, Property>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
static_query<T, Property>
|
||||
{
|
||||
@ -146,16 +146,16 @@ struct call_traits<T, void(Property),
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!static_query<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
query_member<T, Property>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
query_member<T, Property>
|
||||
{
|
||||
@ -165,18 +165,19 @@ struct call_traits<T, void(Property),
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!static_query<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!query_member<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
query_free<T, Property>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
query_free<T, Property>
|
||||
{
|
||||
|
@ -127,7 +127,8 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename T, typename Properties, typename = void>
|
||||
template <typename T, typename Properties, typename = void,
|
||||
typename = void, typename = void, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -138,16 +139,16 @@ struct call_traits
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_requirable
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
static_require<T, Property>::is_valid
|
||||
)
|
||||
>::type>
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = identity);
|
||||
@ -163,18 +164,19 @@ struct call_traits<T, void(Property),
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_requirable
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!static_require<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
require_member<T, Property>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
require_member<T, Property>
|
||||
{
|
||||
@ -184,20 +186,22 @@ struct call_traits<T, void(Property),
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_requirable
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!static_require<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!require_member<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
require_free<T, Property>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
require_free<T, Property>
|
||||
{
|
||||
@ -208,7 +212,8 @@ template <typename T, typename P0, typename P1>
|
||||
struct call_traits<T, void(P0, P1),
|
||||
typename enable_if<
|
||||
call_traits<T, void(P0)>::overload != ill_formed
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
call_traits<
|
||||
typename call_traits<T, void(P0)>::result_type,
|
||||
void(P1)
|
||||
@ -239,7 +244,8 @@ template <typename T, typename P0, typename P1, typename ASIO_ELLIPSIS PN>
|
||||
struct call_traits<T, void(P0, P1, PN ASIO_ELLIPSIS),
|
||||
typename enable_if<
|
||||
call_traits<T, void(P0)>::overload != ill_formed
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
call_traits<
|
||||
typename call_traits<T, void(P0)>::result_type,
|
||||
void(P1, PN ASIO_ELLIPSIS)
|
||||
|
@ -125,7 +125,8 @@ enum overload_type
|
||||
ill_formed
|
||||
};
|
||||
|
||||
template <typename T, typename Properties, typename = void>
|
||||
template <typename T, typename Properties, typename = void,
|
||||
typename = void, typename = void, typename = void, typename = void>
|
||||
struct call_traits
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
|
||||
@ -136,16 +137,16 @@ struct call_traits
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_requirable_concept
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
static_require_concept<T, Property>::is_valid
|
||||
)
|
||||
>::type>
|
||||
{
|
||||
ASIO_STATIC_CONSTEXPR(overload_type, overload = identity);
|
||||
@ -156,18 +157,19 @@ struct call_traits<T, void(Property),
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_requirable_concept
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!static_require_concept<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
require_concept_member<T, Property>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
require_concept_member<T, Property>
|
||||
{
|
||||
@ -177,20 +179,22 @@ struct call_traits<T, void(Property),
|
||||
template <typename T, typename Property>
|
||||
struct call_traits<T, void(Property),
|
||||
typename enable_if<
|
||||
(
|
||||
is_applicable_property<
|
||||
typename decay<T>::type,
|
||||
typename decay<Property>::type
|
||||
>::value
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
decay<Property>::type::is_requirable_concept
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!static_require_concept<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
!require_concept_member<T, Property>::is_valid
|
||||
&&
|
||||
>::type,
|
||||
typename enable_if<
|
||||
require_concept_free<T, Property>::is_valid
|
||||
)
|
||||
>::type> :
|
||||
require_concept_free<T, Property>
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ class executor_binder;
|
||||
#if !defined(ASIO_EXECUTOR_WORK_GUARD_DECL)
|
||||
#define ASIO_EXECUTOR_WORK_GUARD_DECL
|
||||
|
||||
template <typename Executor, typename = void>
|
||||
template <typename Executor, typename = void, typename = void>
|
||||
class executor_work_guard;
|
||||
|
||||
#endif // !defined(ASIO_EXECUTOR_WORK_GUARD_DECL)
|
||||
|
Loading…
Reference in New Issue
Block a user