On Thu, Feb 25, 2021 at 4:16 AM Peter Dimov via Boost
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). In my case, the (de)serialization code is already generated, but those struct lack op== for round-trip unit-testing for example. So is it worth to invest once in describe? And use it for both binary serialization and op==, and perhaps later for JSON serialization, mock generation (no example of that?), etc... Or simply update the source generator? Depends on complexity of use, compile-time speed, runtime overhead (if any) compared to "hand-written code" (well, source-generated), these kind of things. Boost.Describe caught my eye during the BoostJSON review, and I looked at it then. But I haven't taken the time to investigate further. My structs notably use optionals and variants, of the non-standard very ad-hoc kind, so I wasn't sure how those would fair. But overall, I'm very interested in what Boost.Describe promises. --DD