Remix.run Logo
SuperV1234 an hour ago

You can achieve that since C++20 (or C++17 if you don't care about the member names). E.g. https://www.linkedin.com/posts/vittorioromeo_cpp-gamedev-ref...

(The link above shows ImGui generation, but the same exact logic can be applied for serialiation to JSON/YAML/whatever.)

maccard 13 minutes ago | parent [-]

Sure, but

> The magic sauce? Boost.PFR! An incredibly clever library that enables reflections on aggregates, even in C++17.

That's not vanilla C++!

SuperV1234 3 minutes ago | parent [-]

...so what? It's just a header you have to #include.