Boost logo

Boost :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2022-05-13 17:19:38


On Tue, May 10, 2022 at 1:33 PM Marcelo Zimbres Silva via Boost
<boost_at_[hidden]> wrote:
> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk