You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking about using boost::pfr to automate this, but I don't think there is currently any way, since boost::pfr doesn't have an interface to access member addresses i.e. something like this:
auto cls = py::class_< MyStruct >(module, "MyStruct");
boost::pfr::for_each_member_address_with_name<MyStruct>([cls](std::string_view name, auto address) {
cls.def_readonly(name, address);
});
Is there any interest in having such interface? And if so - I think I can make a PR. If you could give me some hints on possible implementation - that would be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered:
Hey, I have some pybinded structs, that have a lot of repeating boilerplate:
I was thinking about using
boost::pfr
to automate this, but I don't think there is currently any way, sinceboost::pfr
doesn't have an interface to access member addresses i.e. something like this:Is there any interest in having such interface? And if so - I think I can make a PR. If you could give me some hints on possible implementation - that would be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: