I can see how one can easily read from an introspective boost hana struct generically by field/value, but I cant find any way to write into a struct generically.
Basically I would want to be able to do something like:
boost::hana::for_each( data, boost::hana::fuse( [](auto name, auto member){
member = my_val_getter( name );
} ) );
but I cant seem to find a way to get a reference to "member" in order to be able to set it, if I try changing the method signature to auto & member it leads to all sorts of compilation errors.
looks like boost::hana::at_key is the trick, example usage can be found here
Relevant Code snippet: