Support inherited classes with reflection #586
-
First of all, thank you for this awesome library, I've been trying to migrate my old projects with this library and most of them work flawlessly. However the library doesn't support inherited classes with reflection on, although I can disable reflection on them and use macros instead, it would be tedious to type when there are too many fields in the class |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Right now reflection only works on aggregate initializable structs, which rules out inheritance. This is a limitation you will see for any library currently implementing pure reflection, until we get C++26 reflection. There may be a work around this limitation, but currently I would recommend using macros or |
Beta Was this translation helpful? Give feedback.
Right now reflection only works on aggregate initializable structs, which rules out inheritance. This is a limitation you will see for any library currently implementing pure reflection, until we get C++26 reflection. There may be a work around this limitation, but currently I would recommend using macros or
glz::meta
. Thankfully theglz::meta
definitions will now reflect on your member pointer names, so that saves typing.