Add buffers_range

This commit is contained in:
Vinnie Falco committed 2018-11-12 06:39:36 -08:00
1 parent 450964b78f
commit 071cab92d5
21 files changed
+283 -137

No files matched your search

+2 -1
View File
@@ -13,6 +13,7 @@
#include <boost/beast/core/detail/config.hpp>
#include <boost/beast/http/error.hpp>
#include <boost/beast/http/message.hpp>
#include <boost/beast/core/buffers_range.hpp>
#include <boost/beast/core/detail/type_traits.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/optional.hpp>
@@ -131,7 +132,7 @@ public:
}
ec.assign(0, ec.category());
CharT* dest = &body_[size];
for(auto b : beast::detail::buffers_range(buffers))
for(auto b : beast::buffers_range(std::ref(buffers)))
{
Traits::copy(dest, static_cast<
CharT const*>(b.data()), b.size());