| ▲ | 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++! | ||||||||
| ||||||||