Skip to content

Commit 983e1bd

Browse files
committed
net::prepend is replaced with net::append
1 parent 770e84f commit 983e1bd

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

include/boost/beast/_experimental/test/impl/stream.hpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313
#include <boost/beast/core/buffer_traits.hpp>
1414
#include <boost/beast/core/detail/service_base.hpp>
1515
#include <boost/beast/core/detail/is_invocable.hpp>
16-
#include <boost/asio/associated_cancellation_slot.hpp>
1716
#include <boost/asio/any_io_executor.hpp>
17+
#include <boost/asio/append.hpp>
1818
#include <boost/asio/associated_cancellation_slot.hpp>
1919
#include <boost/asio/dispatch.hpp>
2020
#include <boost/asio/post.hpp>
21-
#include <boost/asio/prepend.hpp>
2221
#include <mutex>
2322
#include <stdexcept>
2423
#include <vector>
@@ -134,11 +133,11 @@ class basic_stream<Executor>::read_op : public detail::stream_read_op_base
134133

135134
#if defined(BOOST_ASIO_NO_TS_EXECUTORS)
136135
net::dispatch(wg2_,
137-
net::prepend(std::move(h_), ec, bytes_transferred));
136+
net::append(std::move(h_), ec, bytes_transferred));
138137
wg2_ = net::any_io_executor(); // probably unnecessary
139138
#else // defined(BOOST_ASIO_NO_TS_EXECUTORS)
140139
net::dispatch(wg2_.get_executor(),
141-
net::prepend(std::move(h_), ec, bytes_transferred));
140+
net::append(std::move(h_), ec, bytes_transferred));
142141
wg2_.reset();
143142
#endif // defined(BOOST_ASIO_NO_TS_EXECUTORS)
144143
}
@@ -171,10 +170,10 @@ class basic_stream<Executor>::read_op : public detail::stream_read_op_base
171170
operator()(error_code ec) override
172171
{
173172
#if defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
174-
net::post(wg1_.get_executor(), net::prepend(std::move(fn_), ec));
173+
net::post(wg1_.get_executor(), net::append(std::move(fn_), ec));
175174
wg1_.reset();
176175
#else
177-
net::post(wg1_, net::prepend(std::move(fn_), ec));
176+
net::post(wg1_, net::append(std::move(fn_), ec));
178177
wg1_ = net::any_io_executor(); // probably unnecessary
179178
#endif
180179
}
@@ -257,7 +256,7 @@ struct basic_stream<Executor>::run_write_op
257256
++in_->nwrite;
258257
auto const upcall = [&](error_code ec, std::size_t n)
259258
{
260-
net::post(in_->exec, net::prepend(std::move(h), ec, n));
259+
net::post(in_->exec, net::append(std::move(h), ec, n));
261260
};
262261

263262
// test failure
@@ -477,7 +476,7 @@ async_teardown(
477476
s.in_->fc->fail(ec))
478477
return net::post(
479478
s.get_executor(),
480-
net::prepend(std::move(handler), ec));
479+
net::append(std::move(handler), ec));
481480
s.close();
482481
if( s.in_->fc &&
483482
s.in_->fc->fail(ec))
@@ -487,7 +486,7 @@ async_teardown(
487486
else
488487
ec = {};
489488

490-
net::post(s.get_executor(), net::prepend(std::move(handler), ec));
489+
net::post(s.get_executor(), net::append(std::move(handler), ec));
491490
}
492491

493492
//------------------------------------------------------------------------------

include/boost/beast/core/async_base.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
#include <boost/beast/core/detail/async_base.hpp>
1616
#include <boost/beast/core/detail/filtering_cancellation_slot.hpp>
1717
#include <boost/beast/core/detail/work_guard.hpp>
18+
#include <boost/asio/append.hpp>
1819
#include <boost/asio/associated_allocator.hpp>
1920
#include <boost/asio/associated_cancellation_slot.hpp>
2021
#include <boost/asio/associated_executor.hpp>
2122
#include <boost/asio/associated_immediate_executor.hpp>
2223
#include <boost/asio/bind_executor.hpp>
23-
#include <boost/asio/handler_continuation_hook.hpp>
2424
#include <boost/asio/dispatch.hpp>
25+
#include <boost/asio/handler_continuation_hook.hpp>
2526
#include <boost/asio/post.hpp>
26-
#include <boost/asio/prepend.hpp>
2727
#include <boost/core/exchange.hpp>
2828
#include <boost/core/empty_value.hpp>
2929
#include <utility>
@@ -425,7 +425,7 @@ class async_base
425425
auto const ex = this->get_immediate_executor();
426426
net::dispatch(
427427
ex,
428-
net::prepend(std::move(h_), std::forward<Args>(args)...));
428+
net::append(std::move(h_), std::forward<Args>(args)...));
429429
wg1_.reset();
430430
}
431431
else

