Apparently boost::asio::async_read doesn\'t like strings, as the only overload of boost::asio::buffer allows me to create const_buffer
boost::asio::async_read
boost::asio::buffer
const_buffer
I think it's more like:
streambuf.commit( number_of_bytes_read ); istream istr( &streambuf ); string s; istr >> s;
I haven't looked into the basic_streambuf code, but I believe that should be just one copy into the string.
basic_streambuf