forked from boostorg/beast
Remove use of lexical_cast
This commit is contained in:
1 parent
7139dd639a
commit
b97586b318
16 files changed
+134
-41
No files matched your search
@@ -16,7 +16,6 @@
|
||||
#include <boost/beast/unit_test/suite.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <boost/asio/streambuf.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <iterator>
|
||||
|
||||
namespace boost {
|
||||
@@ -30,8 +29,14 @@ public:
|
||||
std::string
|
||||
to_string(ConstBufferSequence const& bs)
|
||||
{
|
||||
return boost::lexical_cast<
|
||||
std::string>(buffers(bs));
|
||||
using boost::asio::buffer_cast;
|
||||
using boost::asio::buffer_size;
|
||||
std::string s;
|
||||
s.reserve(buffer_size(bs));
|
||||
for(boost::asio::const_buffer b : bs)
|
||||
s.append(buffer_cast<char const*>(b),
|
||||
buffer_size(b));
|
||||
return s;
|
||||
}
|
||||
|
||||
void testBuffersAdapter()
|
||||
|
||||
Reference in new issue
Block a user