1 --- a/boost/beast/core/detail/impl/read.hpp 2020-04-22 09:34:50.000000000 -0400
2 +++ b/boost/beast/core/detail/impl/read.hpp 2020-05-02 13:50:11.141761700 -0400
6 class CompletionCondition,
8 + BOOST_BEAST_ASYNC_TPARAM2 ReadHandler,
10 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
12 diff -aruN a/boost/beast/core/detail/is_invocable.hpp b/boost/beast/core/detail/is_invocable.hpp
13 --- a/boost/beast/core/detail/is_invocable.hpp 2020-04-22 09:34:50.000000000 -0400
14 +++ b/boost/beast/core/detail/is_invocable.hpp 2020-05-02 13:50:11.141761700 -0400
16 #ifndef BOOST_BEAST_DETAIL_IS_INVOCABLE_HPP
17 #define BOOST_BEAST_DETAIL_IS_INVOCABLE_HPP
19 +#include <boost/asio/async_result.hpp>
20 +#include <boost/type_traits/make_void.hpp>
21 #include <type_traits>
28 +template<class CompletionToken, class Signature, class = void>
29 +struct is_completion_token_for : std::false_type
33 +struct any_initiation
35 + template<class...AnyArgs>
36 + void operator()(AnyArgs&&...);
39 +template<class CompletionToken, class R, class...Args>
40 +struct is_completion_token_for<
41 + CompletionToken, R(Args...), boost::void_t<decltype(
42 + boost::asio::async_initiate<CompletionToken, R(Args...)>(
43 + any_initiation(), std::declval<CompletionToken&>())
44 + )>> : std::true_type
51 diff -aruN a/boost/beast/core/detail/read.hpp b/boost/beast/core/detail/read.hpp
52 --- a/boost/beast/core/detail/read.hpp 2020-04-22 09:34:50.000000000 -0400
53 +++ b/boost/beast/core/detail/read.hpp 2020-05-02 13:50:11.142761711 -0400
55 class AsyncReadStream,
57 class CompletionCondition,
59 + BOOST_BEAST_ASYNC_TPARAM2 ReadHandler
60 #if ! BOOST_BEAST_DOXYGEN
61 , class = typename std::enable_if<
62 is_async_read_stream<AsyncReadStream>::value &&
63 diff -aruN a/boost/beast/core/detect_ssl.hpp b/boost/beast/core/detect_ssl.hpp
64 --- a/boost/beast/core/detect_ssl.hpp 2020-04-22 09:34:50.000000000 -0400
65 +++ b/boost/beast/core/detect_ssl.hpp 2020-05-02 13:50:11.143761722 -0400
69 AsyncReadStream* s, // references are passed as pointers
74 typename std::decay<DetectHandler>::type,
77 - std::forward<DetectHandler>(h), *s, b);
78 + std::forward<DetectHandler>(h), *s, *b);
83 detail::run_detect_ssl_op{},
85 &stream, // pass the reference by pointer
91 diff -aruN a/boost/beast/core/impl/basic_stream.hpp b/boost/beast/core/impl/basic_stream.hpp
92 --- a/boost/beast/core/impl/basic_stream.hpp 2020-04-22 09:34:50.000000000 -0400
93 +++ b/boost/beast/core/impl/basic_stream.hpp 2020-05-02 13:50:11.144761733 -0400
95 //------------------------------------------------------------------------------
97 template<class Protocol, class Executor, class RatePolicy>
98 -template<class ConnectHandler>
99 +template<BOOST_BEAST_ASYNC_TPARAM1 ConnectHandler>
100 BOOST_BEAST_ASYNC_RESULT1(ConnectHandler)
101 basic_stream<Protocol, Executor, RatePolicy>::
104 template<class Protocol, class Executor, class RatePolicy>
106 class EndpointSequence,
107 - class RangeConnectHandler,
108 + BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, typename Protocol::endpoint)) RangeConnectHandler,
110 BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,void(error_code, typename Protocol::endpoint))
111 basic_stream<Protocol, Executor, RatePolicy>::
114 class EndpointSequence,
115 class ConnectCondition,
116 - class RangeConnectHandler,
117 + BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, typename Protocol::endpoint)) RangeConnectHandler,
119 BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,void (error_code, typename Protocol::endpoint))
120 basic_stream<Protocol, Executor, RatePolicy>::
122 template<class Protocol, class Executor, class RatePolicy>
125 - class IteratorConnectHandler>
126 + BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler>
127 BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,void (error_code, Iterator))
128 basic_stream<Protocol, Executor, RatePolicy>::
133 class ConnectCondition,
134 - class IteratorConnectHandler>
135 + BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler>
136 BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,void (error_code, Iterator))
137 basic_stream<Protocol, Executor, RatePolicy>::
140 //------------------------------------------------------------------------------
142 template<class Protocol, class Executor, class RatePolicy>
143 -template<class MutableBufferSequence, class ReadHandler>
144 +template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
145 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
146 basic_stream<Protocol, Executor, RatePolicy>::
151 template<class Protocol, class Executor, class RatePolicy>
152 -template<class ConstBufferSequence, class WriteHandler>
153 +template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
154 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
155 basic_stream<Protocol, Executor, RatePolicy>::
157 diff -aruN a/boost/beast/core/impl/buffered_read_stream.hpp b/boost/beast/core/impl/buffered_read_stream.hpp
158 --- a/boost/beast/core/impl/buffered_read_stream.hpp 2020-04-22 09:34:50.000000000 -0400
159 +++ b/boost/beast/core/impl/buffered_read_stream.hpp 2020-05-02 13:50:11.144761733 -0400
163 buffered_read_stream* s,
167 // If you get an error on the following line it means
168 // that your handler does not meet the documented type
172 typename std::decay<ReadHandler>::type>(
173 - std::forward<ReadHandler>(h), *s, b);
174 + std::forward<ReadHandler>(h), *s, *b);
181 template<class Stream, class DynamicBuffer>
182 -template<class ConstBufferSequence, class WriteHandler>
183 +template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
184 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
185 buffered_read_stream<Stream, DynamicBuffer>::
188 static_assert(net::is_const_buffer_sequence<
189 ConstBufferSequence>::value,
190 "ConstBufferSequence type requirements not met");
191 - static_assert(detail::is_invocable<WriteHandler,
192 + static_assert(detail::is_completion_token_for<WriteHandler,
193 void(error_code, std::size_t)>::value,
194 "WriteHandler type requirements not met");
195 return next_layer_.async_write_some(buffers,
199 template<class Stream, class DynamicBuffer>
200 -template<class MutableBufferSequence, class ReadHandler>
201 +template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
202 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
203 buffered_read_stream<Stream, DynamicBuffer>::
206 typename ops::run_read_op{},
214 diff -aruN a/boost/beast/core/impl/flat_stream.hpp b/boost/beast/core/impl/flat_stream.hpp
215 --- a/boost/beast/core/impl/flat_stream.hpp 2020-04-22 09:34:50.000000000 -0400
216 +++ b/boost/beast/core/impl/flat_stream.hpp 2020-05-02 13:50:11.145761743 -0400
218 template<class NextLayer>
220 class MutableBufferSequence,
222 + BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
223 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
224 flat_stream<NextLayer>::
227 template<class NextLayer>
229 class ConstBufferSequence,
230 - class WriteHandler>
231 + BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
232 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
233 flat_stream<NextLayer>::
235 diff -aruN a/boost/beast/_experimental/http/impl/icy_stream.hpp b/boost/beast/_experimental/http/impl/icy_stream.hpp
236 --- a/boost/beast/_experimental/http/impl/icy_stream.hpp 2020-04-22 09:34:50.000000000 -0400
237 +++ b/boost/beast/_experimental/http/impl/icy_stream.hpp 2020-05-02 13:50:11.146761754 -0400
239 template<class NextLayer>
241 class MutableBufferSequence,
243 + BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
244 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
245 icy_stream<NextLayer>::
248 template<class NextLayer>
250 class MutableBufferSequence,
251 - class WriteHandler>
252 + BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
253 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
254 icy_stream<NextLayer>::
256 diff -aruN a/boost/beast/_experimental/test/impl/stream.hpp b/boost/beast/_experimental/test/impl/stream.hpp
257 --- a/boost/beast/_experimental/test/impl/stream.hpp 2020-04-22 09:34:50.000000000 -0400
258 +++ b/boost/beast/_experimental/test/impl/stream.hpp 2020-05-02 13:50:11.147761765 -0400
263 -template<class MutableBufferSequence, class ReadHandler>
264 +template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
265 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
272 -template<class ConstBufferSequence, class WriteHandler>
273 +template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
274 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
277 diff -aruN a/boost/beast/http/field.hpp b/boost/beast/http/field.hpp
278 --- a/boost/beast/http/field.hpp 2020-04-22 09:34:50.000000000 -0400
279 +++ b/boost/beast/http/field.hpp 2020-05-02 13:50:11.149761786 -0400
281 string_to_field(string_view s);
283 /// Write the text for a field name to an output stream.
287 -operator<<(std::ostream& os, field f)
289 - return os << to_string(f);
291 +operator<<(std::ostream& os, field f);
295 diff -aruN a/boost/beast/http/impl/field.ipp b/boost/beast/http/impl/field.ipp
296 --- a/boost/beast/http/impl/field.ipp 2020-04-22 09:34:50.000000000 -0400
297 +++ b/boost/beast/http/impl/field.ipp 2020-05-02 13:50:11.150761798 -0400
299 #define BOOST_BEAST_HTTP_IMPL_FIELD_IPP
301 #include <boost/beast/http/field.hpp>
302 +#include <boost/assert.hpp>
306 -#include <boost/assert.hpp>
313 return detail::get_field_table().string_to_field(s);
317 +operator<<(std::ostream& os, field f)
319 + return os << to_string(f);
325 diff -aruN a/boost/beast/http/impl/file_body_win32.hpp b/boost/beast/http/impl/file_body_win32.hpp
326 --- a/boost/beast/http/impl/file_body_win32.hpp 2020-04-22 09:34:50.000000000 -0400
327 +++ b/boost/beast/http/impl/file_body_win32.hpp 2020-05-02 13:50:11.150761798 -0400
330 class Protocol, class Executor,
331 bool isRequest, class Fields,
332 - class WriteHandler>
333 + BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
334 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
336 net::basic_stream_socket<
337 diff -aruN a/boost/beast/http/impl/read.hpp b/boost/beast/http/impl/read.hpp
338 --- a/boost/beast/http/impl/read.hpp 2020-04-22 09:34:50.000000000 -0400
339 +++ b/boost/beast/http/impl/read.hpp 2020-05-02 13:50:11.150761798 -0400
341 class AsyncReadStream,
345 + BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
346 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
348 AsyncReadStream& stream,
350 class AsyncReadStream,
354 + BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
355 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
357 AsyncReadStream& stream,
359 class AsyncReadStream,
363 + BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
364 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
366 AsyncReadStream& stream,
368 class AsyncReadStream,
370 bool isRequest, class Body, class Allocator,
372 + BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
373 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
375 AsyncReadStream& stream,
376 diff -aruN a/boost/beast/http/impl/write.hpp b/boost/beast/http/impl/write.hpp
377 --- a/boost/beast/http/impl/write.hpp 2020-04-22 09:34:50.000000000 -0400
378 +++ b/boost/beast/http/impl/write.hpp 2020-05-02 13:50:11.150761798 -0400
381 class AsyncWriteStream,
382 bool isRequest, class Body, class Fields,
383 - class WriteHandler>
384 + BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
385 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
386 async_write_some_impl(
387 AsyncWriteStream& stream,
390 class AsyncWriteStream,
391 bool isRequest, class Body, class Fields,
392 - class WriteHandler>
393 + BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
394 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
396 AsyncWriteStream& stream,
399 class AsyncWriteStream,
400 bool isRequest, class Body, class Fields,
401 - class WriteHandler>
402 + BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
403 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
405 AsyncWriteStream& stream,
408 class AsyncWriteStream,
409 bool isRequest, class Body, class Fields,
410 - class WriteHandler>
411 + BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
412 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
414 AsyncWriteStream& stream,
417 class AsyncWriteStream,
418 bool isRequest, class Body, class Fields,
419 - class WriteHandler>
420 + BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
421 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
423 AsyncWriteStream& stream,
426 class AsyncWriteStream,
427 bool isRequest, class Body, class Fields,
428 - class WriteHandler>
429 + BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
430 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
432 AsyncWriteStream& stream,
433 diff -aruN a/boost/beast/http/span_body.hpp b/boost/beast/http/span_body.hpp
434 --- a/boost/beast/http/span_body.hpp 2020-04-22 09:34:50.000000000 -0400
435 +++ b/boost/beast/http/span_body.hpp 2020-05-02 13:50:11.151761808 -0400
440 - static_assert(std::is_pod<T>::value,
441 - "POD requirements not met");
443 + std::is_trivial<T>::value &&
444 + std::is_standard_layout<T>::value,
445 + "POD requirements not met");
448 /** The type of container used for the body
449 diff -aruN a/boost/beast/ssl/ssl_stream.hpp b/boost/beast/ssl/ssl_stream.hpp
450 --- a/boost/beast/ssl/ssl_stream.hpp 2020-04-22 09:34:50.000000000 -0400
451 +++ b/boost/beast/ssl/ssl_stream.hpp 2020-05-02 13:50:11.151761808 -0400
453 need to ensure that all data is written before the asynchronous operation
456 - template<class ConstBufferSequence, class WriteHandler>
457 + template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
458 BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, void(boost::system::error_code, std::size_t))
459 async_write_some(ConstBufferSequence const& buffers,
460 BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
462 if you need to ensure that the requested amount of data is read before
463 the asynchronous operation completes.
465 - template<class MutableBufferSequence, class ReadHandler>
466 + template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
467 BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, void(boost::system::error_code, std::size_t))
468 async_read_some(MutableBufferSequence const& buffers,
469 BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
470 diff -aruN a/boost/beast/version.hpp b/boost/beast/version.hpp
471 --- a/boost/beast/version.hpp 2020-04-22 09:34:50.000000000 -0400
472 +++ b/boost/beast/version.hpp 2020-05-02 13:50:11.151761808 -0400
474 This is a simple integer that is incremented by one every
475 time a set of code changes is merged to the develop branch.
477 -#define BOOST_BEAST_VERSION 290
478 +#define BOOST_BEAST_VERSION 292
480 #define BOOST_BEAST_VERSION_STRING "Boost.Beast/" BOOST_STRINGIZE(BOOST_BEAST_VERSION)
482 diff -aruN a/boost/beast/websocket/impl/accept.hpp b/boost/beast/websocket/impl/accept.hpp
483 --- a/boost/beast/websocket/impl/accept.hpp 2020-04-22 09:34:50.000000000 -0400
484 +++ b/boost/beast/websocket/impl/accept.hpp 2020-05-02 13:50:11.153761830 -0400
487 template<class NextLayer, bool deflateSupported>
489 - class AcceptHandler>
490 + BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
491 BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
492 stream<NextLayer, deflateSupported>::
495 template<class NextLayer, bool deflateSupported>
497 class ResponseDecorator,
498 - class AcceptHandler>
499 + BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
500 BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
501 stream<NextLayer, deflateSupported>::
504 template<class NextLayer, bool deflateSupported>
506 class ConstBufferSequence,
507 - class AcceptHandler>
508 + BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
509 BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
510 stream<NextLayer, deflateSupported>::
514 class ConstBufferSequence,
515 class ResponseDecorator,
516 - class AcceptHandler>
517 + BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
518 BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
519 stream<NextLayer, deflateSupported>::
522 template<class NextLayer, bool deflateSupported>
524 class Body, class Allocator,
525 - class AcceptHandler>
526 + BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
527 BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
528 stream<NextLayer, deflateSupported>::
532 class Body, class Allocator,
533 class ResponseDecorator,
534 - class AcceptHandler>
535 + BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
536 BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
537 stream<NextLayer, deflateSupported>::
539 diff -aruN a/boost/beast/websocket/impl/close.hpp b/boost/beast/websocket/impl/close.hpp
540 --- a/boost/beast/websocket/impl/close.hpp 2020-04-22 09:34:50.000000000 -0400
541 +++ b/boost/beast/websocket/impl/close.hpp 2020-05-02 13:50:11.153761830 -0400
545 template<class NextLayer, bool deflateSupported>
546 -template<class CloseHandler>
547 +template<BOOST_BEAST_ASYNC_TPARAM1 CloseHandler>
548 BOOST_BEAST_ASYNC_RESULT1(CloseHandler)
549 stream<NextLayer, deflateSupported>::
550 async_close(close_reason const& cr, CloseHandler&& handler)
551 diff -aruN a/boost/beast/websocket/impl/handshake.hpp b/boost/beast/websocket/impl/handshake.hpp
552 --- a/boost/beast/websocket/impl/handshake.hpp 2020-04-22 09:34:50.000000000 -0400
553 +++ b/boost/beast/websocket/impl/handshake.hpp 2020-05-02 13:50:11.153761830 -0400
555 //------------------------------------------------------------------------------
557 template<class NextLayer, bool deflateSupported>
558 -template<class HandshakeHandler>
559 +template<BOOST_BEAST_ASYNC_TPARAM1 HandshakeHandler>
560 BOOST_BEAST_ASYNC_RESULT1(HandshakeHandler)
561 stream<NextLayer, deflateSupported>::
566 template<class NextLayer, bool deflateSupported>
567 -template<class HandshakeHandler>
568 +template<BOOST_BEAST_ASYNC_TPARAM1 HandshakeHandler>
569 BOOST_BEAST_ASYNC_RESULT1(HandshakeHandler)
570 stream<NextLayer, deflateSupported>::
572 diff -aruN a/boost/beast/websocket/impl/ping.hpp b/boost/beast/websocket/impl/ping.hpp
573 --- a/boost/beast/websocket/impl/ping.hpp 2020-04-22 09:34:50.000000000 -0400
574 +++ b/boost/beast/websocket/impl/ping.hpp 2020-05-02 13:50:11.153761830 -0400
578 template<class NextLayer, bool deflateSupported>
579 -template<class WriteHandler>
580 +template<BOOST_BEAST_ASYNC_TPARAM1 WriteHandler>
581 BOOST_BEAST_ASYNC_RESULT1(WriteHandler)
582 stream<NextLayer, deflateSupported>::
583 async_ping(ping_data const& payload, WriteHandler&& handler)
587 template<class NextLayer, bool deflateSupported>
588 -template<class WriteHandler>
589 +template<BOOST_BEAST_ASYNC_TPARAM1 WriteHandler>
590 BOOST_BEAST_ASYNC_RESULT1(WriteHandler)
591 stream<NextLayer, deflateSupported>::
592 async_pong(ping_data const& payload, WriteHandler&& handler)
593 diff -aruN a/boost/beast/websocket/impl/read.hpp b/boost/beast/websocket/impl/read.hpp
594 --- a/boost/beast/websocket/impl/read.hpp 2020-04-22 09:34:50.000000000 -0400
595 +++ b/boost/beast/websocket/impl/read.hpp 2020-05-02 13:50:11.153761830 -0400
599 template<class NextLayer, bool deflateSupported>
600 -template<class DynamicBuffer, class ReadHandler>
601 +template<class DynamicBuffer, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
602 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
603 stream<NextLayer, deflateSupported>::
604 async_read(DynamicBuffer& buffer, ReadHandler&& handler)
608 template<class NextLayer, bool deflateSupported>
609 -template<class DynamicBuffer, class ReadHandler>
610 +template<class DynamicBuffer, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
611 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
612 stream<NextLayer, deflateSupported>::
614 @@ -1263,7 +1263,7 @@
617 template<class NextLayer, bool deflateSupported>
618 -template<class MutableBufferSequence, class ReadHandler>
619 +template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
620 BOOST_BEAST_ASYNC_RESULT2(ReadHandler)
621 stream<NextLayer, deflateSupported>::
623 diff -aruN a/boost/beast/websocket/impl/write.hpp b/boost/beast/websocket/impl/write.hpp
624 --- a/boost/beast/websocket/impl/write.hpp 2020-04-22 09:34:50.000000000 -0400
625 +++ b/boost/beast/websocket/impl/write.hpp 2020-05-02 13:50:11.153761830 -0400
629 template<class NextLayer, bool deflateSupported>
630 -template<class ConstBufferSequence, class WriteHandler>
631 +template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
632 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
633 stream<NextLayer, deflateSupported>::
634 async_write_some(bool fin,
638 template<class NextLayer, bool deflateSupported>
639 -template<class ConstBufferSequence, class WriteHandler>
640 +template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
641 BOOST_BEAST_ASYNC_RESULT2(WriteHandler)
642 stream<NextLayer, deflateSupported>::
644 diff -aruN a/boost/beast/websocket/stream.hpp b/boost/beast/websocket/stream.hpp
645 --- a/boost/beast/websocket/stream.hpp 2020-04-22 09:34:50.000000000 -0400
646 +++ b/boost/beast/websocket/stream.hpp 2020-05-02 13:50:11.154761841 -0400
647 @@ -2634,7 +2634,7 @@
650 class ResponseDecorator,
651 - class AcceptHandler>
652 + BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
653 BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
655 ResponseDecorator const& decorator,
656 @@ -2643,7 +2643,7 @@
658 class ConstBufferSequence,
659 class ResponseDecorator,
660 - class AcceptHandler>
661 + BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
662 BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
664 ConstBufferSequence const& buffers,
665 @@ -2656,7 +2656,7 @@
667 class Body, class Allocator,
668 class ResponseDecorator,
669 - class AcceptHandler>
670 + BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler>
671 BOOST_BEAST_ASYNC_RESULT1(AcceptHandler)
674 diff -aruN a/libs/beast/CHANGELOG.md b/libs/beast/CHANGELOG.md
675 --- a/libs/beast/CHANGELOG.md 2020-04-22 09:34:50.000000000 -0400
676 +++ b/libs/beast/CHANGELOG.md 2020-05-02 13:51:02.388315008 -0400
680 +* Fix compile errors on Visual Studio with /std:c++latest
681 +* Fix standalone compilation error with std::string_view
682 +* OpenSSL 1.0.2 or later is required
683 +* Fix c++20 deprecation warning in span_body
685 +--------------------------------------------------------------------------------
689 +* Test websocket with use_awaitable
690 +* Test http write with use_awaitable
691 +* Test http read with use_awaitable
692 +* Fix use buffered_read_stream with use_awaitable
693 +* Implement is_completion_token_for trait
694 +* Test use_awaitable with basic_stream
695 +* Fix async_detect_ssl with use_awaitable
696 +* Add clang coroutines-ts to circleci config
698 +--------------------------------------------------------------------------------
702 * Travis build host now bionic
703 diff -aruN a/libs/beast/CMakeLists.txt b/libs/beast/CMakeLists.txt
704 --- a/libs/beast/CMakeLists.txt 2020-04-22 09:34:50.000000000 -0400
705 +++ b/libs/beast/CMakeLists.txt 2020-05-02 13:51:02.389315019 -0400
708 #-------------------------------------------------------------------------------
710 -project (Beast VERSION 290)
711 +project (Beast VERSION 292)
713 set_property (GLOBAL PROPERTY USE_FOLDERS ON)
714 option (Beast_BUILD_EXAMPLES "Build examples" ON)
715 diff -aruN a/libs/beast/doc/qbk/01_intro/_intro.qbk b/libs/beast/doc/qbk/01_intro/_intro.qbk
716 --- a/libs/beast/doc/qbk/01_intro/_intro.qbk 2020-04-22 09:34:50.000000000 -0400
717 +++ b/libs/beast/doc/qbk/01_intro/_intro.qbk 2020-05-02 13:51:02.391315040 -0400
720 * [*C++11:] Robust support for most language features.
721 * [*Boost:] Beast only works with Boost, not stand-alone Asio
722 -* [*OpenSSL:] Required to build the tests, examples, and to use TLS/Secure sockets.
723 +* [*OpenSSL:] Version 1.0.2 or higher. Required to build the tests, examples, and to use TLS/Secure sockets.
725 Tested with these compilers: msvc-14+, gcc 4.8.4+, clang 3.6+.
727 diff -aruN a/libs/beast/test/beast/core/async_base.cpp b/libs/beast/test/beast/core/async_base.cpp
728 --- a/libs/beast/test/beast/core/async_base.cpp 2020-04-22 09:34:50.000000000 -0400
729 +++ b/libs/beast/test/beast/core/async_base.cpp 2020-05-02 13:51:02.470315892 -0400
731 //--------------------------------------------------------------------------
733 // Asynchronously read into a buffer until the buffer is full, or an error occurs
734 - template<class AsyncReadStream, class ReadHandler>
735 + template<class AsyncReadStream, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
736 typename net::async_result<ReadHandler, void(error_code, std::size_t)>::return_type
737 async_read(AsyncReadStream& stream, net::mutable_buffer buffer, ReadHandler&& handler)
739 diff -aruN a/libs/beast/test/beast/core/basic_stream.cpp b/libs/beast/test/beast/core/basic_stream.cpp
740 --- a/libs/beast/test/beast/core/basic_stream.cpp 2020-04-22 09:34:50.000000000 -0400
741 +++ b/libs/beast/test/beast/core/basic_stream.cpp 2020-05-02 13:51:02.470315892 -0400
746 +#if BOOST_ASIO_HAS_CO_AWAIT
747 +#include <boost/asio/awaitable.hpp>
748 +#include <boost/asio/co_spawn.hpp>
749 +#include <boost/asio/use_awaitable.hpp>
759 net::ip::tcp::socket socket_;
765 @@ -1297,6 +1304,52 @@
767 //--------------------------------------------------------------------------
769 +#if BOOST_ASIO_HAS_CO_AWAIT
770 + void testAwaitableCompilation(
771 + basic_stream<net::ip::tcp>& stream,
772 + net::mutable_buffer outbuf,
773 + net::const_buffer inbuf,
774 + net::ip::tcp::resolver::results_type resolve_results)
776 + static_assert(std::is_same_v<
777 + net::awaitable<std::size_t>, decltype(
778 + stream.async_read_some(outbuf, net::use_awaitable))>);
780 + static_assert(std::is_same_v<
781 + net::awaitable<std::size_t>, decltype(
782 + stream.async_write_some(inbuf, net::use_awaitable))>);
784 + static_assert(std::is_same_v<
785 + net::awaitable<net::ip::tcp::resolver::results_type::const_iterator>, decltype(
786 + stream.async_connect(
787 + resolve_results.begin(),
788 + resolve_results.end(),
789 + net::use_awaitable))>);
791 + static_assert(std::is_same_v<
792 + net::awaitable<net::ip::tcp::endpoint>, decltype(
793 + stream.async_connect(
795 + net::use_awaitable))>);
797 + static_assert(std::is_same_v<
798 + net::awaitable<void>, decltype(
799 + stream.async_connect(
800 + resolve_results.begin()->endpoint(),
801 + net::use_awaitable))>);
803 + auto comparison_function = [](error_code&, net::ip::tcp::endpoint) { return true; };
805 + static_assert(std::is_same_v<
806 + net::awaitable<net::ip::tcp::resolver::results_type::const_iterator>, decltype(
807 + stream.async_connect(
808 + resolve_results.begin(),
809 + resolve_results.end(),
810 + comparison_function,
811 + net::use_awaitable))>);
818 @@ -1307,6 +1360,11 @@
823 +#if BOOST_ASIO_HAS_CO_AWAIT
824 + // test for compilation success only
825 + boost::ignore_unused(&basic_stream_test::testAwaitableCompilation);
830 diff -aruN a/libs/beast/test/beast/core/buffered_read_stream.cpp b/libs/beast/test/beast/core/buffered_read_stream.cpp
831 --- a/libs/beast/test/beast/core/buffered_read_stream.cpp 2020-04-22 09:34:50.000000000 -0400
832 +++ b/libs/beast/test/beast/core/buffered_read_stream.cpp 2020-05-02 13:51:02.470315892 -0400
834 #include <boost/asio/spawn.hpp>
835 #include <boost/asio/strand.hpp>
836 #include <boost/optional.hpp>
837 +#if BOOST_ASIO_HAS_CO_AWAIT
838 +#include <boost/asio/use_awaitable.hpp>
847 +#if BOOST_ASIO_HAS_CO_AWAIT
848 + void testAwaitableCompiles(
849 + buffered_read_stream<test::stream, flat_buffer>& stream,
850 + net::mutable_buffer rxbuf,
851 + net::const_buffer txbuf)
853 + static_assert(std::is_same_v<
854 + net::awaitable<std::size_t>, decltype(
855 + stream.async_read_some(rxbuf, net::use_awaitable))>);
857 + static_assert(std::is_same_v<
858 + net::awaitable<std::size_t>, decltype(
859 + stream.async_write_some(txbuf, net::use_awaitable))>);
865 testSpecialMembers();
871 +#if BOOST_ASIO_HAS_CO_AWAIT
872 + boost::ignore_unused(&buffered_read_stream_test::testAwaitableCompiles);
877 diff -aruN a/libs/beast/test/beast/core/detect_ssl.cpp b/libs/beast/test/beast/core/detect_ssl.cpp
878 --- a/libs/beast/test/beast/core/detect_ssl.cpp 2020-04-22 09:34:50.000000000 -0400
879 +++ b/libs/beast/test/beast/core/detect_ssl.cpp 2020-05-02 13:51:02.470315892 -0400
881 #include <boost/beast/core/flat_buffer.hpp>
882 #include <boost/beast/core/string.hpp>
883 #include <boost/core/exchange.hpp>
884 +#if BOOST_ASIO_HAS_CO_AWAIT
885 +#include <boost/asio/awaitable.hpp>
886 +#include <boost/asio/co_spawn.hpp>
887 +#include <boost/asio/use_awaitable.hpp>
892 @@ -166,12 +171,25 @@
896 +#if BOOST_ASIO_HAS_CO_AWAIT
897 + void testAwaitableCompiles(test::stream& stream, flat_buffer& b)
901 + net::awaitable<bool>, decltype(
902 + async_detect_ssl(stream, b, net::use_awaitable))>);
912 +#if BOOST_ASIO_HAS_CO_AWAIT
913 + boost::ignore_unused(&detect_ssl_test::testAwaitableCompiles);
918 diff -aruN a/libs/beast/test/beast/core/flat_stream.cpp b/libs/beast/test/beast/core/flat_stream.cpp
919 --- a/libs/beast/test/beast/core/flat_stream.cpp 2020-04-22 09:34:50.000000000 -0400
920 +++ b/libs/beast/test/beast/core/flat_stream.cpp 2020-05-02 13:51:02.471315902 -0400
922 #include <boost/beast/core/role.hpp>
923 #include <initializer_list>
925 +#if BOOST_ASIO_HAS_CO_AWAIT
926 +#include <boost/asio/use_awaitable.hpp>
931 @@ -208,11 +211,30 @@
932 check({1,2,3,4}, 3, 3, true);
935 +#if BOOST_ASIO_HAS_CO_AWAIT
936 + void testAwaitableCompiles(
937 + flat_stream<test::stream>& stream,
938 + net::mutable_buffer rxbuf,
939 + net::const_buffer txbuf)
941 + static_assert(std::is_same_v<
942 + net::awaitable<std::size_t>, decltype(
943 + stream.async_read_some(rxbuf, net::use_awaitable))>);
945 + static_assert(std::is_same_v<
946 + net::awaitable<std::size_t>, decltype(
947 + stream.async_write_some(txbuf, net::use_awaitable))>);
956 +#if BOOST_ASIO_HAS_CO_AWAIT
957 + boost::ignore_unused(&flat_stream_test::testAwaitableCompiles);
962 diff -aruN a/libs/beast/test/beast/core/stream_traits.cpp b/libs/beast/test/beast/core/stream_traits.cpp
963 --- a/libs/beast/test/beast/core/stream_traits.cpp 2020-04-22 09:34:50.000000000 -0400
964 +++ b/libs/beast/test/beast/core/stream_traits.cpp 2020-05-02 13:51:02.471315902 -0400
965 @@ -214,14 +214,14 @@
966 struct async_read_stream
968 net::io_context::executor_type get_executor() noexcept;
969 - template<class MutableBufferSequence, class ReadHandler>
970 + template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
971 void async_read_some(MutableBufferSequence const&, ReadHandler&&);
974 struct async_write_stream
976 net::io_context::executor_type get_executor() noexcept;
977 - template<class ConstBufferSequence, class WriteHandler>
978 + template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
979 void async_write_some(ConstBufferSequence const&, WriteHandler&&);
983 struct async_stream : async_read_stream, async_write_stream
985 net::io_context::executor_type get_executor() noexcept;
986 - template<class MutableBufferSequence, class ReadHandler>
987 + template<class MutableBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 ReadHandler>
988 void async_read_some(MutableBufferSequence const&, ReadHandler&&);
989 - template<class ConstBufferSequence, class WriteHandler>
990 + template<class ConstBufferSequence, BOOST_BEAST_ASYNC_TPARAM2 WriteHandler>
991 void async_write_some(ConstBufferSequence const&, WriteHandler&&);
994 diff -aruN a/libs/beast/test/beast/http/CMakeLists.txt b/libs/beast/test/beast/http/CMakeLists.txt
995 --- a/libs/beast/test/beast/http/CMakeLists.txt 2020-04-22 09:34:50.000000000 -0400
996 +++ b/libs/beast/test/beast/http/CMakeLists.txt 2020-05-02 13:51:02.472315914 -0400
1001 + field_compiles.cpp
1005 diff -aruN a/libs/beast/test/beast/http/field_compiles.cpp b/libs/beast/test/beast/http/field_compiles.cpp
1006 --- a/libs/beast/test/beast/http/field_compiles.cpp 1969-12-31 19:00:00.000000000 -0500
1007 +++ b/libs/beast/test/beast/http/field_compiles.cpp 2020-05-02 13:51:02.473315924 -0400
1010 +// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
1012 +// Distributed under the Boost Software License, Version 1.0. (See accompanying
1013 +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
1015 +// Official repository: https://github.com/boostorg/beast
1018 +// Test that header file is self-contained.
1019 +#include <boost/beast/http/field.hpp>
1020 diff -aruN a/libs/beast/test/beast/http/Jamfile b/libs/beast/test/beast/http/Jamfile
1021 --- a/libs/beast/test/beast/http/Jamfile 2020-04-22 09:34:50.000000000 -0400
1022 +++ b/libs/beast/test/beast/http/Jamfile 2020-05-02 13:51:02.472315914 -0400
1027 + field_compiles.cpp
1031 diff -aruN a/libs/beast/test/beast/http/read.cpp b/libs/beast/test/beast/http/read.cpp
1032 --- a/libs/beast/test/beast/http/read.cpp 2020-04-22 09:34:50.000000000 -0400
1033 +++ b/libs/beast/test/beast/http/read.cpp 2020-05-02 13:51:02.472315914 -0400
1035 #include <boost/asio/strand.hpp>
1036 #include <boost/asio/ip/tcp.hpp>
1038 +#if BOOST_ASIO_HAS_CO_AWAIT
1039 +#include <boost/asio/use_awaitable.hpp>
1044 @@ -529,6 +532,49 @@
1048 +#if BOOST_ASIO_HAS_CO_AWAIT
1049 + void testAwaitableCompiles(
1050 + test::stream& stream,
1051 + flat_buffer& dynbuf,
1052 + parser<true, string_body>& request_parser,
1053 + request<http::string_body>& request,
1054 + parser<false, string_body>& response_parser,
1055 + response<http::string_body>& response)
1057 + static_assert(std::is_same_v<
1058 + net::awaitable<std::size_t>, decltype(
1059 + http::async_read(stream, dynbuf, request, net::use_awaitable))>);
1061 + static_assert(std::is_same_v<
1062 + net::awaitable<std::size_t>, decltype(
1063 + http::async_read(stream, dynbuf, request_parser, net::use_awaitable))>);
1065 + static_assert(std::is_same_v<
1066 + net::awaitable<std::size_t>, decltype(
1067 + http::async_read(stream, dynbuf, response, net::use_awaitable))>);
1069 + static_assert(std::is_same_v<
1070 + net::awaitable<std::size_t>, decltype(
1071 + http::async_read(stream, dynbuf, response_parser, net::use_awaitable))>);
1073 + static_assert(std::is_same_v<
1074 + net::awaitable<std::size_t>, decltype(
1075 + http::async_read_some(stream, dynbuf, request_parser, net::use_awaitable))>);
1077 + static_assert(std::is_same_v<
1078 + net::awaitable<std::size_t>, decltype(
1079 + http::async_read_some(stream, dynbuf, response_parser, net::use_awaitable))>);
1081 + static_assert(std::is_same_v<
1082 + net::awaitable<std::size_t>, decltype(
1083 + http::async_read_header(stream, dynbuf, request_parser, net::use_awaitable))>);
1085 + static_assert(std::is_same_v<
1086 + net::awaitable<std::size_t>, decltype(
1087 + http::async_read_header(stream, dynbuf, response_parser, net::use_awaitable))>);
1095 testRegression430();
1097 testAsioHandlerInvoke();
1098 +#if BOOST_ASIO_HAS_CO_AWAIT
1099 + boost::ignore_unused(&read_test::testAwaitableCompiles);
1104 diff -aruN a/libs/beast/test/beast/http/write.cpp b/libs/beast/test/beast/http/write.cpp
1105 --- a/libs/beast/test/beast/http/write.cpp 2020-04-22 09:34:50.000000000 -0400
1106 +++ b/libs/beast/test/beast/http/write.cpp 2020-05-02 13:51:02.473315924 -0400
1108 #include <boost/asio/strand.hpp>
1111 +#if BOOST_ASIO_HAS_CO_AWAIT
1112 +#include <boost/asio/use_awaitable.hpp>
1117 @@ -994,6 +997,59 @@
1121 +#if BOOST_ASIO_HAS_CO_AWAIT
1122 + void testAwaitableCompiles(
1123 + test::stream& stream,
1124 + serializer<true, string_body>& request_serializer,
1125 + request<string_body>& req,
1126 + request<string_body> const& creq,
1127 + serializer<false, string_body>& response_serializer,
1128 + response<string_body>& resp,
1129 + response<string_body> const& cresp)
1131 + static_assert(std::is_same_v<
1132 + net::awaitable<std::size_t>, decltype(
1133 + http::async_write(stream, request_serializer, net::use_awaitable))>);
1135 + static_assert(std::is_same_v<
1136 + net::awaitable<std::size_t>, decltype(
1137 + http::async_write(stream, response_serializer, net::use_awaitable))>);
1139 + static_assert(std::is_same_v<
1140 + net::awaitable<std::size_t>, decltype(
1141 + http::async_write(stream, req, net::use_awaitable))>);
1143 + static_assert(std::is_same_v<
1144 + net::awaitable<std::size_t>, decltype(
1145 + http::async_write(stream, creq, net::use_awaitable))>);
1147 + static_assert(std::is_same_v<
1148 + net::awaitable<std::size_t>, decltype(
1149 + http::async_write(stream, resp, net::use_awaitable))>);
1151 + static_assert(std::is_same_v<
1152 + net::awaitable<std::size_t>, decltype(
1153 + http::async_write(stream, cresp, net::use_awaitable))>);
1155 + static_assert(std::is_same_v<
1156 + net::awaitable<std::size_t>, decltype(
1157 + http::async_write_some(stream, request_serializer, net::use_awaitable))>);
1159 + static_assert(std::is_same_v<
1160 + net::awaitable<std::size_t>, decltype(
1161 + http::async_write_some(stream, response_serializer, net::use_awaitable))>);
1163 + static_assert(std::is_same_v<
1164 + net::awaitable<std::size_t>, decltype(
1165 + http::async_write_header(stream, request_serializer, net::use_awaitable))>);
1167 + static_assert(std::is_same_v<
1168 + net::awaitable<std::size_t>, decltype(
1169 + http::async_write_header(stream, response_serializer, net::use_awaitable))>);
1177 @@ -1017,6 +1073,9 @@
1179 testAsioHandlerInvoke();
1181 +#if BOOST_ASIO_HAS_CO_AWAIT
1182 + boost::ignore_unused(&write_test::testAwaitableCompiles);
1187 diff -aruN a/libs/beast/test/beast/websocket/accept.cpp b/libs/beast/test/beast/websocket/accept.cpp
1188 --- a/libs/beast/test/beast/websocket/accept.cpp 2020-04-22 09:34:50.000000000 -0400
1189 +++ b/libs/beast/test/beast/websocket/accept.cpp 2020-05-02 13:51:02.473315924 -0400
1191 #include <boost/beast/_experimental/test/tcp.hpp>
1192 #include <boost/beast/_experimental/unit_test/suite.hpp>
1195 +#if BOOST_ASIO_HAS_CO_AWAIT
1196 +#include <boost/asio/use_awaitable.hpp>
1200 namespace websocket {
1201 @@ -810,6 +812,27 @@
1205 +#if BOOST_ASIO_HAS_CO_AWAIT
1206 + void testAwaitableCompiles(
1207 + stream<net::ip::tcp::socket>& s,
1208 + http::request<http::empty_body>& req,
1209 + net::mutable_buffer buf
1212 + static_assert(std::is_same_v<
1213 + net::awaitable<void>, decltype(
1214 + s.async_accept(net::use_awaitable))>);
1216 + static_assert(std::is_same_v<
1217 + net::awaitable<void>, decltype(
1218 + s.async_accept(req, net::use_awaitable))>);
1220 + static_assert(std::is_same_v<
1221 + net::awaitable<void>, decltype(
1222 + s.async_accept(buf, net::use_awaitable))>);
1230 testInvalidInputs();
1233 +#if BOOST_ASIO_HAS_CO_AWAIT
1234 + boost::ignore_unused(&accept_test::testAwaitableCompiles);
1239 diff -aruN a/libs/beast/test/beast/websocket/close.cpp b/libs/beast/test/beast/websocket/close.cpp
1240 --- a/libs/beast/test/beast/websocket/close.cpp 2020-04-22 09:34:50.000000000 -0400
1241 +++ b/libs/beast/test/beast/websocket/close.cpp 2020-05-02 13:51:02.473315924 -0400
1244 #include <boost/asio/io_context.hpp>
1245 #include <boost/asio/strand.hpp>
1246 +#if BOOST_ASIO_HAS_CO_AWAIT
1247 +#include <boost/asio/use_awaitable.hpp>
1252 @@ -735,6 +738,15 @@
1256 +#if BOOST_ASIO_HAS_CO_AWAIT
1257 + void testAwaitableCompiles(stream<test::stream>& s, close_reason cr )
1259 + static_assert(std::is_same_v<
1260 + net::awaitable<void>, decltype(
1261 + s.async_close(cr, net::use_awaitable))>);
1272 +#if BOOST_ASIO_HAS_CO_AWAIT
1273 + boost::ignore_unused(&close_test::testAwaitableCompiles);
1278 diff -aruN a/libs/beast/test/beast/websocket/handshake.cpp b/libs/beast/test/beast/websocket/handshake.cpp
1279 --- a/libs/beast/test/beast/websocket/handshake.cpp 2020-04-22 09:34:50.000000000 -0400
1280 +++ b/libs/beast/test/beast/websocket/handshake.cpp 2020-05-02 13:51:02.473315924 -0400
1282 #include <boost/asio/io_context.hpp>
1283 #include <boost/asio/strand.hpp>
1285 +#if BOOST_ASIO_HAS_CO_AWAIT
1286 +#include <boost/asio/use_awaitable.hpp>
1291 @@ -704,6 +707,23 @@
1295 +#if BOOST_ASIO_HAS_CO_AWAIT
1296 + void testAwaitableCompiles(
1297 + stream<test::stream>& s,
1300 + response_type& resp)
1302 + static_assert(std::is_same_v<
1303 + net::awaitable<void>, decltype(
1304 + s.async_handshake(host, port, net::use_awaitable))>);
1306 + static_assert(std::is_same_v<
1307 + net::awaitable<void>, decltype(
1308 + s.async_handshake(resp, host, port, net::use_awaitable))>);
1319 +#if BOOST_ASIO_HAS_CO_AWAIT
1320 + boost::ignore_unused(&handshake_test::testAwaitableCompiles);
1325 diff -aruN a/libs/beast/test/beast/websocket/ping.cpp b/libs/beast/test/beast/websocket/ping.cpp
1326 --- a/libs/beast/test/beast/websocket/ping.cpp 2020-04-22 09:34:50.000000000 -0400
1327 +++ b/libs/beast/test/beast/websocket/ping.cpp 2020-05-02 13:51:02.474315935 -0400
1329 #include <boost/asio/io_context.hpp>
1330 #include <boost/asio/strand.hpp>
1332 +#if BOOST_ASIO_HAS_CO_AWAIT
1333 +#include <boost/asio/use_awaitable.hpp>
1338 namespace websocket {
1339 @@ -483,12 +487,30 @@
1343 +#if BOOST_ASIO_HAS_CO_AWAIT
1344 + void testAwaitableCompiles(
1345 + stream<test::stream>& s,
1348 + static_assert(std::is_same_v<
1349 + net::awaitable<void>, decltype(
1350 + s.async_ping(pdat, net::use_awaitable))>);
1352 + static_assert(std::is_same_v<
1353 + net::awaitable<void>, decltype(
1354 + s.async_pong(pdat, net::use_awaitable))>);
1364 +#if BOOST_ASIO_HAS_CO_AWAIT
1365 + boost::ignore_unused(&ping_test::testAwaitableCompiles);
1370 diff -aruN a/libs/beast/test/beast/websocket/read2.cpp b/libs/beast/test/beast/websocket/read2.cpp
1371 --- a/libs/beast/test/beast/websocket/read2.cpp 2020-04-22 09:34:50.000000000 -0400
1372 +++ b/libs/beast/test/beast/websocket/read2.cpp 2020-05-02 13:51:02.474315935 -0400
1375 #include <boost/asio/write.hpp>
1377 +#if BOOST_ASIO_HAS_CO_AWAIT
1378 +#include <boost/asio/use_awaitable.hpp>
1381 #include <boost/config/workaround.hpp>
1382 #if BOOST_WORKAROUND(BOOST_GCC, < 80200)
1383 #define BOOST_BEAST_SYMBOL_HIDDEN __attribute__ ((visibility("hidden")))
1384 @@ -673,10 +677,34 @@
1388 +#if BOOST_ASIO_HAS_CO_AWAIT
1389 + void testAwaitableCompiles(
1390 + stream<test::stream>& s,
1391 + flat_buffer& dynbuf,
1392 + net::mutable_buffer buf,
1393 + std::size_t limit)
1395 + static_assert(std::is_same_v<
1396 + net::awaitable<std::size_t>, decltype(
1397 + s.async_read(dynbuf, net::use_awaitable))>);
1399 + static_assert(std::is_same_v<
1400 + net::awaitable<std::size_t>, decltype(
1401 + s.async_read_some(buf, net::use_awaitable))>);
1403 + static_assert(std::is_same_v<
1404 + net::awaitable<std::size_t>, decltype(
1405 + s.async_read_some(dynbuf, limit, net::use_awaitable))>);
1413 +#if BOOST_ASIO_HAS_CO_AWAIT
1414 + boost::ignore_unused(&read2_test::testAwaitableCompiles);
1419 diff -aruN a/libs/beast/test/beast/websocket/write.cpp b/libs/beast/test/beast/websocket/write.cpp
1420 --- a/libs/beast/test/beast/websocket/write.cpp 2020-04-22 09:34:50.000000000 -0400
1421 +++ b/libs/beast/test/beast/websocket/write.cpp 2020-05-02 13:51:02.474315935 -0400
1423 #include <boost/asio/io_context.hpp>
1424 #include <boost/asio/strand.hpp>
1426 +#if BOOST_ASIO_HAS_CO_AWAIT
1427 +#include <boost/asio/use_awaitable.hpp>
1433 @@ -716,6 +720,22 @@
1434 BEAST_EXPECT(n1 < n0 + s.size());
1437 +#if BOOST_ASIO_HAS_CO_AWAIT
1438 + void testAwaitableCompiles(
1439 + stream<test::stream>& s,
1440 + net::mutable_buffer buf,
1443 + static_assert(std::is_same_v<
1444 + net::awaitable<std::size_t>, decltype(
1445 + s.async_write(buf, net::use_awaitable))>);
1447 + static_assert(std::is_same_v<
1448 + net::awaitable<std::size_t>, decltype(
1449 + s.async_write_some(fin, buf, net::use_awaitable))>);
1460 +#if BOOST_ASIO_HAS_CO_AWAIT
1461 + boost::ignore_unused(&write_test::testAwaitableCompiles);