|
Boost : |
Subject: Re: [boost] Error to convert to boost::asio::streambuf to raw buffer char *buffer
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-12-18 00:41:23
AMDG
On 12/15/2018 09:19 PM, hh h via Boost wrote:
> boost::asio::streambuf sb;
> char *raw = sb;
>
> error: cannot convert âboost::asio::streambuf {aka
> boost::asio::basic_streambuf<>}â to âchar*â in initialization
>
> I've checked the boost::asio::streambuf reference, but could not find
> anything to fix it, appreciate any clues.
>
asio::streambuf doesn't necessarily store contiguous data,
so this can't work as is.
The closest approximation to what you're asking for is:
https://www.boost.org/doc/html/boost_asio/reference/basic_streambuf/data.html
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk