22 Sep
2021
22 Sep
'21
3:33 p.m.
śr., 22 wrz 2021 o 17:01 Peter Dimov via Boost
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;