Boost logo

Boost :

From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2021-09-22 15:33:45

śr., 22 wrz 2021 o 17:01 Peter Dimov via Boost <boost_at_[hidden]>

> Andrzej Krzemienski wrote:
> > So, to rephrase, I assume that I can move construct a `tcp::socket`, and
> now I
> > ask if there is an interface or a technique within ASIO that would allow
> me to
> > move the `tcp::socket` and the buffer rather than heap-allocate them?
> How would you move a buffer without heap-allocating it though :-)

If I use std::vector<> as a buffer, then it allocates in its
implementation, but I do not have to do the second allocation to allocate
the std::vector<> itself.

I think I see your point, though. This would be only an exercise to prove
the point, but with no practical gain.


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