Subject: Re: [boost] Interest in a simple buffer abstraction?
From: Christian Holmquist (c.holmquist_at_[hidden])
Date: 2011-01-28 09:24:54
On 28 January 2011 04:13, Boris Kolpackov <boris_at_[hidden]> wrote:
> Hi Christian,
> Christian Holmquist <c.holmquist_at_[hidden]> writes:
> > What's missing in asio's buffer interface that you would like to add?
> Memory management and common functions such as copy, append, etc. Asio
> buffers are just wrappers for the void*, size_t pair.
Then std::vector<char> is a better option. You wrote earlier that the code
is a bit ugly when using the std::vector in certain circumstances, but I'm
sure people will argue the same with a new invention.
I don't understand why you say std::vector doesn't have copy and append?
a = b; // copy
a.insert(a.end(), b.begin(), b.end()); // append
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk