|
Boost : |
From: Julien Blanc (julien.blanc_at_[hidden])
Date: 2020-09-19 15:03:38
Le samedi 19 septembre 2020 à 05:37 -0700, Vinnie Falco a écrit :
> On Sat, Sep 19, 2020 at 3:32 AM Julien Blanc via Boost
> <boost_at_[hidden]> wrote:
> >
> It *is* possible to use basic_parser with your own handler (and it is
> documented). You just need to include the header manually, like this:
>
> #include <boost/json/basic_parser.hpp>
>
> This gives access to the class declaration and the member function
> definitions. The callbacks are documented here:
>
> <
https://master.json.cpp.al/json/ref/boost__json__basic_parser.html#json.ref.boost__json__basic_parser.handler0
>
Then i shall submit a doc bug report :). This is the doc iâve found,
this page explictely state that basic_parser is â Defined in header
<boost/json/detail/basic_parser.hpp>â.
Still, after reading the doc again, i don't get a clue what is this
on_number_part or why it exists at all. IIRC someone pointed out that
he will contribute docs on using the parser directly, that will be a
welcomed addition.
> > The second one was incompatibilites between standalone asio
> > bringing
> > boost headers (because boost is installed on my machine) and json
> > redefining them (because of standalone mode), resulting in multiple
> > defenitions of throw_exception.
>
> I'm open to suggestions on how to fix it:
>
> <
> https://github.com/CPPAlliance/json/blob/8c1075ab0bdcd0691ebc6f3574b9988cc5d3b2f6/include/boost/json/detail/impl/except.ipp#L37
Given that throw_expection is just a wrapper around a throw call in
that case, i guess it could simply live in the boost::json namespace.
That would avoid name clashes with asio (rapid testing has shown that
it seems to work).
Regards,
Julien
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk