zpp_bits icon indicating copy to clipboard operation
zpp_bits copied to clipboard

FR: Decoupling reflection

Open asolwa opened this issue 1 year ago • 1 comments

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

asolwa avatar Jan 25 '24 08:01 asolwa

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.

eyalz800 avatar Jan 26 '24 10:01 eyalz800