Boost logo

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


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:

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at