include/boost/beast/core/impl/basic_stream.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <boost/beast/core/buffer_traits.hpp>
1515
#include <boost/beast/core/buffers_prefix.hpp>
1616
#include <boost/beast/websocket/teardown.hpp>
17+
#include <boost/asio/append.hpp>
1718
#include <boost/asio/coroutine.hpp>
1819
#include <boost/assert.hpp>
1920
#include <boost/make_shared.hpp>
@@ -325,7 +326,7 @@ class transfer_op
325326
: "basic_stream::async_write_some")));
326327

327328
net::dispatch(this->get_immediate_executor(),
328-
net::prepend(std::move(*this), ec, 0));
329+
net::append(std::move(*this), ec, 0));
329330
}
330331

331332
impl_->close();

include/boost/beast/core/impl/buffered_read_stream.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include <boost/beast/core/read_size.hpp>
1616
#include <boost/beast/core/stream_traits.hpp>
1717
#include <boost/beast/core/detail/is_invocable.hpp>
18+
#include <boost/asio/append.hpp>
1819
#include <boost/asio/dispatch.hpp>
19-
#include <boost/asio/prepend.hpp>
2020
#include <boost/throw_exception.hpp>
2121

2222
namespace boost {
@@ -84,7 +84,7 @@ class read_op
8484
const auto ex = this->get_immediate_executor();
8585
return net::dispatch(
8686
ex,
87-
net::prepend(std::move(*this), ec, 0));
87+
net::append(std::move(*this), ec, 0));
8888
}
8989
case 1:
9090
// upcall

include/boost/beast/http/impl/read.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
#include <boost/beast/core/stream_traits.hpp>
2020
#include <boost/beast/core/detail/buffer.hpp>
2121
#include <boost/beast/core/detail/read.hpp>
22-
#include <boost/asio/error.hpp>
22+
#include <boost/asio/append.hpp>
2323
#include <boost/asio/compose.hpp>
2424
#include <boost/asio/coroutine.hpp>
25-
#include <boost/asio/prepend.hpp>
25+
#include <boost/asio/error.hpp>
2626

2727
namespace boost {
2828
namespace beast {
@@ -259,7 +259,7 @@ class read_some_op : asio::coroutine
259259
asio::get_associated_immediate_executor(
260260
self, s_.get_executor());
261261

262-
net::dispatch(ex, net::prepend(std::move(self), ec));
262+
net::dispatch(ex, net::append(std::move(self), ec));
263263
}
264264
}
265265
self.complete(ec, bytes_transferred_);

include/boost/beast/http/impl/write.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
#include <boost/beast/core/make_printable.hpp>
1717
#include <boost/beast/core/stream_traits.hpp>
1818
#include <boost/beast/core/detail/is_invocable.hpp>
19+
#include <boost/asio/append.hpp>
1920
#include <boost/asio/coroutine.hpp>
2021
#include <boost/asio/dispatch.hpp>
2122
#include <boost/asio/write.hpp>
22-
#include <boost/asio/prepend.hpp>
2323
#include <boost/optional.hpp>
2424
#include <boost/throw_exception.hpp>
2525
#include <ostream>
@@ -103,7 +103,7 @@ class write_some_op
103103
"http::async_write_some"));
104104

105105
const auto ex = asio::get_associated_immediate_executor(*this, s_.get_executor());
106-
return net::dispatch(ex, net::prepend(std::move(*this), ec, 0));
106+
return net::dispatch(ex, net::append(std::move(*this), ec, 0));
107107
}
108108
if(f.invoked)
109109
{
@@ -119,7 +119,7 @@ class write_some_op
119119
"http::async_write_some"));
120120

121121
const auto ex = this->get_immediate_executor();
122-
return net::dispatch(ex, net::prepend(std::move(*this), ec, 0));
122+
return net::dispatch(ex, net::append(std::move(*this), ec, 0));
123123
}
124124

125125
void

include/boost/beast/websocket/impl/teardown.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#include <boost/beast/core/stream_traits.hpp>
1515
#include <boost/beast/core/detail/bind_continuation.hpp>
1616
#include <boost/beast/core/detail/is_invocable.hpp>
17+
#include <boost/asio/append.hpp>
1718
#include <boost/asio/coroutine.hpp>
1819
#include <boost/asio/dispatch.hpp>
19-
#include <boost/asio/prepend.hpp>
2020
#include <memory>
2121

2222
namespace boost {
@@ -129,7 +129,7 @@ class teardown_tcp_op
129129
));
130130

131131
const auto ex = this->get_immediate_executor();
132-
net::dispatch(ex, net::prepend(std::move(*this), ec));
132+
net::dispatch(ex, net::append(std::move(*this), ec));
133133
}
134134
}
135135
{

0 commit comments

Comments
 (0)