Replies: 2 comments
-
|
Your request is already supported. You can just write: glz::object(&T::x, ...) Glaze will reflect your member pointer names. See the latest README for more explanation. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks! I missed that part! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, if I have a custom struct (which is not aggregate) I need to specify all member pointers to the
glz::objectparameter with their names (like here).It can be user-friendlier if the name is deduced from the member pointer, and it does not need to be duplicated.
I think about something:
object<&T::x, &T::y, ...>which iterates all template arguments (member pointer or null parameterized member function) and gets their names with the member name getter technique (example: the definition and the parser is almost same as with the member reflection.)Beta Was this translation helpful? Give feedback.
All reactions