
On Tue, May 10, 2022 at 1:33 PM Marcelo Zimbres Silva via Boost
Having a std::vector in the signature of the completion handler is unusual in ASIO. In general, large objects should be passed as parameters to the initiating function.
I agree that this is weird. Instead of a vector, the library could introduce a new concept, "RowAccumulator" which is a lightweight, movable value which is invoked to append elements to a notional container. This solves all the problems with allocators and memory-reuse. I suggest that if the library is accepted, it should be conditional upon removing the vector and replacing it with a concept. And the library should provide either in the examples, or as a public API - a wrapper that implements accumulation to a vector. Thanks