Boost logo

Boost :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2019-09-24 12:09:30


On Tue, Sep 24, 2019 at 1:50 AM Phil Endecott via Boost
<boost_at_[hidden]> wrote:
> Real-soon-now we'll have coroutines, and the two parties
> (the parser and its user) won't have to choose anymore about
> who pushes and who pulls.

A design criteria for this library is to require only C++11

> Rather than that, how about a co-routine that yields a variant
> of those types?

If you mean something like

    json::value jv = co_await parse(source);

I think that the inversion of the flow of control resulting from this
design has excessive impact on the rest of the code. If we wanted to
retrieve a JSON document from a socket for example, then `source`
would have to be a coroutine. In the current design, the parser does
not impose any model as to how the data buffers are acquired. I could
be wrong though, do you have a more complete example?

Thanks


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