mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 21:07:26 +02:00
Fix overloads that are ambiguous when using default completion tokens
This commit is contained in:
committed by
Mohammad Nejati
parent
ee9762eb38
commit
1a2b85b7a4
@ -1026,6 +1026,10 @@ public:
|
||||
,class = typename std::enable_if<
|
||||
net::is_endpoint_sequence<
|
||||
EndpointSequence>::value>::type
|
||||
,class = typename std::enable_if<
|
||||
!net::is_connect_condition<RangeConnectHandler,
|
||||
decltype(std::declval<const EndpointSequence&>().begin())>::value
|
||||
>::type
|
||||
#endif
|
||||
>
|
||||
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(
|
||||
@ -1132,6 +1136,10 @@ public:
|
||||
,class = typename std::enable_if<
|
||||
net::is_endpoint_sequence<
|
||||
EndpointSequence>::value>::type
|
||||
,class = typename std::enable_if<
|
||||
net::is_connect_condition<ConnectCondition,
|
||||
decltype(std::declval<const EndpointSequence&>().begin())>::value
|
||||
>::type
|
||||
#endif
|
||||
>
|
||||
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(
|
||||
@ -1204,7 +1212,13 @@ public:
|
||||
BOOST_ASIO_COMPLETION_TOKEN_FOR(
|
||||
void(error_code, Iterator))
|
||||
IteratorConnectHandler =
|
||||
net::default_completion_token_t<executor_type>>
|
||||
net::default_completion_token_t<executor_type>
|
||||
#if ! BOOST_BEAST_DOXYGEN
|
||||
,class = typename std::enable_if<
|
||||
!net::is_connect_condition<IteratorConnectHandler, Iterator>::value
|
||||
>::type
|
||||
#endif
|
||||
>
|
||||
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(
|
||||
IteratorConnectHandler,
|
||||
void(error_code, Iterator))
|
||||
@ -1278,7 +1292,13 @@ public:
|
||||
BOOST_ASIO_COMPLETION_TOKEN_FOR(
|
||||
void(error_code, Iterator))
|
||||
IteratorConnectHandler =
|
||||
net::default_completion_token_t<executor_type>>
|
||||
net::default_completion_token_t<executor_type>
|
||||
#if ! BOOST_BEAST_DOXYGEN
|
||||
,class = typename std::enable_if<
|
||||
net::is_connect_condition<ConnectCondition, Iterator>::value
|
||||
>::type
|
||||
#endif
|
||||
>
|
||||
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(
|
||||
IteratorConnectHandler,
|
||||
void(error_code, Iterator))
|
||||
|
@ -905,6 +905,7 @@ template<class Protocol, class Executor, class RatePolicy>
|
||||
template<
|
||||
class EndpointSequence,
|
||||
BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, typename Protocol::endpoint)) RangeConnectHandler,
|
||||
class,
|
||||
class>
|
||||
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(RangeConnectHandler,void(error_code, typename Protocol::endpoint))
|
||||
basic_stream<Protocol, Executor, RatePolicy>::
|
||||
@ -927,6 +928,7 @@ template<
|
||||
class EndpointSequence,
|
||||
class ConnectCondition,
|
||||
BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, typename Protocol::endpoint)) RangeConnectHandler,
|
||||
class,
|
||||
class>
|
||||
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(RangeConnectHandler,void (error_code, typename Protocol::endpoint))
|
||||
basic_stream<Protocol, Executor, RatePolicy>::
|
||||
@ -948,7 +950,8 @@ async_connect(
|
||||
template<class Protocol, class Executor, class RatePolicy>
|
||||
template<
|
||||
class Iterator,
|
||||
BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler>
|
||||
BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler,
|
||||
class>
|
||||
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler,void (error_code, Iterator))
|
||||
basic_stream<Protocol, Executor, RatePolicy>::
|
||||
async_connect(
|
||||
@ -969,7 +972,8 @@ template<class Protocol, class Executor, class RatePolicy>
|
||||
template<
|
||||
class Iterator,
|
||||
class ConnectCondition,
|
||||
BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler>
|
||||
BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler,
|
||||
class>
|
||||
BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler,void (error_code, Iterator))
|
||||
basic_stream<Protocol, Executor, RatePolicy>::
|
||||
async_connect(
|
||||
|
@ -603,7 +603,11 @@ template<
|
||||
BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
|
||||
stream<NextLayer, deflateSupported>::
|
||||
async_accept(
|
||||
AcceptHandler&& handler)
|
||||
AcceptHandler&& handler,
|
||||
typename std::enable_if<
|
||||
! net::is_const_buffer_sequence<
|
||||
AcceptHandler>::value>::type*
|
||||
)
|
||||
{
|
||||
static_assert(is_async_stream<next_layer_type>::value,
|
||||
"AsyncStream type requirements not met");
|
||||
@ -627,6 +631,9 @@ stream<NextLayer, deflateSupported>::
|
||||
async_accept(
|
||||
ConstBufferSequence const& buffers,
|
||||
AcceptHandler&& handler,
|
||||
typename std::enable_if<
|
||||
net::is_const_buffer_sequence<
|
||||
ConstBufferSequence>::value>::type*,
|
||||
typename std::enable_if<
|
||||
! http::detail::is_header<
|
||||
ConstBufferSequence>::value>::type*
|
||||
|
@ -1381,7 +1381,13 @@ public:
|
||||
async_accept(
|
||||
AcceptHandler&& handler =
|
||||
net::default_completion_token_t<
|
||||
executor_type>{});
|
||||
executor_type>{}
|
||||
#ifndef BOOST_BEAST_DOXYGEN
|
||||
, typename std::enable_if<
|
||||
! net::is_const_buffer_sequence<
|
||||
AcceptHandler>::value>::type* = nullptr
|
||||
#endif
|
||||
);
|
||||
|
||||
/** Perform the WebSocket handshake asynchronously in the server role.
|
||||
|
||||
@ -1454,6 +1460,9 @@ public:
|
||||
net::default_completion_token_t<
|
||||
executor_type>{}
|
||||
#ifndef BOOST_BEAST_DOXYGEN
|
||||
, typename std::enable_if<
|
||||
net::is_const_buffer_sequence<
|
||||
ConstBufferSequence>::value>::type* = 0
|
||||
, typename std::enable_if<
|
||||
! http::detail::is_header<
|
||||
ConstBufferSequence>::value>::type* = 0
|
||||
|
Reference in New Issue
Block a user