Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2021-02-25 17:50:10


Dominique Devienne wrote:
> On Thu, Feb 25, 2021 at 4:16 AM Peter Dimov via Boost
> <boost_at_[hidden]>
> wrote:
>
> > There's also a scenario where the format is predetermined, and you
> > create your C++ structs to conform to it, rather than vice versa.
> >
>
> Hi Peter. That's exactly my case (just not with Boost.Serialization).
>
> The real question is then, since those C++ struct sources are code-generated, is
> it worth to invest in Boost.Describe once in the code generator, and then use
> the techniques of your examples (i.e. "compile-time" code-gen), or update the
> source generator instead (i.e. "ahead-of-time" source-gen).

It's hard to say; one would have to experiment with both and see as it depends
on non-technical factors.

Adding Describe support to the generated structs is fairly cheap so I'd do that
either way, as it enables more flexibility on the C++ side without having to
touch the generator for every change.


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