Fix buffered_read_stream async_read_some signature

This commit is contained in:
Vinnie Falco
2017-10-24 13:32:35 -07:00
parent ab2a225a9a
commit 6ccc61d940
3 changed files with 13 additions and 10 deletions

View File

@@ -10,6 +10,7 @@ Version 126:
* Fix executor type compilation * Fix executor type compilation
* Add Travis tests with the default compilers * Add Travis tests with the default compilers
* Update Boost.WinAPI usage to the new location and namespace. * Update Boost.WinAPI usage to the new location and namespace.
* Fix buffered_read_stream async_read_some signature
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -288,7 +288,7 @@ public:
*/ */
template<class MutableBufferSequence, class ReadHandler> template<class MutableBufferSequence, class ReadHandler>
BOOST_ASIO_INITFN_RESULT_TYPE( BOOST_ASIO_INITFN_RESULT_TYPE(
ReadHandler, void(error_code)) ReadHandler, void(error_code, std::size_t))
async_read_some(MutableBufferSequence const& buffers, async_read_some(MutableBufferSequence const& buffers,
ReadHandler&& handler); ReadHandler&& handler);
@@ -360,7 +360,7 @@ public:
*/ */
template<class ConstBufferSequence, class WriteHandler> template<class ConstBufferSequence, class WriteHandler>
BOOST_ASIO_INITFN_RESULT_TYPE( BOOST_ASIO_INITFN_RESULT_TYPE(
WriteHandler, void(error_code)) WriteHandler, void(error_code, std::size_t))
async_write_some(ConstBufferSequence const& buffers, async_write_some(ConstBufferSequence const& buffers,
WriteHandler&& handler); WriteHandler&& handler);
}; };

View File

@@ -144,11 +144,12 @@ buffered_read_stream(Args&&... args)
template<class Stream, class DynamicBuffer> template<class Stream, class DynamicBuffer>
template<class ConstBufferSequence, class WriteHandler> template<class ConstBufferSequence, class WriteHandler>
auto BOOST_ASIO_INITFN_RESULT_TYPE(
WriteHandler, void(error_code, std::size_t))
buffered_read_stream<Stream, DynamicBuffer>:: buffered_read_stream<Stream, DynamicBuffer>::
async_write_some(ConstBufferSequence const& buffers, async_write_some(
WriteHandler&& handler) -> ConstBufferSequence const& buffers,
BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, void(error_code)) WriteHandler&& handler)
{ {
static_assert(is_async_write_stream<next_layer_type>::value, static_assert(is_async_write_stream<next_layer_type>::value,
"AsyncWriteStream requirements not met"); "AsyncWriteStream requirements not met");
@@ -217,11 +218,12 @@ read_some(MutableBufferSequence const& buffers,
template<class Stream, class DynamicBuffer> template<class Stream, class DynamicBuffer>
template<class MutableBufferSequence, class ReadHandler> template<class MutableBufferSequence, class ReadHandler>
auto BOOST_ASIO_INITFN_RESULT_TYPE(
ReadHandler, void(error_code, std::size_t))
buffered_read_stream<Stream, DynamicBuffer>:: buffered_read_stream<Stream, DynamicBuffer>::
async_read_some(MutableBufferSequence const& buffers, async_read_some(
ReadHandler&& handler) -> MutableBufferSequence const& buffers,
BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, void(error_code)) ReadHandler&& handler)
{ {
static_assert(is_async_read_stream<next_layer_type>::value, static_assert(is_async_read_stream<next_layer_type>::value,
"AsyncReadStream requirements not met"); "AsyncReadStream requirements not met");