zpp_bits
zpp_bits copied to clipboard
FR: Decoupling reflection
Hi, I want to create custom templated serialization method based on provided reflection capabilities for aggregate types(visit_members_types, visit_members).
Unfortunately those methods depends on number_of_members, which depends on has_serializer producing circular dependency. It makes those reflection functions unusable in serialize methods.
I think that it might be useful to make those reflections methods independent of any serialization methods.
https://godbolt.org/z/GqT6f67Wd
Interesting idea, I’ll need to think if there is a workaround that you can use right now without any code change, because this usage of visiting members is intended to work without the custom serialization function.