Hacker News new | ask | show | jobs
by jcelerier 949 days ago
boost::pfr is also huge for reflection in C++. It leverages corner cases of the language and compilers but does so uniformly (works for MSVC, GCC, clang which is all that matters in 2023).

It allowed me to write for instance https://GitHub.com/celtera/avendish which keeps on giving. The last version even add automatic field name reflection which is huge: https://www.boost.org/doc/libs/master/doc/html/boost_pfr/tut...

2 comments

Wow, how does this even work? Can you share some hints?
Thanks for the hint, wasn't aware of it.