mercredi 28 juillet 2021

The current state of reflection in C++20

I started reading about reflection in C++20 and got quite confused. What is the current state of it, i.e. how much can we use as of now?

I've found reflection TS - but even the examples on this website fail to compile (on GCC11 with C++20) because the compiler cannot find "#include <experimental/reflect>"... So it's not exactly in the GCC?

So my question is: can we use anything of reflection now, without waiting for C++23? By 'anything' I mean for example querying the compiler for list of class members, names of enums etc? And by 'use' I mean in production code, not just for playing around.





Aucun commentaire:

Enregistrer un commentaire