|
Boost : |
From: Ruben Perez (rubenperez038_at_[hidden])
Date: 2022-05-15 13:57:32
On Fri, 13 May 2022 at 19:20, Vinnie Falco via Boost
<boost_at_[hidden]> wrote:
>
> 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.
How would that RowAccumulator concept be different from
a regular output iterator with boost::mysql::row value type?
>
> 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.
This makes sense. I've updated
https://github.com/anarthal/mysql/issues/58
to include your comments.
Regards,
Ruben.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk