read_size replaces read_size_helper:

* detail::read_size_helper is removed

* public function read_size helps determine the optimum
  size for calls to a DynamicBuffer's prepare function.

* special case for Asio types which don't conform to
  the concept but have their own helper function.
This commit is contained in:
Vinnie Falco
2017-07-20 08:12:20 -07:00
parent fe4dfed27b
commit a49c096042
18 changed files with 212 additions and 147 deletions
+1 -5
View File
@@ -183,15 +183,11 @@ public:
type buffer;
buffers_adapter<
type::mutable_buffers_type> ba{buffer.prepare(512)};
using beast::detail::read_size_helper;
read_size_helper(ba, 1024);
read_size(ba, 1024);
}
void run() override
{
test::check_read_size_helper<buffers_adapter<
boost::asio::mutable_buffers_1>>();
testBuffersAdapter();
testCommit();
testIssue386();