Skip to content

Commit

Permalink
Fix async_handshake compatibility with default completion tokens.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskohlhoff committed Dec 5, 2023
1 parent 23b6a4b commit 75aabc1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion asio/include/asio/ssl/stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "asio/detail/config.hpp"

#include "asio/async_result.hpp"
#include "asio/buffer.hpp"
#include "asio/detail/buffer_sequence_adapter.hpp"
#include "asio/detail/handler_type_requirements.hpp"
#include "asio/detail/non_const_lvalue.hpp"
Expand Down Expand Up @@ -559,7 +560,10 @@ class stream :
= default_completion_token_t<executor_type>>
auto async_handshake(handshake_type type, const ConstBufferSequence& buffers,
BufferedHandshakeToken&& token
= default_completion_token_t<executor_type>())
= default_completion_token_t<executor_type>(),
constraint_t<
is_const_buffer_sequence<ConstBufferSequence>::value
> = 0)
-> decltype(
async_initiate<BufferedHandshakeToken,
void (asio::error_code, std::size_t)>(
Expand Down

0 comments on commit 75aabc1

Please sign in to comment.