|
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]>
napisaÅ(a):
> 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.
Thanks,
&rzej;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk